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.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJbBWP7AAoJEEgEtLw/Ve77vLQQAJUvsQkynQ415tVpxFbFi1NT
 jXDunV31hShy3qyfXdxF7lDgQtfwCgho7Pyay47AERHzmK0MQFbQvfNi4631hJ50
 CvfYS+/tmVQhyZYO5PiXHvQ5JvgpWa1RlstWDaVQP2O311kj635JdoDkIdYzUjZL
 /9hW8S/CAhmzrKb3tSlmW652bwX/6FKGXrLF4p49DXx+57yTZ6ORD5GkKGbCmD9Z
 cO/tPmjtAWkpdR9MXKInu7pwMSakycrtJdtx1tOx4DJ5L9WCP75LawwcbUVmbuQZ
 Pdjdz9hbndNHaCpj9jsSUYIeZ/1K0eqDj/X8Hjr5DxWugDKzl2u45U2BnSkyCFRL
 xLqqmhQR4LCCl1sKioxJa+Fv6aUmr9KFpqdlX20EiiPwfTnpVd22ClAfqQ5IGs3w
 u7i7fAaaeDf0cFS/I/8+0RZQp5DZgh/z2mTREwIJ7VFTQCqXWpDM1YTBl0W0k4k/
 Nl5WveFYaSIqbXgRyYWBjuALrMAZXsYvRax1UZLEVW4nYWl26GOfKA3i30clc8uG
 vluvV4glI3tWK/WLBoKYW2gItCDPhj3b72+U8A4pf8yBi4I9tOL+bcq3Ze2v6M66
 yGPzJ7kjQMyy4i3dyGuwOwXVy1CsNHRc1Gcm1vwcShNNrhlz7eKq8A+uDHoybPpD
 uwcI1s+/Jqfw+7WUufIQ
 =xeSy
 -----END PGP SIGNATURE-----

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.
This commit is contained in:
Linus Walleij 2018-05-24 09:05:02 +02:00
commit 316a67b770
10 changed files with 2804 additions and 14 deletions

View File

@ -28,6 +28,7 @@ Required Properties:
- "renesas,pfc-r8a77965": for R8A77965 (R-Car M3-N) compatible pin-controller. - "renesas,pfc-r8a77965": for R8A77965 (R-Car M3-N) compatible pin-controller.
- "renesas,pfc-r8a77970": for R8A77970 (R-Car V3M) compatible pin-controller. - "renesas,pfc-r8a77970": for R8A77970 (R-Car V3M) compatible pin-controller.
- "renesas,pfc-r8a77980": for R8A77980 (R-Car V3H) compatible pin-controller. - "renesas,pfc-r8a77980": for R8A77980 (R-Car V3H) compatible pin-controller.
- "renesas,pfc-r8a77990": for R8A77990 (R-Car E3) compatible pin-controller.
- "renesas,pfc-r8a77995": for R8A77995 (R-Car D3) compatible pin-controller. - "renesas,pfc-r8a77995": for R8A77995 (R-Car D3) compatible pin-controller.
- "renesas,pfc-sh73a0": for SH73A0 (SH-Mobile AG5) compatible pin-controller. - "renesas,pfc-sh73a0": for SH73A0 (SH-Mobile AG5) compatible pin-controller.

View File

@ -109,6 +109,11 @@ config PINCTRL_PFC_R8A77980
depends on ARCH_R8A77980 depends on ARCH_R8A77980
select PINCTRL_SH_PFC select PINCTRL_SH_PFC
config PINCTRL_PFC_R8A77990
def_bool y
depends on ARCH_R8A77990
select PINCTRL_SH_PFC
config PINCTRL_PFC_R8A77995 config PINCTRL_PFC_R8A77995
def_bool y def_bool y
depends on ARCH_R8A77995 depends on ARCH_R8A77995

View File

