diff options
author | Ulrich Hecht <ulrich.hecht@gmail.com> | 2013-08-30 08:37:41 -0400 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2013-09-24 06:23:42 -0400 |
commit | 70702bfc13c4f96f2f05d4ce2eb110cd1735fef5 (patch) | |
tree | 3b37eee6c492eaad582ddabc2d616377b795978f /drivers/pinctrl | |
parent | 3ad8219a50eab201abf89b25d7797d6695b73e4e (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.c | 82 |
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[] = { | |||
1990 | static const unsigned int hscif1_ctrl_b_mux[] = { | 1990 | static 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 ------------------------------------------------------------------- */ | ||
1994 | static const unsigned int i2c1_pins[] = { | ||
1995 | /* SCL, SDA */ | ||
1996 | RCAR_GP_PIN(1, 16), RCAR_GP_PIN(1, 17), | ||
1997 | }; | ||
1998 | static const unsigned int i2c1_mux[] = { | ||
1999 | I2C1_SCL_MARK, I2C1_SDA_MARK, | ||
2000 | }; | ||
2001 | static const unsigned int i2c1_b_pins[] = { | ||
2002 | /* SCL, SDA */ | ||
2003 | RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7), | ||
2004 | }; | ||
2005 | static const unsigned int i2c1_b_mux[] = { | ||
2006 | I2C1_SCL_B_MARK, I2C1_SDA_B_MARK, | ||
2007 | }; | ||
2008 | static const unsigned int i2c1_c_pins[] = { | ||
2009 | /* SCL, SDA */ | ||
2010 | RCAR_GP_PIN(4, 30), RCAR_GP_PIN(4, 27), | ||
2011 | }; | ||
2012 | static const unsigned int i2c1_c_mux[] = { | ||
2013 | I2C1_SCL_C_MARK, I2C1_SDA_C_MARK, | ||
2014 | }; | ||
2015 | /* - I2C2 ------------------------------------------------------------------- */ | ||
2016 | static const unsigned int i2c2_pins[] = { | ||
2017 | /* SCL, SDA */ | ||
2018 | RCAR_GP_PIN(5, 5), RCAR_GP_PIN(5, 6), | ||
2019 | }; | ||
2020 | static const unsigned int i2c2_mux[] = { | ||
2021 | I2C2_SCL_MARK, I2C2_SDA_MARK, | ||
2022 | }; | ||
2023 | static const unsigned int i2c2_b_pins[] = { | ||
2024 | /* SCL, SDA */ | ||
2025 | RCAR_GP_PIN(4, 0), RCAR_GP_PIN(4, 1), | ||
2026 | }; | ||
2027 | static const unsigned int i2c2_b_mux[] = { | ||
2028 | I2C2_SCL_B_MARK, I2C2_SDA_B_MARK, | ||
2029 | }; | ||
2030 | static const unsigned int i2c2_c_pins[] = { | ||
2031 | /* SCL, SDA */ | ||
2032 | RCAR_GP_PIN(0, 6), RCAR_GP_PIN(0, 7), | ||
2033 | }; | ||
2034 | static const unsigned int i2c2_c_mux[] = { | ||
2035 | I2C2_SCL_C_MARK, I2C2_SDA_C_MARK, | ||
2036 | }; | ||
2037 | static const unsigned int i2c2_d_pins[] = { | ||
2038 | /* SCL, SDA */ | ||
2039 | RCAR_GP_PIN(3, 14), RCAR_GP_PIN(3, 15), | ||
2040 | }; | ||
2041 | static const unsigned int i2c2_d_mux[] = { | ||
2042 | I2C2_SCL_D_MARK, I2C2_SDA_D_MARK, | ||
2043 | }; | ||
2044 | static const unsigned int i2c2_e_pins[] = { | ||
2045 | /* SCL, SDA */ | ||
2046 | RCAR_GP_PIN(2, 18), RCAR_GP_PIN(2, 19), | ||
2047 | }; | ||
2048 | static const unsigned int i2c2_e_mux[] = { | ||
2049 | I2C2_SCL_E_MARK, I2C2_SDA_E_MARK, | ||
2050 | }; | ||
1993 | /* - INTC ------------------------------------------------------------------- */ | 2051 | /* - INTC ------------------------------------------------------------------- */ |
1994 | static const unsigned int intc_irq0_pins[] = { | 2052 | static 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 | ||
3312 | static const char * const i2c1_groups[] = { | ||
3313 | "i2c1", | ||
3314 | "i2c1_b", | ||
3315 | "i2c1_c", | ||
3316 | }; | ||
3317 | |||
3318 | static const char * const i2c2_groups[] = { | ||
3319 | "i2c2", | ||
3320 | "i2c2_b", | ||
3321 | "i2c2_c", | ||
3322 | "i2c2_d", | ||
3323 | "i2c2_e", | ||
3324 | }; | ||
3325 | |||
3246 | static const char * const intc_groups[] = { | 3326 | static 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), |