Skip to content

Commit 316a67b

Browse files
committed
Merge tag 'sh-pfc-for-v4.18-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel
pinctrl: sh-pfc: Updates for v4.18 (take two) - Add support for the new R-Car E3 SoC, - Add I2C pin groups on R-Car M3-N, - Small fixes and cleanups.
2 parents c6114f2 + db701f4 commit 316a67b

File tree

10 files changed

+2804
-14
lines changed

10 files changed

+2804
-14
lines changed

Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Required Properties:
2828
- "renesas,pfc-r8a77965": for R8A77965 (R-Car M3-N) compatible pin-controller.
2929
- "renesas,pfc-r8a77970": for R8A77970 (R-Car V3M) compatible pin-controller.
3030
- "renesas,pfc-r8a77980": for R8A77980 (R-Car V3H) compatible pin-controller.
31+
- "renesas,pfc-r8a77990": for R8A77990 (R-Car E3) compatible pin-controller.
3132
- "renesas,pfc-r8a77995": for R8A77995 (R-Car D3) compatible pin-controller.
3233
- "renesas,pfc-sh73a0": for SH73A0 (SH-Mobile AG5) compatible pin-controller.
3334

drivers/pinctrl/sh-pfc/Kconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ config PINCTRL_PFC_R8A77980
109109
depends on ARCH_R8A77980
110110
select PINCTRL_SH_PFC
111111

112+
config PINCTRL_PFC_R8A77990
113+
def_bool y
114+
depends on ARCH_R8A77990
115+
select PINCTRL_SH_PFC
116+
112117
config PINCTRL_PFC_R8A77995
113118
def_bool y
114119
depends on ARCH_R8A77995

drivers/pinctrl/sh-pfc/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ obj-$(CONFIG_PINCTRL_PFC_R8A7796) += pfc-r8a7796.o
2020
obj-$(CONFIG_PINCTRL_PFC_R8A77965) += pfc-r8a77965.o
2121
obj-$(CONFIG_PINCTRL_PFC_R8A77970) += pfc-r8a77970.o
2222
obj-$(CONFIG_PINCTRL_PFC_R8A77980) += pfc-r8a77980.o
23+
obj-$(CONFIG_PINCTRL_PFC_R8A77990) += pfc-r8a77990.o
2324
obj-$(CONFIG_PINCTRL_PFC_R8A77995) += pfc-r8a77995.o
2425
obj-$(CONFIG_PINCTRL_PFC_SH7203) += pfc-sh7203.o
2526
obj-$(CONFIG_PINCTRL_PFC_SH7264) += pfc-sh7264.o

drivers/pinctrl/sh-pfc/core.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,12 @@ static const struct of_device_id sh_pfc_of_table[] = {
581581
.data = &r8a77980_pinmux_info,
582582
},
583583
#endif
584+
#ifdef CONFIG_PINCTRL_PFC_R8A77990
585+
{
586+
.compatible = "renesas,pfc-r8a77990",
587+
.data = &r8a77990_pinmux_info,
588+
},
589+
#endif
584590
#ifdef CONFIG_PINCTRL_PFC_R8A77995
585591
{
586592
.compatible = "renesas,pfc-r8a77995",

drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,10 +1432,10 @@ static const u16 pinmux_data[] = {
14321432

14331433
/*
14341434
* Static pins can not be muxed between different functions but
1435-
* still needs a mark entry in the pinmux list. Add each static
1435+
* still need mark entries in the pinmux list. Add each static
14361436
* pin to the list without an associated function. The sh-pfc
1437-
* core will do the right thing and skip trying to mux then pin
1438-
* while still applying configuration to it
1437+
* core will do the right thing and skip trying to mux the pin
1438+
* while still applying configuration to it.
14391439
*/
14401440
#define FM(x) PINMUX_DATA(x##_MARK, 0),
14411441
PINMUX_STATIC

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1493,10 +1493,10 @@ static const u16 pinmux_data[] = {
14931493

14941494
/*
14951495
* Static pins can not be muxed between different functions but
1496-
* still needs a mark entry in the pinmux list. Add each static
1496+
* still need mark entries in the pinmux list. Add each static
14971497
* pin to the list without an associated function. The sh-pfc
1498-
* core will do the right thing and skip trying to mux then pin
1499-
* while still applying configuration to it
1498+
* core will do the right thing and skip trying to mux the pin
1499+
* while still applying configuration to it.
15001500
*/
15011501
#define FM(x) PINMUX_DATA(x##_MARK, 0),
15021502
PINMUX_STATIC

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1499,10 +1499,10 @@ static const u16 pinmux_data[] = {
14991499

15001500
/*
15011501
* Static pins can not be muxed between different functions but
1502-
* still needs a mark entry in the pinmux list. Add each static
1502+
* still need mark entries in the pinmux list. Add each static
15031503
* pin to the list without an associated function. The sh-pfc
1504-
* core will do the right thing and skip trying to mux then pin
1505-
* while still applying configuration to it
1504+
* core will do the right thing and skip trying to mux the pin
1505+
* while still applying configuration to it.
15061506
*/
15071507
#define FM(x) PINMUX_DATA(x##_MARK, 0),
15081508
PINMUX_STATIC

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

Lines changed: 80 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1501,10 +1501,10 @@ static const u16 pinmux_data[] = {
15011501

15021502
/*
15031503
* Static pins can not be muxed between different functions but
1504-
* still needs a mark entry in the pinmux list. Add each static
1504+
* still need mark entries in the pinmux list. Add each static
15051505
* pin to the list without an associated function. The sh-pfc
1506-
* core will do the right thing and skip trying to mux then pin
1507-
* while still applying configuration to it
1506+
* core will do the right thing and skip trying to mux the pin
1507+
* while still applying configuration to it.
15081508
*/
15091509
#define FM(x) PINMUX_DATA(x##_MARK, 0),
15101510
PINMUX_STATIC
@@ -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)