pinctrl: renesas: r8a7799[05]: Add RPC pins, groups, and functions
Subsystems (3)
Geert Uytterhoeven
maintainercover pinctrl: renesas: r8a7799[05]: Add RPC pins, groups, and functions
Hi Linus,
This patch series adds support for the various pins, groups, and functions used by the SPI Multi I/O Bus Controller (RPC-IF) on the R-Car E3 and D3, and RZ/G2E SoCs.
It has been tested using HyperFlash on the Ebisu-4D and Draak development boards.
I intend to queue this in renesas-pinctrl for v5.19.
Thanks for your comments!
Geert Uytterhoeven (2):
pinctrl: renesas: r8a77990: Add RPC pins, groups, and functions
pinctrl: renesas: r8a77995: Add QSPI and RPC pins, groups, and
functions
drivers/pinctrl/renesas/pfc-r8a77990.c | 81 +++++++++++++++------ drivers/pinctrl/renesas/pfc-r8a77995.c | 98 ++++++++++++++++++++++++++ 2 files changed, 159 insertions(+), 20 deletions(-)
Signature · 12 lines
2.25.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus TorvaldsGeert Uytterhoeven
maintainerPATCH 1/2 pinctrl: renesas: r8a77990: Add RPC pins, groups, and functions
Add pins, groups, and functions for the SPI Multi I/O Bus Controller (RPC-IF) to the R8A77990 PFC driver. They are to be used when an Octal-SPI Flash or HyperFlash is connected.
Redefine the QSPI[01] pin groups using the RPC DQ[0:7] pin data, to save memory.
--- drivers/pinctrl/renesas/pfc-r8a77990.c | 81 +++++++++++++++++++------- 1 file changed, 61 insertions(+), 20 deletions(-)
drivers/pinctrl/renesas/pfc-r8a77990.c +61 -20
@@ -2827,16 +2827,6 @@ static const unsigned int qspi0_ctrl_pins[] = {static const unsigned int qspi0_ctrl_mux[] = {QSPI0_SPCLK_MARK ,QSPI0_SSL_MARK , }; -static const unsigned int qspi0_data_pins[] = { -/* QSPI0_MOSI_IO0, QSPI0_MISO_IO1 */ -RCAR_GP_PIN (2 ,1 ),RCAR_GP_PIN (2 ,2 ), -/* QSPI0_IO2, QSPI0_IO3 */ -RCAR_GP_PIN (2 ,3 ),RCAR_GP_PIN (2 ,4 ), -}; -static const unsigned int qspi0_data_mux[] = { -QSPI0_MOSI_IO0_MARK ,QSPI0_MISO_IO1_MARK , -QSPI0_IO2_MARK ,QSPI0_IO3_MARK , -};/* - QSPI1 ------------------------------------------------------------------ */ static const unsigned int qspi1_ctrl_pins[] = {/* QSPI1_SPCLK, QSPI1_SSL */
@@ -2845,16 +2835,51 @@ static const unsigned int qspi1_ctrl_pins[] = {static const unsigned int qspi1_ctrl_mux[] = {QSPI1_SPCLK_MARK ,QSPI1_SSL_MARK , }; -static const unsigned int qspi1_data_pins[] = { -/* QSPI1_MOSI_IO0, QSPI1_MISO_IO1 */ + +/* - RPC -------------------------------------------------------------------- */ +static const unsigned int rpc_clk_pins[] = { +/* Octal-SPI flash: C/SCLK */ +/* HyperFlash: CK, CK# */ +RCAR_GP_PIN (2 ,0 ),RCAR_GP_PIN (2 ,6 ), +}; +static const unsigned int rpc_clk_mux[] = { +QSPI0_SPCLK_MARK ,QSPI1_SPCLK_MARK , +}; +static const unsigned int rpc_ctrl_pins[] = { +/* Octal-SPI flash: S#/CS, DQS */ +/* HyperFlash: CS#, RDS */ +RCAR_GP_PIN (2 ,5 ),RCAR_GP_PIN (2 ,11 ), +}; +static const unsigned int rpc_ctrl_mux[] = { +QSPI0_SSL_MARK ,QSPI1_SSL_MARK , +}; +static const unsigned int rpc_data_pins[] = { +/* DQ[0:7] */ +RCAR_GP_PIN (2 ,1 ),RCAR_GP_PIN (2 ,2 ), +RCAR_GP_PIN (2 ,3 ),RCAR_GP_PIN (2 ,4 ),RCAR_GP_PIN (2 ,7 ),RCAR_GP_PIN (2 ,8 ), -/* QSPI1_IO2, QSPI1_IO3 */ RCAR_GP_PIN (2 ,9 ),RCAR_GP_PIN (2 ,10 ), }; -static const unsigned int qspi1_data_mux[] = { +static const unsigned int rpc_data_mux[] = { +QSPI0_MOSI_IO0_MARK ,QSPI0_MISO_IO1_MARK , +QSPI0_IO2_MARK ,QSPI0_IO3_MARK ,QSPI1_MOSI_IO0_MARK ,QSPI1_MISO_IO1_MARK ,QSPI1_IO2_MARK ,QSPI1_IO3_MARK , }; +static const unsigned int rpc_reset_pins[] = { +/* RPC_RESET# */ +RCAR_GP_PIN (2 ,13 ), +}; +static const unsigned int rpc_reset_mux[] = { +RPC_RESET_N_MARK , +}; +static const unsigned int rpc_int_pins[] = { +/* RPC_INT# */ +RCAR_GP_PIN (2 ,12 ), +}; +static const unsigned int rpc_int_mux[] = { +RPC_INT_N_MARK , +};/* - SCIF0 ------------------------------------------------------------------ */ static const unsigned int scif0_data_a_pins[] = {
@@ -3758,7 +3783,7 @@ static const unsigned int vin5_clk_b_mux[] = { }; static const struct { - struct sh_pfc_pin_group common[255]; + struct sh_pfc_pin_group common[261]; #ifdef CONFIG_PINCTRL_PFC_R8A77990 struct sh_pfc_pin_group automotive[22]; #endif
@@ -3907,11 +3932,17 @@ static const struct {SH_PFC_PIN_GROUP (pwm6_a),SH_PFC_PIN_GROUP (pwm6_b),SH_PFC_PIN_GROUP (qspi0_ctrl), -BUS_DATA_PIN_GROUP (qspi0_data,2 ), -BUS_DATA_PIN_GROUP (qspi0_data,4 ), +SH_PFC_PIN_GROUP_SUBSET (qspi0_data2, rpc_data,0 ,2 ), +SH_PFC_PIN_GROUP_SUBSET (qspi0_data4, rpc_data,0 ,4 ),SH_PFC_PIN_GROUP (qspi1_ctrl), -BUS_DATA_PIN_GROUP (qspi1_data,2 ), -BUS_DATA_PIN_GROUP (qspi1_data,4 ), +SH_PFC_PIN_GROUP_SUBSET (qspi1_data2, rpc_data,4 ,2 ), +SH_PFC_PIN_GROUP_SUBSET (qspi1_data4, rpc_data,4 ,4 ), +BUS_DATA_PIN_GROUP (rpc_clk,1 ), +BUS_DATA_PIN_GROUP (rpc_clk,2 ), +SH_PFC_PIN_GROUP (rpc_ctrl), +SH_PFC_PIN_GROUP (rpc_data), +SH_PFC_PIN_GROUP (rpc_reset), +SH_PFC_PIN_GROUP (rpc_int),SH_PFC_PIN_GROUP (scif0_data_a),SH_PFC_PIN_GROUP (scif0_clk_a), SH_PFC_PIN_GROUP(scif0_ctrl_a),
@@ -4336,6 +4367,15 @@ static const char * const qspi1_groups[] = { "qspi1_data4", }; +static const char *const rpc_groups[] = { +"rpc_clk1" , +"rpc_clk2" , +"rpc_ctrl" , +"rpc_data" , +"rpc_reset" , +"rpc_int" , +}; +static const char *const scif0_groups[] = {"scif0_data_a" ,"scif0_clk_a" ,
@@ -4492,7 +4532,7 @@ static const char * const vin5_groups[] = { }; static const struct { - struct sh_pfc_function common[49]; + struct sh_pfc_function common[50]; #ifdef CONFIG_PINCTRL_PFC_R8A77990 struct sh_pfc_function automotive[5]; #endif
@@ -4531,6 +4571,7 @@ static const struct {SH_PFC_FUNCTION (pwm6),SH_PFC_FUNCTION (qspi0),SH_PFC_FUNCTION (qspi1), +SH_PFC_FUNCTION (rpc),SH_PFC_FUNCTION (scif0),SH_PFC_FUNCTION (scif1), SH_PFC_FUNCTION(scif2),
Signature · 1 line
2.25.1
Re: [PATCH 1/2] pinctrl: renesas: r8a77990: Add RPC pins, groups, and functions
Quoted 8 lines · Geert Uytterhoeven
Add pins, groups, and functions for the SPI Multi I/O Bus Controller (RPC-IF) to the R8A77990 PFC driver. They are to be used when an Octal-SPI Flash or HyperFlash is connected.
Redefine the QSPI[01] pin groups using the RPC DQ[0:7] pin data, to save memory.
Signed-off-by Geert Uytterhoeven <[email protected]>
I trust you with the pinctrl patches :)
Geert Uytterhoeven
maintainerPATCH 2/2 pinctrl: renesas: r8a77995: Add QSPI and RPC pins, groups, and functions
In reply to Geert UytterhoevenAdd pins, groups, and functions for the SPI Multi I/O Bus Controller (RPC-IF) to the R8A77995 PFC driver. They are to be used when a QSPI Flash, Octal-SPI Flash, or HyperFlash is connected.
--- drivers/pinctrl/renesas/pfc-r8a77995.c | 98 ++++++++++++++++++++++++++ 1 file changed, 98 insertions(+)
drivers/pinctrl/renesas/pfc-r8a77995.c +98 -0
@@ -1682,6 +1682,68 @@ static const unsigned int pwm3_c_mux[] = { PWM3_C_MARK, }; +/* - QSPI0 ------------------------------------------------------------------ */ +static const unsigned int qspi0_ctrl_pins[] = { +/* QSPI0_SPCLK, QSPI0_SSL */ +RCAR_GP_PIN (6 ,0 ),RCAR_GP_PIN (6 ,5 ), +}; +static const unsigned int qspi0_ctrl_mux[] = { +QSPI0_SPCLK_MARK ,QSPI0_SSL_MARK , +}; +/* - QSPI1 ------------------------------------------------------------------ */ +static const unsigned int qspi1_ctrl_pins[] = { +/* QSPI1_SPCLK, QSPI1_SSL */ +RCAR_GP_PIN (6 ,6 ),RCAR_GP_PIN (6 ,11 ), +}; +static const unsigned int qspi1_ctrl_mux[] = { +QSPI1_SPCLK_MARK ,QSPI1_SSL_MARK , +}; + +/* - RPC -------------------------------------------------------------------- */ +static const unsigned int rpc_clk_pins[] = { +/* Octal-SPI flash: C/SCLK */ +/* HyperFlash: CK, CK# */ +RCAR_GP_PIN (6 ,0 ),RCAR_GP_PIN (6 ,6 ), +}; +static const unsigned int rpc_clk_mux[] = { +QSPI0_SPCLK_MARK ,QSPI1_SPCLK_MARK , +}; +static const unsigned int rpc_ctrl_pins[] = { +/* Octal-SPI flash: S#/CS, DQS */ +/* HyperFlash: CS#, RDS */ +RCAR_GP_PIN (6 ,5 ),RCAR_GP_PIN (6 ,11 ), +}; +static const unsigned int rpc_ctrl_mux[] = { +QSPI0_SSL_MARK ,QSPI1_SSL_MARK , +}; +static const unsigned int rpc_data_pins[] = { +/* DQ[0:7] */ +RCAR_GP_PIN (6 ,1 ),RCAR_GP_PIN (6 ,2 ), +RCAR_GP_PIN (6 ,3 ),RCAR_GP_PIN (6 ,4 ), +RCAR_GP_PIN (6 ,7 ),RCAR_GP_PIN (6 ,8 ), +RCAR_GP_PIN (6 ,9 ),RCAR_GP_PIN (6 ,10 ), +}; +static const unsigned int rpc_data_mux[] = { +QSPI0_MOSI_IO0_MARK ,QSPI0_MISO_IO1_MARK , +QSPI0_IO2_MARK ,QSPI0_IO3_MARK , +QSPI1_MOSI_IO0_MARK ,QSPI1_MISO_IO1_MARK , +QSPI1_IO2_MARK ,QSPI1_IO3_MARK , +}; +static const unsigned int rpc_reset_pins[] = { +/* RPC_RESET# */ +RCAR_GP_PIN (6 ,12 ), +}; +static const unsigned int rpc_reset_mux[] = { +RPC_RESET_N_MARK , +}; +static const unsigned int rpc_int_pins[] = { +/* RPC_INT# */ +RCAR_GP_PIN (6 ,13 ), +}; +static const unsigned int rpc_int_mux[] = { +RPC_INT_N_MARK , +}; +/* - SCIF0 ------------------------------------------------------------------ */ static const unsigned int scif0_data_a_pins[] = {/* RX, TX */
@@ -2085,6 +2147,18 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (pwm3_a),SH_PFC_PIN_GROUP (pwm3_b),SH_PFC_PIN_GROUP (pwm3_c), +SH_PFC_PIN_GROUP (qspi0_ctrl), +SH_PFC_PIN_GROUP_SUBSET (qspi0_data2, rpc_data,0 ,2 ), +SH_PFC_PIN_GROUP_SUBSET (qspi0_data4, rpc_data,0 ,4 ), +SH_PFC_PIN_GROUP (qspi1_ctrl), +SH_PFC_PIN_GROUP_SUBSET (qspi1_data2, rpc_data,4 ,2 ), +SH_PFC_PIN_GROUP_SUBSET (qspi1_data4, rpc_data,4 ,4 ), +BUS_DATA_PIN_GROUP (rpc_clk,1 ), +BUS_DATA_PIN_GROUP (rpc_clk,2 ), +SH_PFC_PIN_GROUP (rpc_ctrl), +SH_PFC_PIN_GROUP (rpc_data), +SH_PFC_PIN_GROUP (rpc_reset), +SH_PFC_PIN_GROUP (rpc_int),SH_PFC_PIN_GROUP (scif0_data_a),SH_PFC_PIN_GROUP (scif0_clk_a), SH_PFC_PIN_GROUP(scif0_data_b),
@@ -2277,6 +2351,27 @@ static const char * const pwm3_groups[] = { "pwm3_c", }; +static const char *const qspi0_groups[] = { +"qspi0_ctrl" , +"qspi0_data2" , +"qspi0_data4" , +}; + +static const char *const qspi1_groups[] = { +"qspi1_ctrl" , +"qspi1_data2" , +"qspi1_data4" , +}; + +static const char *const rpc_groups[] = { +"rpc_clk1" , +"rpc_clk2" , +"rpc_ctrl" , +"rpc_data" , +"rpc_reset" , +"rpc_int" , +}; +static const char *const scif0_groups[] = {"scif0_data_a" ,"scif0_clk_a" ,
@@ -2373,6 +2468,9 @@ static const struct sh_pfc_function pinmux_functions[] = {SH_PFC_FUNCTION (pwm1),SH_PFC_FUNCTION (pwm2),SH_PFC_FUNCTION (pwm3), +SH_PFC_FUNCTION (qspi0), +SH_PFC_FUNCTION (qspi1), +SH_PFC_FUNCTION (rpc),SH_PFC_FUNCTION (scif0),SH_PFC_FUNCTION (scif1), SH_PFC_FUNCTION(scif2),
Signature · 1 line
2.25.1