Add RZ/G2[ME] Clock support
Subsystems (3)
cover Add RZ/G2[ME] Clock support
This patch series aims to add pin control support for RZ/G2[ME] SoCs.
This patch series is based on linux-4.19.y-cip and all the patches in this series are cherry-picked from linux rc tree.
This patch series is depend on the below patch series
https://patchwork.kernel.org/project/cip-dev/list/?series=94923
Biju Das (2):
dt-bindings: pinctrl: sh-pfc: Document r8a774a1 PFC support
pinctrl: sh-pfc: r8a7796: Add R8A774A1 PFC support
Fabrizio Castro (2):
dt-bindings: pinctrl: sh-pfc: Document r8a774c0 PFC support
pinctrl: sh-pfc: r8a77990: Add R8A774C0 PFC support
Laurent Pinchart (1):
pinctrl: sh-pfc: r8a77990: Add DU pins, groups and function
Takeshi Kihara (2):
pinctrl: sh-pfc: r8a77990: Add PWM pins, groups and functions
pinctrl: sh-pfc: r8a77990: Add MSIOF pins, groups and functions
.../bindings/pinctrl/renesas,pfc-pinctrl.txt | 2 + drivers/pinctrl/sh-pfc/Kconfig | 10 + drivers/pinctrl/sh-pfc/Makefile | 2 + drivers/pinctrl/sh-pfc/core.c | 12 + drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 837 ++++++++++--------- drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 921 +++++++++++++++++++-- drivers/pinctrl/sh-pfc/sh_pfc.h | 2 + 7 files changed, 1310 insertions(+), 476 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/7 dt-bindings: pinctrl: sh-pfc: Document r8a774a1 PFC support
Document PFC support for the R8A774A1 SoC.
--- Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt +1 -0
@@ -16,6 +16,7 @@ Required Properties: - "renesas,pfc-r8a7743": for R8A7743 (RZ/G1M) compatible pin-controller. - "renesas,pfc-r8a7745": for R8A7745 (RZ/G1E) compatible pin-controller. - "renesas,pfc-r8a77470": for R8A77470 (RZ/G1C) compatible pin-controller. + - "renesas,pfc-r8a774a1": for R8A774A1 (RZ/G2M) compatible pin-controller. - "renesas,pfc-r8a7778": for R8A7778 (R-Car M1) compatible pin-controller. - "renesas,pfc-r8a7779": for R8A7779 (R-Car H1) compatible pin-controller. - "renesas,pfc-r8a7790": for R8A7790 (R-Car H2) compatible pin-controller.
Signature · 1 line
2.7.4
PATCH 1/7 dt-bindings: pinctrl: sh-pfc: Document r8a774a1 PFC support
Quoted 1 line · Biju Das
Document PFC support for the R8A774A1 SoC.
Thanks, I applied the series.
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 2/7 pinctrl: sh-pfc: r8a7796: Add R8A774A1 PFC support
In reply to Biju DasRenesas RZ/G2M (r8a774a1) is pin compatible with R-Car M3-W (r8a7796), however it doesn't have several automotive specific peripherals. Add an r8a7796 specific pin groups/functions along with common pin groups/functions for supporting both r8a7796 and r8a774a1 SoCs.
--- drivers/pinctrl/sh-pfc/Kconfig | 5 + drivers/pinctrl/sh-pfc/Makefile | 1 + drivers/pinctrl/sh-pfc/core.c | 6 + drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 837 ++++++++++++++++++----------------- drivers/pinctrl/sh-pfc/sh_pfc.h | 1 + 5 files changed, 453 insertions(+), 397 deletions(-)
drivers/pinctrl/sh-pfc/Kconfig +5 -0
@@ -49,6 +49,11 @@ config PINCTRL_PFC_R8A77470 depends on ARCH_R8A77470 select PINCTRL_SH_PFC +config PINCTRL_PFC_R8A774A1 + def_bool y + depends on ARCH_R8A774A1 + select PINCTRL_SH_PFC + config PINCTRL_PFC_R8A7778 def_bool y depends on ARCH_R8A7778
drivers/pinctrl/sh-pfc/Makefile +1 -0
@@ -7,6 +7,7 @@ obj-$(CONFIG_PINCTRL_PFC_R8A7740) += pfc-r8a7740.o obj-$(CONFIG_PINCTRL_PFC_R8A7743) += pfc-r8a7791.o obj-$(CONFIG_PINCTRL_PFC_R8A7745) += pfc-r8a7794.o obj-$(CONFIG_PINCTRL_PFC_R8A77470) += pfc-r8a77470.o +obj-$(CONFIG_PINCTRL_PFC_R8A774A1) += pfc-r8a7796.o obj-$(CONFIG_PINCTRL_PFC_R8A7778) += pfc-r8a7778.o obj-$(CONFIG_PINCTRL_PFC_R8A7779) += pfc-r8a7779.o obj-$(CONFIG_PINCTRL_PFC_R8A7790) += pfc-r8a7790.o
drivers/pinctrl/sh-pfc/core.c +6 -0
@@ -509,6 +509,12 @@ static const struct of_device_id sh_pfc_of_table[] = { .data = &r8a77470_pinmux_info, },#endif +#ifdef CONFIG_PINCTRL_PFC_R8A774A1 + { + .compatible = "renesas,pfc-r8a774a1", + .data = &r8a774a1_pinmux_info, + }, +#endif #ifdef CONFIG_PINCTRL_PFC_R8A7778 { .compatible = "renesas,pfc-r8a7778",
drivers/pinctrl/sh-pfc/pfc-r8a7796.c +440 -397
864 lines not on this page · raw message
drivers/pinctrl/sh-pfc/sh_pfc.h +1 -0
@@ -275,6 +275,7 @@ extern const struct sh_pfc_soc_info r8a7740_pinmux_info;extern const struct sh_pfc_soc_info r8a7743_pinmux_info;extern const struct sh_pfc_soc_info r8a7745_pinmux_info;extern const struct sh_pfc_soc_info r8a77470_pinmux_info; +extern const struct sh_pfc_soc_info r8a774a1_pinmux_info;extern const struct sh_pfc_soc_info r8a7778_pinmux_info;extern const struct sh_pfc_soc_info r8a7779_pinmux_info;extern const struct sh_pfc_soc_info r8a7790_pinmux_info;
Signature · 1 line
2.7.4
PATCH 3/7 dt-bindings: pinctrl: sh-pfc: Document r8a774c0 PFC support
In reply to Biju DasFrom: Fabrizio Castro <[email protected]>
Document PFC support for the R8A774C0 SoC.
--- Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt +1 -0
@@ -17,6 +17,7 @@ Required Properties: - "renesas,pfc-r8a7745": for R8A7745 (RZ/G1E) compatible pin-controller. - "renesas,pfc-r8a77470": for R8A77470 (RZ/G1C) compatible pin-controller. - "renesas,pfc-r8a774a1": for R8A774A1 (RZ/G2M) compatible pin-controller. + - "renesas,pfc-r8a774c0": for R8A774C0 (RZ/G2E) compatible pin-controller. - "renesas,pfc-r8a7778": for R8A7778 (R-Car M1) compatible pin-controller. - "renesas,pfc-r8a7779": for R8A7779 (R-Car H1) compatible pin-controller. - "renesas,pfc-r8a7790": for R8A7790 (R-Car H2) compatible pin-controller.
Signature · 1 line
2.7.4
PATCH 4/7 pinctrl: sh-pfc: r8a77990: Add PWM pins, groups and functions
In reply to Biju DasFrom: Takeshi Kihara <[email protected]>
This patch adds PWM{0,1,2,3,4,5,6} pins, groups and functions to the R8A77990 SoC.
--- drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 211 ++++++++++++++++++++++++++++++++++ 1 file changed, 211 insertions(+)
drivers/pinctrl/sh-pfc/pfc-r8a77990.c +211 -0
@@ -1507,6 +1507,157 @@ static const unsigned int i2c7_b_mux[] = { SCL7_B_MARK, SDA7_B_MARK, }; +/* - PWM0 --------------------------------------------------------------------*/ +static const unsigned int pwm0_a_pins[] = { +/* PWM */ +RCAR_GP_PIN (2 ,22 ), +}; + +static const unsigned int pwm0_a_mux[] = { +PWM0_A_MARK , +}; + +static const unsigned int pwm0_b_pins[] = { +/* PWM */ +RCAR_GP_PIN (6 ,3 ), +}; + +static const unsigned int pwm0_b_mux[] = { +PWM0_B_MARK , +}; + +/* - PWM1 --------------------------------------------------------------------*/ +static const unsigned int pwm1_a_pins[] = { +/* PWM */ +RCAR_GP_PIN (2 ,23 ), +}; + +static const unsigned int pwm1_a_mux[] = { +PWM1_A_MARK , +}; + +static const unsigned int pwm1_b_pins[] = { +/* PWM */ +RCAR_GP_PIN (6 ,4 ), +}; + +static const unsigned int pwm1_b_mux[] = { +PWM1_B_MARK , +}; + +/* - PWM2 --------------------------------------------------------------------*/ +static const unsigned int pwm2_a_pins[] = { +/* PWM */ +RCAR_GP_PIN (1 ,0 ), +}; + +static const unsigned int pwm2_a_mux[] = { +PWM2_A_MARK , +}; + +static const unsigned int pwm2_b_pins[] = { +/* PWM */ +RCAR_GP_PIN (1 ,4 ), +}; + +static const unsigned int pwm2_b_mux[] = { +PWM2_B_MARK , +}; + +static const unsigned int pwm2_c_pins[] = { +/* PWM */ +RCAR_GP_PIN (6 ,5 ), +}; + +static const unsigned int pwm2_c_mux[] = { +PWM2_C_MARK , +}; + +/* - PWM3 --------------------------------------------------------------------*/ +static const unsigned int pwm3_a_pins[] = { +/* PWM */ +RCAR_GP_PIN (1 ,1 ), +}; + +static const unsigned int pwm3_a_mux[] = { +PWM3_A_MARK , +}; + +static const unsigned int pwm3_b_pins[] = { +/* PWM */ +RCAR_GP_PIN (1 ,5 ), +}; + +static const unsigned int pwm3_b_mux[] = { +PWM3_B_MARK , +}; + +static const unsigned int pwm3_c_pins[] = { +/* PWM */ +RCAR_GP_PIN (6 ,6 ), +}; + +static const unsigned int pwm3_c_mux[] = { +PWM3_C_MARK , +}; + +/* - PWM4 --------------------------------------------------------------------*/ +static const unsigned int pwm4_a_pins[] = { +/* PWM */ +RCAR_GP_PIN (1 ,3 ), +}; + +static const unsigned int pwm4_a_mux[] = { +PWM4_A_MARK , +}; + +static const unsigned int pwm4_b_pins[] = { +/* PWM */ +RCAR_GP_PIN (6 ,7 ), +}; + +static const unsigned int pwm4_b_mux[] = { +PWM4_B_MARK , +}; + +/* - PWM5 --------------------------------------------------------------------*/ +static const unsigned int pwm5_a_pins[] = { +/* PWM */ +RCAR_GP_PIN (2 ,24 ), +}; + +static const unsigned int pwm5_a_mux[] = { +PWM5_A_MARK , +}; + +static const unsigned int pwm5_b_pins[] = { +/* PWM */ +RCAR_GP_PIN (6 ,10 ), +}; + +static const unsigned int pwm5_b_mux[] = { +PWM5_B_MARK , +}; + +/* - PWM6 --------------------------------------------------------------------*/ +static const unsigned int pwm6_a_pins[] = { +/* PWM */ +RCAR_GP_PIN (2 ,25 ), +}; + +static const unsigned int pwm6_a_mux[] = { +PWM6_A_MARK , +}; + +static const unsigned int pwm6_b_pins[] = { +/* PWM */ +RCAR_GP_PIN (6 ,11 ), +}; + +static const unsigned int pwm6_b_mux[] = { +PWM6_B_MARK , +}; +/* - SCIF0 ------------------------------------------------------------------ */ static const unsigned int scif0_data_a_pins[] = {/* RX, TX */
@@ -1854,6 +2005,22 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (i2c6_b),SH_PFC_PIN_GROUP (i2c7_a),SH_PFC_PIN_GROUP (i2c7_b), +SH_PFC_PIN_GROUP (pwm0_a), +SH_PFC_PIN_GROUP (pwm0_b), +SH_PFC_PIN_GROUP (pwm1_a), +SH_PFC_PIN_GROUP (pwm1_b), +SH_PFC_PIN_GROUP (pwm2_a), +SH_PFC_PIN_GROUP (pwm2_b), +SH_PFC_PIN_GROUP (pwm2_c), +SH_PFC_PIN_GROUP (pwm3_a), +SH_PFC_PIN_GROUP (pwm3_b), +SH_PFC_PIN_GROUP (pwm3_c), +SH_PFC_PIN_GROUP (pwm4_a), +SH_PFC_PIN_GROUP (pwm4_b), +SH_PFC_PIN_GROUP (pwm5_a), +SH_PFC_PIN_GROUP (pwm5_b), +SH_PFC_PIN_GROUP (pwm6_a), +SH_PFC_PIN_GROUP (pwm6_b),SH_PFC_PIN_GROUP (scif0_data_a),SH_PFC_PIN_GROUP (scif0_clk_a), SH_PFC_PIN_GROUP(scif0_ctrl_a),
@@ -1934,6 +2101,43 @@ static const char * const i2c7_groups[] = { "i2c7_b", }; +static const char *const pwm0_groups[] = { +"pwm0_a" , +"pwm0_b" , +}; + +static const char *const pwm1_groups[] = { +"pwm1_a" , +"pwm1_b" , +}; + +static const char *const pwm2_groups[] = { +"pwm2_a" , +"pwm2_b" , +"pwm2_c" , +}; + +static const char *const pwm3_groups[] = { +"pwm3_a" , +"pwm3_b" , +"pwm3_c" , +}; + +static const char *const pwm4_groups[] = { +"pwm4_a" , +"pwm4_b" , +}; + +static const char *const pwm5_groups[] = { +"pwm5_a" , +"pwm5_b" , +}; + +static const char *const pwm6_groups[] = { +"pwm6_a" , +"pwm6_b" , +}; +static const char *const scif0_groups[] = {"scif0_data_a" ,"scif0_clk_a" ,
@@ -2004,6 +2208,13 @@ static const struct sh_pfc_function pinmux_functions[] = {SH_PFC_FUNCTION (i2c5),SH_PFC_FUNCTION (i2c6),SH_PFC_FUNCTION (i2c7), +SH_PFC_FUNCTION (pwm0), +SH_PFC_FUNCTION (pwm1), +SH_PFC_FUNCTION (pwm2), +SH_PFC_FUNCTION (pwm3), +SH_PFC_FUNCTION (pwm4), +SH_PFC_FUNCTION (pwm5), +SH_PFC_FUNCTION (pwm6),SH_PFC_FUNCTION (scif0),SH_PFC_FUNCTION (scif1), SH_PFC_FUNCTION(scif2),
Signature · 1 line
2.7.4
PATCH 5/7 pinctrl: sh-pfc: r8a77990: Add DU pins, groups and function
In reply to Biju DasFrom: Laurent Pinchart <[email protected]>
This patch adds DU pins, groups and function for the R8A77990 (E3) SoC.
--- drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 110 ++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+)
drivers/pinctrl/sh-pfc/pfc-r8a77990.c +110 -0
@@ -1371,6 +1371,94 @@ static const unsigned int avb_avtp_capture_a_mux[] = { AVB_AVTP_CAPTURE_A_MARK, }; +/* - DU --------------------------------------------------------------------- */ +static const unsigned int du_rgb666_pins[] = { +/* R[7:2], G[7:2], B[7:2] */ +RCAR_GP_PIN (0 ,8 ),RCAR_GP_PIN (0 ,6 ),RCAR_GP_PIN (0 ,5 ), +RCAR_GP_PIN (0 ,3 ),RCAR_GP_PIN (0 ,2 ),RCAR_GP_PIN (0 ,0 ), +RCAR_GP_PIN (1 ,9 ),RCAR_GP_PIN (1 ,12 ),RCAR_GP_PIN (1 ,10 ), +RCAR_GP_PIN (1 ,4 ),RCAR_GP_PIN (0 ,15 ),RCAR_GP_PIN (0 ,11 ), +RCAR_GP_PIN (0 ,1 ),RCAR_GP_PIN (1 ,17 ),RCAR_GP_PIN (1 ,16 ), +RCAR_GP_PIN (1 ,15 ),RCAR_GP_PIN (1 ,14 ),RCAR_GP_PIN (1 ,13 ), +}; +static const unsigned int du_rgb666_mux[] = { +DU_DR7_MARK ,DU_DR6_MARK ,DU_DR5_MARK ,DU_DR4_MARK , +DU_DR3_MARK ,DU_DR2_MARK , +DU_DG7_MARK ,DU_DG6_MARK ,DU_DG5_MARK ,DU_DG4_MARK , +DU_DG3_MARK ,DU_DG2_MARK , +DU_DB7_MARK ,DU_DB6_MARK ,DU_DB5_MARK ,DU_DB4_MARK , +DU_DB3_MARK ,DU_DB2_MARK , +}; +static const unsigned int du_rgb888_pins[] = { +/* R[7:0], G[7:0], B[7:0] */ +RCAR_GP_PIN (0 ,8 ),RCAR_GP_PIN (0 ,6 ),RCAR_GP_PIN (0 ,5 ), +RCAR_GP_PIN (0 ,3 ),RCAR_GP_PIN (0 ,2 ),RCAR_GP_PIN (0 ,0 ), +RCAR_GP_PIN (1 ,22 ),RCAR_GP_PIN (1 ,21 ), +RCAR_GP_PIN (1 ,9 ),RCAR_GP_PIN (1 ,12 ),RCAR_GP_PIN (1 ,10 ), +RCAR_GP_PIN (1 ,4 ),RCAR_GP_PIN (0 ,15 ),RCAR_GP_PIN (0 ,11 ), +RCAR_GP_PIN (0 ,10 ),RCAR_GP_PIN (0 ,9 ), +RCAR_GP_PIN (0 ,1 ),RCAR_GP_PIN (1 ,17 ),RCAR_GP_PIN (1 ,16 ), +RCAR_GP_PIN (1 ,15 ),RCAR_GP_PIN (1 ,14 ),RCAR_GP_PIN (1 ,13 ), +RCAR_GP_PIN (1 ,19 ),RCAR_GP_PIN (1 ,18 ), +}; +static const unsigned int du_rgb888_mux[] = { +DU_DR7_MARK ,DU_DR6_MARK ,DU_DR5_MARK ,DU_DR4_MARK , +DU_DR3_MARK ,DU_DR2_MARK ,DU_DR1_MARK ,DU_DR0_MARK , +DU_DG7_MARK ,DU_DG6_MARK ,DU_DG5_MARK ,DU_DG4_MARK , +DU_DG3_MARK ,DU_DG2_MARK ,DU_DG1_MARK ,DU_DG0_MARK , +DU_DB7_MARK ,DU_DB6_MARK ,DU_DB5_MARK ,DU_DB4_MARK , +DU_DB3_MARK ,DU_DB2_MARK ,DU_DB1_MARK ,DU_DB0_MARK , +}; +static const unsigned int du_clk_in_0_pins[] = { +/* CLKIN0 */ +RCAR_GP_PIN (0 ,16 ), +}; +static const unsigned int du_clk_in_0_mux[] = { +DU_DOTCLKIN0_MARK +}; +static const unsigned int du_clk_in_1_pins[] = { +/* CLKIN1 */ +RCAR_GP_PIN (1 ,1 ), +}; +static const unsigned int du_clk_in_1_mux[] = { +DU_DOTCLKIN1_MARK +}; +static const unsigned int du_clk_out_0_pins[] = { +/* CLKOUT */ +RCAR_GP_PIN (1 ,3 ), +}; +static const unsigned int du_clk_out_0_mux[] = { +DU_DOTCLKOUT0_MARK +}; +static const unsigned int du_sync_pins[] = { +/* VSYNC, HSYNC */ +RCAR_GP_PIN (1 ,11 ),RCAR_GP_PIN (1 ,8 ), +}; +static const unsigned int du_sync_mux[] = { +DU_VSYNC_MARK ,DU_HSYNC_MARK +}; +static const unsigned int du_disp_cde_pins[] = { +/* DISP_CDE */ +RCAR_GP_PIN (1 ,1 ), +}; +static const unsigned int du_disp_cde_mux[] = { +DU_DISP_CDE_MARK , +}; +static const unsigned int du_cde_pins[] = { +/* CDE */ +RCAR_GP_PIN (1 ,0 ), +}; +static const unsigned int du_cde_mux[] = { +DU_CDE_MARK , +}; +static const unsigned int du_disp_pins[] = { +/* DISP */ +RCAR_GP_PIN (1 ,2 ), +}; +static const unsigned int du_disp_mux[] = { +DU_DISP_MARK , +}; +/* - I2C -------------------------------------------------------------------- */ static const unsigned int i2c1_a_pins[] = {/* SCL, SDA */
@@ -1990,6 +2078,15 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (avb_avtp_pps),SH_PFC_PIN_GROUP (avb_avtp_match_a),SH_PFC_PIN_GROUP (avb_avtp_capture_a), +SH_PFC_PIN_GROUP (du_rgb666), +SH_PFC_PIN_GROUP (du_rgb888), +SH_PFC_PIN_GROUP (du_clk_in_0), +SH_PFC_PIN_GROUP (du_clk_in_1), +SH_PFC_PIN_GROUP (du_clk_out_0), +SH_PFC_PIN_GROUP (du_sync), +SH_PFC_PIN_GROUP (du_disp_cde), +SH_PFC_PIN_GROUP (du_cde), +SH_PFC_PIN_GROUP (du_disp),SH_PFC_PIN_GROUP (i2c1_a),SH_PFC_PIN_GROUP (i2c1_b), SH_PFC_PIN_GROUP(i2c1_c),
@@ -2068,6 +2165,18 @@ static const char * const avb_groups[] = { "avb_avtp_capture_a", }; +static const char *const du_groups[] = { +"du_rgb666" , +"du_rgb888" , +"du_clk_in_0" , +"du_clk_in_1" , +"du_clk_out_0" , +"du_sync" , +"du_disp_cde" , +"du_cde" , +"du_disp" , +}; +static const char *const i2c1_groups[] = {"i2c1_a" ,"i2c1_b" ,
@@ -2202,6 +2311,7 @@ static const char * const usb30_groups[] = {static const struct sh_pfc_function pinmux_functions[] = {SH_PFC_FUNCTION (avb), +SH_PFC_FUNCTION (du),SH_PFC_FUNCTION (i2c1),SH_PFC_FUNCTION (i2c2),SH_PFC_FUNCTION (i2c4),
Signature · 1 line
2.7.4
PATCH 6/7 pinctrl: sh-pfc: r8a77990: Add MSIOF pins, groups and functions
In reply to Biju DasFrom: Takeshi Kihara <[email protected]>
This patch adds MSIOF{0,1,2,3} pins, groups and functions to the R8A77990 SoC.
--- drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 405 ++++++++++++++++++++++++++++++++++ 1 file changed, 405 insertions(+)
drivers/pinctrl/sh-pfc/pfc-r8a77990.c +405 -0
@@ -1595,6 +1595,325 @@ static const unsigned int i2c7_b_mux[] = { SCL7_B_MARK, SDA7_B_MARK, }; +/* - MSIOF0 ----------------------------------------------------------------- */ +static const unsigned int msiof0_clk_pins[] = { +/* SCK */ +RCAR_GP_PIN (5 ,10 ), +}; + +static const unsigned int msiof0_clk_mux[] = { +MSIOF0_SCK_MARK , +}; + +static const unsigned int msiof0_sync_pins[] = { +/* SYNC */ +RCAR_GP_PIN (5 ,13 ), +}; + +static const unsigned int msiof0_sync_mux[] = { +MSIOF0_SYNC_MARK , +}; + +static const unsigned int msiof0_ss1_pins[] = { +/* SS1 */ +RCAR_GP_PIN (5 ,14 ), +}; + +static const unsigned int msiof0_ss1_mux[] = { +MSIOF0_SS1_MARK , +}; + +static const unsigned int msiof0_ss2_pins[] = { +/* SS2 */ +RCAR_GP_PIN (5 ,15 ), +}; + +static const unsigned int msiof0_ss2_mux[] = { +MSIOF0_SS2_MARK , +}; + +static const unsigned int msiof0_txd_pins[] = { +/* TXD */ +RCAR_GP_PIN (5 ,12 ), +}; + +static const unsigned int msiof0_txd_mux[] = { +MSIOF0_TXD_MARK , +}; + +static const unsigned int msiof0_rxd_pins[] = { +/* RXD */ +RCAR_GP_PIN (5 ,11 ), +}; + +static const unsigned int msiof0_rxd_mux[] = { +MSIOF0_RXD_MARK , +}; + +/* - MSIOF1 ----------------------------------------------------------------- */ +static const unsigned int msiof1_clk_pins[] = { +/* SCK */ +RCAR_GP_PIN (1 ,19 ), +}; + +static const unsigned int msiof1_clk_mux[] = { +MSIOF1_SCK_MARK , +}; + +static const unsigned int msiof1_sync_pins[] = { +/* SYNC */ +RCAR_GP_PIN (1 ,16 ), +}; + +static const unsigned int msiof1_sync_mux[] = { +MSIOF1_SYNC_MARK , +}; + +static const unsigned int msiof1_ss1_pins[] = { +/* SS1 */ +RCAR_GP_PIN (1 ,14 ), +}; + +static const unsigned int msiof1_ss1_mux[] = { +MSIOF1_SS1_MARK , +}; + +static const unsigned int msiof1_ss2_pins[] = { +/* SS2 */ +RCAR_GP_PIN (1 ,15 ), +}; + +static const unsigned int msiof1_ss2_mux[] = { +MSIOF1_SS2_MARK , +}; + +static const unsigned int msiof1_txd_pins[] = { +/* TXD */ +RCAR_GP_PIN (1 ,18 ), +}; + +static const unsigned int msiof1_txd_mux[] = { +MSIOF1_TXD_MARK , +}; + +static const unsigned int msiof1_rxd_pins[] = { +/* RXD */ +RCAR_GP_PIN (1 ,17 ), +}; + +static const unsigned int msiof1_rxd_mux[] = { +MSIOF1_RXD_MARK , +}; + +/* - MSIOF2 ----------------------------------------------------------------- */ +static const unsigned int msiof2_clk_a_pins[] = { +/* SCK */ +RCAR_GP_PIN (0 ,8 ), +}; + +static const unsigned int msiof2_clk_a_mux[] = { +MSIOF2_SCK_A_MARK , +}; + +static const unsigned int msiof2_sync_a_pins[] = { +/* SYNC */ +RCAR_GP_PIN (0 ,9 ), +}; + +static const unsigned int msiof2_sync_a_mux[] = { +MSIOF2_SYNC_A_MARK , +}; + +static const unsigned int msiof2_ss1_a_pins[] = { +/* SS1 */ +RCAR_GP_PIN (0 ,15 ), +}; + +static const unsigned int msiof2_ss1_a_mux[] = { +MSIOF2_SS1_A_MARK , +}; + +static const unsigned int msiof2_ss2_a_pins[] = { +/* SS2 */ +RCAR_GP_PIN (0 ,14 ), +}; + +static const unsigned int msiof2_ss2_a_mux[] = { +MSIOF2_SS2_A_MARK , +}; + +static const unsigned int msiof2_txd_a_pins[] = { +/* TXD */ +RCAR_GP_PIN (0 ,11 ), +}; + +static const unsigned int msiof2_txd_a_mux[] = { +MSIOF2_TXD_A_MARK , +}; + +static const unsigned int msiof2_rxd_a_pins[] = { +/* RXD */ +RCAR_GP_PIN (0 ,10 ), +}; + +static const unsigned int msiof2_rxd_a_mux[] = { +MSIOF2_RXD_A_MARK , +}; + +static const unsigned int msiof2_clk_b_pins[] = { +/* SCK */ +RCAR_GP_PIN (1 ,13 ), +}; + +static const unsigned int msiof2_clk_b_mux[] = { +MSIOF2_SCK_B_MARK , +}; + +static const unsigned int msiof2_sync_b_pins[] = { +/* SYNC */ +RCAR_GP_PIN (1 ,10 ), +}; + +static const unsigned int msiof2_sync_b_mux[] = { +MSIOF2_SYNC_B_MARK , +}; + +static const unsigned int msiof2_ss1_b_pins[] = { +/* SS1 */ +RCAR_GP_PIN (1 ,16 ), +}; + +static const unsigned int msiof2_ss1_b_mux[] = { +MSIOF2_SS1_B_MARK , +}; + +static const unsigned int msiof2_ss2_b_pins[] = { +/* SS2 */ +RCAR_GP_PIN (1 ,12 ), +}; + +static const unsigned int msiof2_ss2_b_mux[] = { +MSIOF2_SS2_B_MARK , +}; + +static const unsigned int msiof2_txd_b_pins[] = { +/* TXD */ +RCAR_GP_PIN (1 ,15 ), +}; + +static const unsigned int msiof2_txd_b_mux[] = { +MSIOF2_TXD_B_MARK , +}; + +static const unsigned int msiof2_rxd_b_pins[] = { +/* RXD */ +RCAR_GP_PIN (1 ,14 ), +}; + +static const unsigned int msiof2_rxd_b_mux[] = { +MSIOF2_RXD_B_MARK , +}; + +/* - MSIOF3 ----------------------------------------------------------------- */ +static const unsigned int msiof3_clk_a_pins[] = { +/* SCK */ +RCAR_GP_PIN (0 ,0 ), +}; + +static const unsigned int msiof3_clk_a_mux[] = { +MSIOF3_SCK_A_MARK , +}; + +static const unsigned int msiof3_sync_a_pins[] = { +/* SYNC */ +RCAR_GP_PIN (0 ,1 ), +}; + +static const unsigned int msiof3_sync_a_mux[] = { +MSIOF3_SYNC_A_MARK , +}; + +static const unsigned int msiof3_ss1_a_pins[] = { +/* SS1 */ +RCAR_GP_PIN (0 ,15 ), +}; + +static const unsigned int msiof3_ss1_a_mux[] = { +MSIOF3_SS1_A_MARK , +}; + +static const unsigned int msiof3_ss2_a_pins[] = { +/* SS2 */ +RCAR_GP_PIN (0 ,4 ), +}; + +static const unsigned int msiof3_ss2_a_mux[] = { +MSIOF3_SS2_A_MARK , +}; + +static const unsigned int msiof3_txd_a_pins[] = { +/* TXD */ +RCAR_GP_PIN (0 ,3 ), +}; + +static const unsigned int msiof3_txd_a_mux[] = { +MSIOF3_TXD_A_MARK , +}; + +static const unsigned int msiof3_rxd_a_pins[] = { +/* RXD */ +RCAR_GP_PIN (0 ,2 ), +}; + +static const unsigned int msiof3_rxd_a_mux[] = { +MSIOF3_RXD_A_MARK , +}; + +static const unsigned int msiof3_clk_b_pins[] = { +/* SCK */ +RCAR_GP_PIN (1 ,5 ), +}; + +static const unsigned int msiof3_clk_b_mux[] = { +MSIOF3_SCK_B_MARK , +}; + +static const unsigned int msiof3_sync_b_pins[] = { +/* SYNC */ +RCAR_GP_PIN (1 ,4 ), +}; + +static const unsigned int msiof3_sync_b_mux[] = { +MSIOF3_SYNC_B_MARK , +}; + +static const unsigned int msiof3_ss1_b_pins[] = { +/* SS1 */ +RCAR_GP_PIN (1 ,0 ), +}; + +static const unsigned int msiof3_ss1_b_mux[] = { +MSIOF3_SS1_B_MARK , +}; + +static const unsigned int msiof3_txd_b_pins[] = { +/* TXD */ +RCAR_GP_PIN (1 ,7 ), +}; + +static const unsigned int msiof3_txd_b_mux[] = { +MSIOF3_TXD_B_MARK , +}; + +static const unsigned int msiof3_rxd_b_pins[] = { +/* RXD */ +RCAR_GP_PIN (1 ,6 ), +}; + +static const unsigned int msiof3_rxd_b_mux[] = { +MSIOF3_RXD_B_MARK , +}; +/* - PWM0 --------------------------------------------------------------------*/ static const unsigned int pwm0_a_pins[] = {/* PWM */
@@ -2102,6 +2421,41 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (i2c6_b),SH_PFC_PIN_GROUP (i2c7_a),SH_PFC_PIN_GROUP (i2c7_b), +SH_PFC_PIN_GROUP (msiof0_clk), +SH_PFC_PIN_GROUP (msiof0_sync), +SH_PFC_PIN_GROUP (msiof0_ss1), +SH_PFC_PIN_GROUP (msiof0_ss2), +SH_PFC_PIN_GROUP (msiof0_txd), +SH_PFC_PIN_GROUP (msiof0_rxd), +SH_PFC_PIN_GROUP (msiof1_clk), +SH_PFC_PIN_GROUP (msiof1_sync), +SH_PFC_PIN_GROUP (msiof1_ss1), +SH_PFC_PIN_GROUP (msiof1_ss2), +SH_PFC_PIN_GROUP (msiof1_txd), +SH_PFC_PIN_GROUP (msiof1_rxd), +SH_PFC_PIN_GROUP (msiof2_clk_a), +SH_PFC_PIN_GROUP (msiof2_sync_a), +SH_PFC_PIN_GROUP (msiof2_ss1_a), +SH_PFC_PIN_GROUP (msiof2_ss2_a), +SH_PFC_PIN_GROUP (msiof2_txd_a), +SH_PFC_PIN_GROUP (msiof2_rxd_a), +SH_PFC_PIN_GROUP (msiof2_clk_b), +SH_PFC_PIN_GROUP (msiof2_sync_b), +SH_PFC_PIN_GROUP (msiof2_ss1_b), +SH_PFC_PIN_GROUP (msiof2_ss2_b), +SH_PFC_PIN_GROUP (msiof2_txd_b), +SH_PFC_PIN_GROUP (msiof2_rxd_b), +SH_PFC_PIN_GROUP (msiof3_clk_a), +SH_PFC_PIN_GROUP (msiof3_sync_a), +SH_PFC_PIN_GROUP (msiof3_ss1_a), +SH_PFC_PIN_GROUP (msiof3_ss2_a), +SH_PFC_PIN_GROUP (msiof3_txd_a), +SH_PFC_PIN_GROUP (msiof3_rxd_a), +SH_PFC_PIN_GROUP (msiof3_clk_b), +SH_PFC_PIN_GROUP (msiof3_sync_b), +SH_PFC_PIN_GROUP (msiof3_ss1_b), +SH_PFC_PIN_GROUP (msiof3_txd_b), +SH_PFC_PIN_GROUP (msiof3_rxd_b),SH_PFC_PIN_GROUP (pwm0_a),SH_PFC_PIN_GROUP (pwm0_b), SH_PFC_PIN_GROUP(pwm1_a),
@@ -2210,6 +2564,53 @@ static const char * const i2c7_groups[] = { "i2c7_b", }; +static const char *const msiof0_groups[] = { +"msiof0_clk" , +"msiof0_sync" , +"msiof0_ss1" , +"msiof0_ss2" , +"msiof0_txd" , +"msiof0_rxd" , +}; + +static const char *const msiof1_groups[] = { +"msiof1_clk" , +"msiof1_sync" , +"msiof1_ss1" , +"msiof1_ss2" , +"msiof1_txd" , +"msiof1_rxd" , +}; + +static const char *const msiof2_groups[] = { +"msiof2_clk_a" , +"msiof2_sync_a" , +"msiof2_ss1_a" , +"msiof2_ss2_a" , +"msiof2_txd_a" , +"msiof2_rxd_a" , +"msiof2_clk_b" , +"msiof2_sync_b" , +"msiof2_ss1_b" , +"msiof2_ss2_b" , +"msiof2_txd_b" , +"msiof2_rxd_b" , +}; + +static const char *const msiof3_groups[] = { +"msiof3_clk_a" , +"msiof3_sync_a" , +"msiof3_ss1_a" , +"msiof3_ss2_a" , +"msiof3_txd_a" , +"msiof3_rxd_a" , +"msiof3_clk_b" , +"msiof3_sync_b" , +"msiof3_ss1_b" , +"msiof3_txd_b" , +"msiof3_rxd_b" , +}; +static const char *const pwm0_groups[] = {"pwm0_a" ,"pwm0_b" ,
@@ -2318,6 +2719,10 @@ static const struct sh_pfc_function pinmux_functions[] = {SH_PFC_FUNCTION (i2c5),SH_PFC_FUNCTION (i2c6),SH_PFC_FUNCTION (i2c7), +SH_PFC_FUNCTION (msiof0), +SH_PFC_FUNCTION (msiof1), +SH_PFC_FUNCTION (msiof2), +SH_PFC_FUNCTION (msiof3),SH_PFC_FUNCTION (pwm0),SH_PFC_FUNCTION (pwm1), SH_PFC_FUNCTION(pwm2),
Signature · 1 line
2.7.4
PATCH 7/7 pinctrl: sh-pfc: r8a77990: Add R8A774C0 PFC support
In reply to Biju DasFrom: Fabrizio Castro <[email protected]>
Renesas RZ/G2E (a.k.a. r8a774c0) is pin compatible with R-Car E3 (a.k.a. r8a77990), however it doesn't have several automotive specific peripherals. Add a r8a77990 specific pin groups/functions along with common pin groups/functions for supporting both r8a77990 and r8a774c0 SoCs.
--- drivers/pinctrl/sh-pfc/Kconfig | 5 + drivers/pinctrl/sh-pfc/Makefile | 1 + drivers/pinctrl/sh-pfc/core.c | 6 + drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 339 +++++++++++++++++++--------------- drivers/pinctrl/sh-pfc/sh_pfc.h | 1 + 5 files changed, 201 insertions(+), 151 deletions(-)
drivers/pinctrl/sh-pfc/Kconfig +5 -0
@@ -54,6 +54,11 @@ config PINCTRL_PFC_R8A774A1 depends on ARCH_R8A774A1 select PINCTRL_SH_PFC +config PINCTRL_PFC_R8A774C0 + def_bool y + depends on ARCH_R8A774C0 + select PINCTRL_SH_PFC + config PINCTRL_PFC_R8A7778 def_bool y depends on ARCH_R8A7778
drivers/pinctrl/sh-pfc/Makefile +1 -0
@@ -8,6 +8,7 @@ obj-$(CONFIG_PINCTRL_PFC_R8A7743) += pfc-r8a7791.o obj-$(CONFIG_PINCTRL_PFC_R8A7745) += pfc-r8a7794.o obj-$(CONFIG_PINCTRL_PFC_R8A77470) += pfc-r8a77470.o obj-$(CONFIG_PINCTRL_PFC_R8A774A1) += pfc-r8a7796.o +obj-$(CONFIG_PINCTRL_PFC_R8A774C0) += pfc-r8a77990.o obj-$(CONFIG_PINCTRL_PFC_R8A7778) += pfc-r8a7778.o obj-$(CONFIG_PINCTRL_PFC_R8A7779) += pfc-r8a7779.o obj-$(CONFIG_PINCTRL_PFC_R8A7790) += pfc-r8a7790.o
drivers/pinctrl/sh-pfc/core.c +6 -0
@@ -515,6 +515,12 @@ static const struct of_device_id sh_pfc_of_table[] = { .data = &r8a774a1_pinmux_info, },#endif +#ifdef CONFIG_PINCTRL_PFC_R8A774C0 + { + .compatible = "renesas,pfc-r8a774c0", + .data = &r8a774c0_pinmux_info, + }, +#endif #ifdef CONFIG_PINCTRL_PFC_R8A7778 { .compatible = "renesas,pfc-r8a7778",
drivers/pinctrl/sh-pfc/pfc-r8a77990.c +188 -151
366 lines not on this page · raw message
drivers/pinctrl/sh-pfc/sh_pfc.h +1 -0
@@ -276,6 +276,7 @@ extern const struct sh_pfc_soc_info r8a7743_pinmux_info;extern const struct sh_pfc_soc_info r8a7745_pinmux_info;extern const struct sh_pfc_soc_info r8a77470_pinmux_info;extern const struct sh_pfc_soc_info r8a774a1_pinmux_info; +extern const struct sh_pfc_soc_info r8a774c0_pinmux_info;extern const struct sh_pfc_soc_info r8a7778_pinmux_info;extern const struct sh_pfc_soc_info r8a7779_pinmux_info;extern const struct sh_pfc_soc_info r8a7790_pinmux_info;
Signature · 1 line
2.7.4