@ -20,6 +20,7 @@ obj-$(CONFIG_PINCTRL_PFC_R8A7796) += pfc-r8a7796.o
obj-$(CONFIG_PINCTRL_PFC_R8A77965) += pfc-r8a77965.o obj-$(CONFIG_PINCTRL_PFC_R8A77965) += pfc-r8a77965.o
obj-$(CONFIG_PINCTRL_PFC_R8A77970) += pfc-r8a77970.o obj-$(CONFIG_PINCTRL_PFC_R8A77970) += pfc-r8a77970.o
obj-$(CONFIG_PINCTRL_PFC_R8A77980) += pfc-r8a77980.o obj-$(CONFIG_PINCTRL_PFC_R8A77980) += pfc-r8a77980.o
obj-$(CONFIG_PINCTRL_PFC_R8A77990) += pfc-r8a77990.o
obj-$(CONFIG_PINCTRL_PFC_R8A77995) += pfc-r8a77995.o obj-$(CONFIG_PINCTRL_PFC_R8A77995) += pfc-r8a77995.o
obj-$(CONFIG_PINCTRL_PFC_SH7203) += pfc-sh7203.o obj-$(CONFIG_PINCTRL_PFC_SH7203) += pfc-sh7203.o
obj-$(CONFIG_PINCTRL_PFC_SH7264) += pfc-sh7264.o obj-$(CONFIG_PINCTRL_PFC_SH7264) += pfc-sh7264.o

View File

