Skip to content

Commit 82540eb

Browse files
Niklas Söderlundgeertu
authored andcommitted
pinctrl: sh-pfc: r8a77965: Add I2C pin support
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
1 parent 7cf9733 commit 82540eb

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

drivers/pinctrl/sh-pfc/pfc-r8a77965.c

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1758,6 +1758,57 @@ static const unsigned int du_disp_mux[] = {
17581758
DU_DISP_MARK,
17591759
};
17601760

1761+
/* - I2C -------------------------------------------------------------------- */
1762+
static const unsigned int i2c1_a_pins[] = {
1763+
/* SDA, SCL */
1764+
RCAR_GP_PIN(5, 11), RCAR_GP_PIN(5, 10),
1765+
};
1766+
static const unsigned int i2c1_a_mux[] = {
1767+
SDA1_A_MARK, SCL1_A_MARK,
1768+
};
1769+
static const unsigned int i2c1_b_pins[] = {
1770+
/* SDA, SCL */
1771+
RCAR_GP_PIN(5, 24), RCAR_GP_PIN(5, 23),
1772+
};
1773+
static const unsigned int i2c1_b_mux[] = {
1774+
SDA1_B_MARK, SCL1_B_MARK,
1775+
};
1776+
static const unsigned int i2c2_a_pins[] = {
1777+
/* SDA, SCL */
1778+
RCAR_GP_PIN(5, 0), RCAR_GP_PIN(5, 4),
1779+
};
1780+
static const unsigned int i2c2_a_mux[] = {
1781+
SDA2_A_MARK, SCL2_A_MARK,
1782+
};
1783+
static const unsigned int i2c2_b_pins[] = {
1784+
/* SDA, SCL */
1785+
RCAR_GP_PIN(3, 13), RCAR_GP_PIN(3, 12),
1786+
};
1787+
static const unsigned int i2c2_b_mux[] = {
1788+
SDA2_B_MARK, SCL2_B_MARK,
1789+
};
1790+
static const unsigned int i2c6_a_pins[] = {
1791+
/* SDA, SCL */
1792+
RCAR_GP_PIN(1, 8), RCAR_GP_PIN(1, 11),
1793+
};
1794+
static const unsigned int i2c6_a_mux[] = {
1795+
SDA6_A_MARK, SCL6_A_MARK,
1796+
};
1797+
static const unsigned int i2c6_b_pins[] = {
1798+
/* SDA, SCL */
1799+
RCAR_GP_PIN(1, 26), RCAR_GP_PIN(1, 25),
1800+
};
1801+
static const unsigned int i2c6_b_mux[] = {
1802+
SDA6_B_MARK, SCL6_B_MARK,
1803+
};
1804+
static const unsigned int i2c6_c_pins[] = {
1805+
/* SDA, SCL */
1806+
RCAR_GP_PIN(0, 15), RCAR_GP_PIN(0, 14),
1807+
};
1808+
static const unsigned int i2c6_c_mux[] = {
1809+
SDA6_C_MARK, SCL6_C_MARK,
1810+
};
1811+
17611812
/* - INTC-EX ---------------------------------------------------------------- */
17621813
static const unsigned int intc_ex_irq0_pins[] = {
17631814
/* IRQ0 */
@@ -3118,6 +3169,13 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
31183169
SH_PFC_PIN_GROUP(du_oddf),
31193170
SH_PFC_PIN_GROUP(du_cde),
31203171
SH_PFC_PIN_GROUP(du_disp),
3172+
SH_PFC_PIN_GROUP(i2c1_a),
3173+
SH_PFC_PIN_GROUP(i2c1_b),
3174+
SH_PFC_PIN_GROUP(i2c2_a),
3175+
SH_PFC_PIN_GROUP(i2c2_b),
3176+
SH_PFC_PIN_GROUP(i2c6_a),
3177+
SH_PFC_PIN_GROUP(i2c6_b),
3178+
SH_PFC_PIN_GROUP(i2c6_c),
31213179
SH_PFC_PIN_GROUP(intc_ex_irq0),
31223180
SH_PFC_PIN_GROUP(intc_ex_irq1),
31233181
SH_PFC_PIN_GROUP(intc_ex_irq2),
@@ -3321,6 +3379,22 @@ static const char * const du_groups[] = {
33213379
"du_disp",
33223380
};
33233381

3382+
static const char * const i2c1_groups[] = {
3383+
"i2c1_a",
3384+
"i2c1_b",
3385+
};
3386+
3387+
static const char * const i2c2_groups[] = {
3388+
"i2c2_a",
3389+
"i2c2_b",
3390+
};
3391+
3392+
static const char * const i2c6_groups[] = {
3393+
"i2c6_a",
3394+
"i2c6_b",
3395+
"i2c6_c",
3396+
};
3397+
33243398
static const char * const intc_ex_groups[] = {
33253399
"intc_ex_irq0",
33263400
"intc_ex_irq1",
@@ -3577,6 +3651,9 @@ static const char * const usb30_groups[] = {
35773651
static const struct sh_pfc_function pinmux_functions[] = {
35783652
SH_PFC_FUNCTION(avb),
35793653
SH_PFC_FUNCTION(du),
3654+
SH_PFC_FUNCTION(i2c1),
3655+
SH_PFC_FUNCTION(i2c2),
3656+
SH_PFC_FUNCTION(i2c6),
35803657
SH_PFC_FUNCTION(intc_ex),
35813658
SH_PFC_FUNCTION(msiof0),
35823659
SH_PFC_FUNCTION(msiof1),

0 commit comments

Comments
 (0)