aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorUlrich Hecht <ulrich.hecht@gmail.com>2013-08-30 08:37:41 -0400
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-09-24 06:23:42 -0400
commit70702bfc13c4f96f2f05d4ce2eb110cd1735fef5 (patch)
tree3b37eee6c492eaad582ddabc2d616377b795978f /drivers/pinctrl
parent3ad8219a50eab201abf89b25d7797d6695b73e4e (diff)
sh-pfc: r8a7790: Add I2C pin groups and functions
Adds pinmux for i2c bus 1 and 2. (Pins for 0 and 3 are not multiplexed.) Signed-off-by: Ulrich Hecht <ulrich.hecht@gmail.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-r8a7790.c82
1 files changed, 82 insertions, 0 deletions
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7790.c b/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
index 64fcc00693b5..5c2657bcc3a4 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
@@ -1990,6 +1990,64 @@ static const unsigned int hscif1_ctrl_b_pins[] = {
1990static const unsigned int hscif1_ctrl_b_mux[] = { 1990static const unsigned int hscif1_ctrl_b_mux[] = {
1991 HRTS1_N_B_MARK, HCTS1_N_B_MARK, 1991 HRTS1_N_B_MARK, HCTS1_N_B_MARK,
1992}; 1992};
1993/* - I2C1 ------------------------------------------------------------------- */
1994static const unsigned int i2c1_pins[] = {
1995 /* SCL, SDA */
1996 RCAR_GP_PIN(1, 16), RCAR_GP_PIN(1, 17),
1997};
1998static const unsigned int i2c1_mux[] = {
1999 I2C1_SCL_MARK, I2C1_SDA_MARK,
2000};
2001static const unsigned int i2c1_b_pins[] = {
2002 /* SCL, SDA */
2003 RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7),
2004};
2005static const unsigned int i2c1_b_mux[] = {
2006 I2C1_SCL_B_MARK, I2C1_SDA_B_MARK,
2007};
2008static const unsigned int i2c1_c_pins[] = {
2009 /* SCL, SDA */
2010 RCAR_GP_PIN(4, 30), RCAR_GP_PIN(4, 27),
2011};
2012static const unsigned int i2c1_c_mux[] = {
2013 I2C1_SCL_C_MARK, I2C1_SDA_C_MARK,
2014};
2015/* - I2C2 ------------------------------------------------------------------- */
2016static const unsigned int i2c2_pins[] = {
2017 /* SCL, SDA */
2018 RCAR_GP_PIN(5, 5), RCAR_GP_PIN(5, 6),
2019};
2020static const unsigned int i2c2_mux[] = {
2021 I2C2_SCL_MARK, I2C2_SDA_MARK,
2022};
2023static const unsigned int i2c2_b_pins[] = {
2024 /* SCL, SDA */
2025 RCAR_GP_PIN(4, 0), RCAR_GP_PIN(4, 1),
2026};
2027static const unsigned int i2c2_b_mux[] = {
2028 I2C2_SCL_B_MARK, I2C2_SDA_B_MARK,
2029};
2030static const unsigned int i2c2_c_pins[] = {
2031 /* SCL, SDA */
2032 RCAR_GP_PIN(0, 6), RCAR_GP_PIN(0, 7),
2033};
2034static const unsigned int i2c2_c_mux[] = {
2035 I2C2_SCL_C_MARK, I2C2_SDA_C_MARK,
2036};
2037static const unsigned int i2c2_d_pins[] = {
2038 /* SCL, SDA */
2039 RCAR_GP_PIN(3, 14), RCAR_GP_PIN(3, 15),
2040};
2041static const unsigned int i2c2_d_mux[] = {
2042 I2C2_SCL_D_MARK, I2C2_SDA_D_MARK,
2043};
2044static const unsigned int i2c2_e_pins[] = {
2045 /* SCL, SDA */
2046 RCAR_GP_PIN(2, 18), RCAR_GP_PIN(2, 19),
2047};
2048static const unsigned int i2c2_e_mux[] = {
2049 I2C2_SCL_E_MARK, I2C2_SDA_E_MARK,
2050};
1993/* - INTC ------------------------------------------------------------------- */ 2051/* - INTC ------------------------------------------------------------------- */
1994static const unsigned int intc_irq0_pins[] = { 2052static const unsigned int intc_irq0_pins[] = {
1995 /* IRQ */ 2053 /* IRQ */
@@ -3047,6 +3105,14 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
3047 SH_PFC_PIN_GROUP(hscif1_data_b), 3105 SH_PFC_PIN_GROUP(hscif1_data_b),
3048 SH_PFC_PIN_GROUP(hscif1_clk_b), 3106 SH_PFC_PIN_GROUP(hscif1_clk_b),
3049 SH_PFC_PIN_GROUP(hscif1_ctrl_b), 3107 SH_PFC_PIN_GROUP(hscif1_ctrl_b),
3108 SH_PFC_PIN_GROUP(i2c1),
3109 SH_PFC_PIN_GROUP(i2c1_b),
3110 SH_PFC_PIN_GROUP(i2c1_c),
3111 SH_PFC_PIN_GROUP(i2c2),
3112 SH_PFC_PIN_GROUP(i2c2_b),
3113 SH_PFC_PIN_GROUP(i2c2_c),
3114 SH_PFC_PIN_GROUP(i2c2_d),
3115 SH_PFC_PIN_GROUP(i2c2_e),
3050 SH_PFC_PIN_GROUP(intc_irq0), 3116 SH_PFC_PIN_GROUP(intc_irq0),
3051 SH_PFC_PIN_GROUP(intc_irq1), 3117 SH_PFC_PIN_GROUP(intc_irq1),
3052 SH_PFC_PIN_GROUP(intc_irq2), 3118 SH_PFC_PIN_GROUP(intc_irq2),
@@ -3243,6 +3309,20 @@ static const char * const hscif1_groups[] = {
3243 "hscif1_ctrl_b", 3309 "hscif1_ctrl_b",
3244}; 3310};
3245 3311
3312static const char * const i2c1_groups[] = {
3313 "i2c1",
3314 "i2c1_b",
3315 "i2c1_c",
3316};
3317
3318static const char * const i2c2_groups[] = {
3319 "i2c2",
3320 "i2c2_b",
3321 "i2c2_c",
3322 "i2c2_d",
3323 "i2c2_e",
3324};
3325
3246static const char * const intc_groups[] = { 3326static const char * const intc_groups[] = {
3247 "intc_irq0", 3327 "intc_irq0",
3248 "intc_irq1", 3328 "intc_irq1",
@@ -3469,6 +3549,8 @@ static const struct sh_pfc_function pinmux_functions[] = {
3469 SH_PFC_FUNCTION(eth), 3549 SH_PFC_FUNCTION(eth),
3470 SH_PFC_FUNCTION(hscif0), 3550 SH_PFC_FUNCTION(hscif0),
3471 SH_PFC_FUNCTION(hscif1), 3551 SH_PFC_FUNCTION(hscif1),
3552 SH_PFC_FUNCTION(i2c1),
3553 SH_PFC_FUNCTION(i2c2),
3472 SH_PFC_FUNCTION(intc), 3554 SH_PFC_FUNCTION(intc),
3473 SH_PFC_FUNCTION(mmc0), 3555 SH_PFC_FUNCTION(mmc0),
3474 SH_PFC_FUNCTION(mmc1), 3556 SH_PFC_FUNCTION(mmc1),