@ -581,6 +581,12 @@ static const struct of_device_id sh_pfc_of_table[] = {
.data = &r8a77980_pinmux_info, .data = &r8a77980_pinmux_info,
}, },
#endif #endif
#ifdef CONFIG_PINCTRL_PFC_R8A77990
{
.compatible = "renesas,pfc-r8a77990",
.data = &r8a77990_pinmux_info,
},
#endif
#ifdef CONFIG_PINCTRL_PFC_R8A77995 #ifdef CONFIG_PINCTRL_PFC_R8A77995
{ {
.compatible = "renesas,pfc-r8a77995", .compatible = "renesas,pfc-r8a77995",

View File

@ -1432,10 +1432,10 @@ static const u16 pinmux_data[] = {
/* /*
* Static pins can not be muxed between different functions but * Static pins can not be muxed between different functions but
* still needs a mark entry in the pinmux list. Add each static * still need mark entries in the pinmux list. Add each static
* pin to the list without an associated function. The sh-pfc * pin to the list without an associated function. The sh-pfc
* core will do the right thing and skip trying to mux then pin * core will do the right thing and skip trying to mux the pin
* while still applying configuration to it * while still applying configuration to it.
*/ */
#define FM(x) PINMUX_DATA(x##_MARK, 0), #define FM(x) PINMUX_DATA(x##_MARK, 0),
PINMUX_STATIC PINMUX_STATIC

View File

@ -1493,10 +1493,10 @@ static const u16 pinmux_data[] = {
/* /*
* Static pins can not be muxed between different functions but * Static pins can not be muxed between different functions but
* still needs a mark entry in the pinmux list. Add each static * still need mark entries in the pinmux list. Add each static
* pin to the list without an associated function. The sh-pfc * pin to the list without an associated function. The sh-pfc
* core will do the right thing and skip trying to mux then pin * core will do the right thing and skip trying to mux the pin
* while still applying configuration to it * while still applying configuration to it.
*/ */
#define FM(x) PINMUX_DATA(x##_MARK, 0), #define FM(x) PINMUX_DATA(x##_MARK, 0),
PINMUX_STATIC PINMUX_STATIC

View File

@ -1499,10 +1499,10 @@ static const u16 pinmux_data[] = {
/* /*
* Static pins can not be muxed between different functions but * Static pins can not be muxed between different functions but
* still needs a mark entry in the pinmux list. Add each static * still need mark entries in the pinmux list. Add each static
* pin to the list without an associated function. The sh-pfc * pin to the list without an associated function. The sh-pfc
* core will do the right thing and skip trying to mux then pin * core will do the right thing and skip trying to mux the pin
* while still applying configuration to it * while still applying configuration to it.
*/ */
#define FM(x) PINMUX_DATA(x##_MARK, 0), #define FM(x) PINMUX_DATA(x##_MARK, 0),
PINMUX_STATIC PINMUX_STATIC

View File

@ -1501,10 +1501,10 @@ static const u16 pinmux_data[] = {
/* /*
* Static pins can not be muxed between different functions but * Static pins can not be muxed between different functions but
* still needs a mark entry in the pinmux list. Add each static * still need mark entries in the pinmux list. Add each static
* pin to the list without an associated function. The sh-pfc * pin to the list without an associated function. The sh-pfc
* core will do the right thing and skip trying to mux then pin * core will do the right thing and skip trying to mux the pin
* while still applying configuration to it * while still applying configuration to it.
*/ */
#define FM(x) PINMUX_DATA(x##_MARK, 0), #define FM(x) PINMUX_DATA(x##_MARK, 0),
PINMUX_STATIC PINMUX_STATIC
@ -1758,6 +1758,57 @@ static const unsigned int du_disp_mux[] = {
DU_DISP_MARK, DU_DISP_MARK,
}; };
/* - I2C -------------------------------------------------------------------- */
static const unsigned int i2c1_a_pins[] = {
/* SDA, SCL */
RCAR_GP_PIN(5, 11), RCAR_GP_PIN(5, 10),
};
static const unsigned int i2c1_a_mux[] = {
SDA1_A_MARK, SCL1_A_MARK,
};
static const unsigned int i2c1_b_pins[] = {
/* SDA, SCL */
RCAR_GP_PIN(5, 24), RCAR_GP_PIN(5, 23),
};
static const unsigned int i2c1_b_mux[] = {
SDA1_B_MARK, SCL1_B_MARK,
};
static const unsigned int i2c2_a_pins[] = {
/* SDA, SCL */
RCAR_GP_PIN(5, 0), RCAR_GP_PIN(5, 4),
};
static const unsigned int i2c2_a_mux[] = {
SDA2_A_MARK, SCL2_A_MARK,
};
static const unsigned int i2c2_b_pins[] = {
/* SDA, SCL */
RCAR_GP_PIN(3, 13), RCAR_GP_PIN(3, 12),
};
static const unsigned int i2c2_b_mux[] = {
SDA2_B_MARK, SCL2_B_MARK,
};
static const unsigned int i2c6_a_pins[] = {
/* SDA, SCL */
RCAR_GP_PIN(1, 8), RCAR_GP_PIN(1, 11),
};
static const unsigned int i2c6_a_mux[] = {
SDA6_A_MARK, SCL6_A_MARK,
};
static const unsigned int i2c6_b_pins[] = {
/* SDA, SCL */
RCAR_GP_PIN(1, 26), RCAR_GP_PIN(1, 25),
};
static const unsigned int i2c6_b_mux[] = {
SDA6_B_MARK, SCL6_B_MARK,
};
static const unsigned int i2c6_c_pins[] = {
/* SDA, SCL */
RCAR_GP_PIN(0, 15), RCAR_GP_PIN(0, 14),
};
static const unsigned int i2c6_c_mux[] = {
SDA6_C_MARK, SCL6_C_MARK,
};
/* - INTC-EX ---------------------------------------------------------------- */ /* - INTC-EX ---------------------------------------------------------------- */
static const unsigned int intc_ex_irq0_pins[] = { static const unsigned int intc_ex_irq0_pins[] = {
/* IRQ0 */ /* IRQ0 */
@ -3118,6 +3169,13 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
SH_PFC_PIN_GROUP(du_oddf), SH_PFC_PIN_GROUP(du_oddf),
SH_PFC_PIN_GROUP(du_cde), SH_PFC_PIN_GROUP(du_cde),
SH_PFC_PIN_GROUP(du_disp), SH_PFC_PIN_GROUP(du_disp),
SH_PFC_PIN_GROUP(i2c1_a),
SH_PFC_PIN_GROUP(i2c1_b),
SH_PFC_PIN_GROUP(i2c2_a),
SH_PFC_PIN_GROUP(i2c2_b),
SH_PFC_PIN_GROUP(i2c6_a),
SH_PFC_PIN_GROUP(i2c6_b),
SH_PFC_PIN_GROUP(i2c6_c),
SH_PFC_PIN_GROUP(intc_ex_irq0), SH_PFC_PIN_GROUP(intc_ex_irq0),
SH_PFC_PIN_GROUP(intc_ex_irq1), SH_PFC_PIN_GROUP(intc_ex_irq1),
SH_PFC_PIN_GROUP(intc_ex_irq2), SH_PFC_PIN_GROUP(intc_ex_irq2),
@ -3321,6 +3379,22 @@ static const char * const du_groups[] = {
"du_disp", "du_disp",
}; };
static const char * const i2c1_groups[] = {
"i2c1_a",
"i2c1_b",
};
static const char * const i2c2_groups[] = {
"i2c2_a",
"i2c2_b",
};
static const char * const i2c6_groups[] = {
"i2c6_a",
"i2c6_b",
"i2c6_c",
};
static const char * const intc_ex_groups[] = { static const char * const intc_ex_groups[] = {
"intc_ex_irq0", "intc_ex_irq0",
"intc_ex_irq1", "intc_ex_irq1",
@ -3577,6 +3651,9 @@ static const char * const usb30_groups[] = {
static const struct sh_pfc_function pinmux_functions[] = { static const struct sh_pfc_function pinmux_functions[] = {
SH_PFC_FUNCTION(avb), SH_PFC_FUNCTION(avb),
SH_PFC_FUNCTION(du), SH_PFC_FUNCTION(du),
SH_PFC_FUNCTION(i2c1),
SH_PFC_FUNCTION(i2c2),
SH_PFC_FUNCTION(i2c6),
SH_PFC_FUNCTION(intc_ex), SH_PFC_FUNCTION(intc_ex),
SH_PFC_FUNCTION(msiof0), SH_PFC_FUNCTION(msiof0),
SH_PFC_FUNCTION(msiof1), SH_PFC_FUNCTION(msiof1),

File diff suppressed because it is too large Load Diff

View File

@ -288,6 +288,7 @@ extern const struct sh_pfc_soc_info r8a7796_pinmux_info;
extern const struct sh_pfc_soc_info r8a77965_pinmux_info; extern const struct sh_pfc_soc_info r8a77965_pinmux_info;
extern const struct sh_pfc_soc_info r8a77970_pinmux_info; extern const struct sh_pfc_soc_info r8a77970_pinmux_info;
extern const struct sh_pfc_soc_info r8a77980_pinmux_info; extern const struct sh_pfc_soc_info r8a77980_pinmux_info;
extern const struct sh_pfc_soc_info r8a77990_pinmux_info;
extern const struct sh_pfc_soc_info r8a77995_pinmux_info; extern const struct sh_pfc_soc_info r8a77995_pinmux_info;
extern const struct sh_pfc_soc_info sh7203_pinmux_info; extern const struct sh_pfc_soc_info sh7203_pinmux_info;
extern const struct sh_pfc_soc_info sh7264_pinmux_info; extern const struct sh_pfc_soc_info sh7264_pinmux_info;
@ -416,9 +417,13 @@ extern const struct sh_pfc_soc_info shx3_pinmux_info;
PORT_GP_CFG_1(bank, 9, fn, sfx, cfg) PORT_GP_CFG_1(bank, 9, fn, sfx, cfg)
#define PORT_GP_10(bank, fn, sfx) PORT_GP_CFG_10(bank, fn, sfx, 0) #define PORT_GP_10(bank, fn, sfx) PORT_GP_CFG_10(bank, fn, sfx, 0)
#define PORT_GP_CFG_12(bank, fn, sfx, cfg) \ #define PORT_GP_CFG_11(bank, fn, sfx, cfg) \
PORT_GP_CFG_10(bank, fn, sfx, cfg), \ PORT_GP_CFG_10(bank, fn, sfx, cfg), \
PORT_GP_CFG_1(bank, 10, fn, sfx, cfg), \ PORT_GP_CFG_1(bank, 10, fn, sfx, cfg)
#define PORT_GP_11(bank, fn, sfx) PORT_GP_CFG_11(bank, fn, sfx, 0)
#define PORT_GP_CFG_12(bank, fn, sfx, cfg) \
PORT_GP_CFG_11(bank, fn, sfx, cfg), \
PORT_GP_CFG_1(bank, 11, fn, sfx, cfg) PORT_GP_CFG_1(bank, 11, fn, sfx, cfg)
#define PORT_GP_12(bank, fn, sfx) PORT_GP_CFG_12(bank, fn, sfx, 0) #define PORT_GP_12(bank, fn, sfx) PORT_GP_CFG_12(bank, fn, sfx, 0)