Preliminary SoC and board integration for RSPI on RZ/A1H
Subsystems (7)
cover Preliminary SoC and board integration for RSPI on RZ/A1H
This patch series contains preliminary support to integrate Renesas RSPI on the RZ/A1H aka R7S72100 SoC, and the Genmai development board.
Note that the prosed DT bindings also talk about QSPI on the R8A779x, as those SoC use the same driver. The actual driver doesn't use DT yet, but conversion to DT is planned.
The series is based on renesas-devel-v3.13-rc5-20131223, with Magnus' pinctrl, Wolfram's riic, and Simon's gether work applied on top. It hasn't received much testing, so please don't apply yet.
[1/6] pinctrl: sh-pfc: r7s72100: Add RSPI support
[2/6] ARM: shmobile: r7s72100: Add RSPI clocks
[3/6] ARM: shmobile: r7s72100: Add RSPI resources
[4/6] [RFC] Documentation: dt: Add Renesas RSPI/QSPI bindings
[5/6] [RFC] ARM: shmobile: r7s72100 dtsi: Add RSPI nodes
[6/6] [RFC] arm: shmobile: genmai reference: Add RSPI nodesThanks for your comments, and Merry Christmas!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
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 Torvalds
PATCH 1/6 pinctrl: sh-pfc: r7s72100: Add RSPI support
--- drivers/pinctrl/sh-pfc/pfc-r7s72100.c | 94 +++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+)
drivers/pinctrl/sh-pfc/pfc-r7s72100.c +94 -0
@@ -138,6 +138,70 @@ RIIC1(RZ_PIN_AND_MUX) RIIC2(RZ_PIN_AND_MUX) RIIC3(RZ_PIN_AND_MUX) +#define RSPI0 (fn) \ + fn(rspi0, rspck, 2, 12, 2) \ + fn(rspi0, ssl0, 2, 13, 2) \ + fn(rspi0, mosi, 2, 14, 2) \ + fn(rspi0, miso, 2, 15, 2) \ + fn(rspi0, rspck, 7, 15, 2) \ + fn(rspi0, ssl0, 8, 0, 2) \ + fn(rspi0, mosi, 8, 1, 2) \ + fn(rspi0, miso, 8, 2, 2) \ + fn(rspi0, rspck, 10, 12, 4) \ + fn(rspi0, ssl0, 10, 13, 4) \ + fn(rspi0, mosi, 10, 14, 4) \ + fn(rspi0, miso, 10, 15, 4) \ + +#define RSPI1 (fn) \ + fn(rspi1, rspck, 4, 4, 2) \ + fn(rspi1, ssl0, 4, 5, 2) \ + fn(rspi1, mosi, 4, 6, 2) \ + fn(rspi1, miso, 4, 7, 2) \ + fn(rspi1, rspck, 6, 4, 7) \ + fn(rspi1, ssl0, 6, 5, 7) \ + fn(rspi1, mosi, 6, 6, 7) \ + fn(rspi1, miso, 6, 7, 7) \ + fn(rspi1, rspck, 11, 12, 2) \ + fn(rspi1, ssl0, 11, 13, 2) \ + fn(rspi1, mosi, 11, 14, 2) \ + fn(rspi1, miso, 11, 15, 2) \ + +#define RSPI2 (fn) \ + fn(rspi2, rspck, 8, 3, 3) \ + fn(rspi2, ssl0, 8, 4, 3) \ + fn(rspi2, mosi, 8, 5, 3) \ + fn(rspi2, miso, 8, 6, 3) \ + fn(rspi2, rspck, 8, 14, 5) \ + fn(rspi2, ssl0, 8, 15, 5) \ + fn(rspi2, mosi, 9, 0, 5) \ + fn(rspi2, miso, 9, 1, 5) \ + +#define RSPI3 (fn) \ + fn(rspi3, rspck, 3, 0, 8) \ + fn(rspi3, ssl0, 3, 1, 8) \ + fn(rspi3, mosi, 3, 2, 8) \ + fn(rspi3, miso, 3, 3, 8) \ + fn(rspi3, rspck, 5, 0, 8) \ + fn(rspi3, ssl0, 5, 1, 8) \ + fn(rspi3, mosi, 5, 2, 8) \ + fn(rspi3, miso, 5, 3, 8) \ + +#define RSPI4 (fn) \ + fn(rspi4, rspck, 2, 8, 8) \ + fn(rspi4, ssl0, 2, 9, 8) \ + fn(rspi4, mosi, 2, 10, 8) \ + fn(rspi4, miso, 2, 11, 8) \ + fn(rspi4, rspck, 4, 0, 7) \ + fn(rspi4, ssl0, 4, 1, 7) \ + fn(rspi4, mosi, 4, 2, 7) \ + fn(rspi4, miso, 4, 3, 7) \ + +RSPI0(RZ_PIN_AND_MUX) +RSPI1(RZ_PIN_AND_MUX) +RSPI2(RZ_PIN_AND_MUX) +RSPI3(RZ_PIN_AND_MUX) +RSPI4(RZ_PIN_AND_MUX) + #define SCIF0(fn) \ fn(scif0, clk, 2, 13, 6) \ fn(scif0, txd, 2, 14, 6) \
@@ -312,6 +376,11 @@ static const struct sh_pfc_pin_group pinmux_groups[] = { RIIC1(RZ_PMX_GROUP) RIIC2(RZ_PMX_GROUP) RIIC3(RZ_PMX_GROUP) + RSPI0(RZ_PMX_GROUP) + RSPI1(RZ_PMX_GROUP) + RSPI2(RZ_PMX_GROUP) + RSPI3(RZ_PMX_GROUP) + RSPI4(RZ_PMX_GROUP) SCIF0(RZ_PMX_GROUP) SCIF1(RZ_PMX_GROUP) SCIF2(RZ_PMX_GROUP)
@@ -339,6 +408,26 @@ static const char * const riic3_groups[] = { RIIC3(RZ_GROUPS) }; +static const char *const rspi0_groups[] = { +RSPI0 (RZ_GROUPS ) +}; + +static const char *const rspi1_groups[] = { +RSPI1 (RZ_GROUPS ) +}; + +static const char *const rspi2_groups[] = { +RSPI2 (RZ_GROUPS ) +}; + +static const char *const rspi3_groups[] = { +RSPI3 (RZ_GROUPS ) +}; + +static const char *const rspi4_groups[] = { +RSPI4 (RZ_GROUPS ) +}; +static const char *const scif0_groups[] = {SCIF0 (RZ_GROUPS ) };
@@ -380,6 +469,11 @@ static const struct sh_pfc_function pinmux_functions[] = {SH_PFC_FUNCTION (riic1),SH_PFC_FUNCTION (riic2),SH_PFC_FUNCTION (riic3), +SH_PFC_FUNCTION (rspi0), +SH_PFC_FUNCTION (rspi1), +SH_PFC_FUNCTION (rspi2), +SH_PFC_FUNCTION (rspi3), +SH_PFC_FUNCTION (rspi4),SH_PFC_FUNCTION (scif0),SH_PFC_FUNCTION (scif1), SH_PFC_FUNCTION(scif2),
Signature · 1 line
1.7.9.5
PATCH 1/6 pinctrl: sh-pfc: r7s72100: Add RSPI support
Quoted 2 lines · Geert Uytterhoeven
Signed-off-by Geert Uytterhoeven <[email protected]>Cc Linus Walleij <[email protected]>
Geert can you please repost any PFC patches you have to Laurent Pinchart on the To: line as well, because I have to use him as a front-end for this stuff lest I drown in patches.
Yours,
Linus Walleij
PATCH 1/6 pinctrl: sh-pfc: r7s72100: Add RSPI support
Hi Linus,
Quoted 9 lines · Linus Walleij
Quoted 2 lines · Geert Uytterhoeven
Signed-off-by Geert Uytterhoeven <[email protected]>Cc Linus Walleij <[email protected]>Geert can you please repost any PFC patches you have to Laurent Pinchart on the To: line as well, because I have to use him as a front-end for this stuff lest I drown in patches.
Sure, will do when I resend the (updated) series.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
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 Torvalds
PATCH 2/6 ARM: shmobile: r7s72100: Add RSPI clocks
In reply to Geert Uytterhoeven--- arch/arm/mach-shmobile/clock-r7s72100.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-)
arch/arm/mach-shmobile/clock-r7s72100.c +18 -3
@@ -22,13 +22,15 @@#include <mach/common.h> #include <mach/r7s72100.h> -/* registers */ +/* Frequency Control Registers */ #define FRQCR 0xfcfe0010#define FRQCR2 0xfcfe0014 +/* Standby Control Registers */ #define STBCR3 0xfcfe0420#define STBCR4 0xfcfe0424#define STBCR7 0xfcfe0430#define STBCR9 0xfcfe0438 +#define STBCR10 0xfcfe043c#define PLL_RATE 30
@@ -146,12 +148,20 @@ struct clk div4_clks[DIV4_NR] = { | CLK_ENABLE_ON_INIT), }; -enum {MSTP97 ,MSTP96 ,MSTP95 ,MSTP94 , +enum { +MSTP107 ,MSTP106 ,MSTP105 ,MSTP104 ,MSTP103 , +MSTP97 ,MSTP96 ,MSTP95 ,MSTP94 ,MSTP74 ,MSTP47 ,MSTP46 ,MSTP45 ,MSTP44 ,MSTP43 ,MSTP42 ,MSTP41 ,MSTP40 , -MSTP33 ,MSTP_NR }; +MSTP33 ,MSTP_NR +};static struct clk mstp_clks[MSTP_NR ] = { + [MSTP107 ] =SH_CLK_MSTP8 (&peripheral1_clk,STBCR10 ,7 ,0 ),/* RSPI0 */ + [MSTP106 ] =SH_CLK_MSTP8 (&peripheral1_clk,STBCR10 ,6 ,0 ),/* RSPI1 */ + [MSTP105 ] =SH_CLK_MSTP8 (&peripheral1_clk,STBCR10 ,5 ,0 ),/* RSPI2 */ + [MSTP104 ] =SH_CLK_MSTP8 (&peripheral1_clk,STBCR10 ,4 ,0 ),/* RSPI3 */ + [MSTP103 ] =SH_CLK_MSTP8 (&peripheral1_clk,STBCR10 ,3 ,0 ),/* RSPI4 */ [MSTP97 ] =SH_CLK_MSTP8 (&peripheral0_clk,STBCR9 ,7 ,0 ),/* RIIC0 */ [MSTP96 ] =SH_CLK_MSTP8 (&peripheral0_clk,STBCR9 ,6 ,0 ),/* RIIC1 */ [MSTP95 ] =SH_CLK_MSTP8 (&peripheral0_clk,STBCR9 ,5 ,0 ),/* RIIC2 */
@@ -179,6 +189,11 @@ static struct clk_lookup lookups[] = {CLKDEV_CON_ID ("cpu_clk" , &div4_clks[DIV4_I ]),/* MSTP clocks */ +CLKDEV_DEV_ID ("rspi0" , &mstp_clks[MSTP107 ]), +CLKDEV_DEV_ID ("rspi1" , &mstp_clks[MSTP106 ]), +CLKDEV_DEV_ID ("rspi2" , &mstp_clks[MSTP105 ]), +CLKDEV_DEV_ID ("rspi3" , &mstp_clks[MSTP104 ]), +CLKDEV_DEV_ID ("rspi4" , &mstp_clks[MSTP103 ]),CLKDEV_DEV_ID ("fcfee000.i2c" , &mstp_clks[MSTP97 ]),CLKDEV_DEV_ID ("fcfee400.i2c" , &mstp_clks[MSTP96 ]), CLKDEV_DEV_ID("fcfee800.i2c", &mstp_clks[MSTP95]),
Signature · 1 line
1.7.9.5
PATCH 2/6 ARM: shmobile: r7s72100: Add RSPI clocks
Hi Geert
arch/arm/mach-shmobile/clock-r7s72100.c static struct clk_lookup lookups[] = { · line 196
Quoted 6 lines
arch/arm/mach-shmobile/clock-r7s72100.c +5
-0/* MSTP clocks */ +CLKDEV_DEV_ID ("rspi0" , &mstp_clks[MSTP107 ]), +CLKDEV_DEV_ID ("rspi1" , &mstp_clks[MSTP106 ]), +CLKDEV_DEV_ID ("rspi2" , &mstp_clks[MSTP105 ]), +CLKDEV_DEV_ID ("rspi3" , &mstp_clks[MSTP104 ]), + CLKDEV_DEV_ID("rspi4", &mstp_clks[MSTP103]),
I think "rspi.x" is correct name ?
Best regards
---
Kuninori Morimoto
PATCH 3/6 ARM: shmobile: r7s72100: Add RSPI resources
In reply to Geert Uytterhoeven--- arch/arm/mach-shmobile/setup-r7s72100.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
arch/arm/mach-shmobile/setup-r7s72100.c +25 -0
@@ -79,6 +79,26 @@ static struct resource mtu2_0_resources[] __initdata = { &mtu2_##idx##_platform_data, \ sizeof(struct sh_timer_config)) +/* RSPI */ +#define RSPI_RESOURCE (idx, baseaddr, irq) \ +static const struct resource rspi##idx##_resources[] __initconst = { \ + DEFINE_RES_MEM(baseaddr, 0x24), \ + DEFINE_RES_IRQ(irq),/* SPEI */ \ +DEFINE_RES_IRQ (irq +1 ),/* SPRI */ \ +DEFINE_RES_IRQ (irq +2 ),/* SPTI */ \ +} + +RSPI_RESOURCE (0 ,0xe800c800 ,gic_iid (270 )); +RSPI_RESOURCE (1 ,0xe800d000 ,gic_iid (273 )); +RSPI_RESOURCE (2 ,0xe800d800 ,gic_iid (276 )); +RSPI_RESOURCE (3 ,0xe800e000 ,gic_iid (279 )); +RSPI_RESOURCE (4 ,0xe800e800 ,gic_iid (282 )); + +#define r7s72100_register_rspi (idx) \ + platform_device_register_simple("rspi" #idx, idx, \ + rspi##idx##_resources, \ + ARRAY_SIZE(rspi##idx##_resources)) +void __init r7s72100_add_dt_devices (void ) {r7s72100_register_scif (SCIF0 );
@@ -90,6 +110,11 @@ void __init r7s72100_add_dt_devices(void)r7s72100_register_scif (SCIF6 );r7s72100_register_scif (SCIF7 );r7s72100_register_mtu2 (0 ); +r7s72100_register_rspi (0 ); +r7s72100_register_rspi (1 ); +r7s72100_register_rspi (2 ); +r7s72100_register_rspi (3 ); +r7s72100_register_rspi (4 ); }void __init r7s72100_init_early (void )
Signature · 1 line
1.7.9.5
PATCH 3/6 ARM: shmobile: r7s72100: Add RSPI resources
Hello.
On 24-12-2013 15:56, Geert Uytterhoeven wrote:
The subject is somewhat deficient: you're only only adding resources,
you're registering devices themselves...
Quoted 20 lines
Signed-off-by Geert Uytterhoeven <[email protected]>--- arch/arm/mach-shmobile/setup-r7s72100.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)arch/arm/mach-shmobile/setup-r7s72100.c +7
-0@@ -79,6 +79,26 @@ static struct resource mtu2_0_resources[] __initdata = { &mtu2_##idx##_platform_data, \ sizeof(struct sh_timer_config)) +/* RSPI */ +#define RSPI_RESOURCE (idx, baseaddr, irq) \ +static const struct resource rspi##idx##_resources[] __initconst = { \ + DEFINE_RES_MEM(baseaddr, 0x24), \ + DEFINE_RES_IRQ(irq),/* SPEI */ \ +DEFINE_RES_IRQ (irq +1 ),/* SPRI */ \ + DEFINE_RES_IRQ(irq + 2), /* SPTI */ \
arch/arm/mach-shmobile/setup-r7s72100.c static struct resource mtu2_0_resources[] __initdata = { · line 98
Quoted 10 lines
arch/arm/mach-shmobile/setup-r7s72100.c +10
-0+} + +RSPI_RESOURCE (0 ,0xe800c800 ,gic_iid (270 )); +RSPI_RESOURCE (1 ,0xe800d000 ,gic_iid (273 )); +RSPI_RESOURCE (2 ,0xe800d800 ,gic_iid (276 )); +RSPI_RESOURCE (3 ,0xe800e000 ,gic_iid (279 )); +RSPI_RESOURCE (4 ,0xe800e800 ,gic_iid (282 )); + +#define r7s72100_register_rspi (idx) \ + platform_device_register_simple("rspi" #idx, idx, \
Hm, do you really mean device names like "rspi0.0"?
arch/arm/mach-shmobile/setup-r7s72100.c static struct resource mtu2_0_resources[] __initdata = { · line 101
Quoted 3 lines
arch/arm/mach-shmobile/setup-r7s72100.c +3
-0+ rspi##idx##_resources, \ + ARRAY_SIZE(rspi##idx##_resources)) +
WBR, Sergei
RFC PATCH 4/6 Documentation: dt: Add Renesas RSPI/QSPI bindings
In reply to Geert Uytterhoeven--- Documentation/devicetree/bindings/spi/spi-rspi.txt | 27 ++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Documentation/devicetree/bindings/spi/spi-rspi.txt
Documentation/devicetree/bindings/spi/spi-rspi.txt new file +27 -0
@@ -0,0 +1,27 @@ +Device tree configuration for Renesas RSPI/QSPI driver + +Required properties: +- compatible : "renesas,rspi-<soctype>". "renesas,rspi-rz" as fallback, + or + "renesas,qspi-<soctype>", "renesas,qspi-rcar" as fallback. +- reg : address start and address range size of device +- interrupts : 3 interrupts for RSPI (SPEI, SPRI, SPTI), + 1 interrupt for QSPI +- num-cs : Number of chip selects +- #address-cells : should be <1> +- #size-cells : should be <0> + +Pinctrl properties might be needed, too. See there. + +Example: + + spi0: spi at e800c800 { + compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz"; + reg = <0xe800c800 0x24>; + interrupts = <0 238 IRQ_TYPE_LEVEL_HIGH>, + <0 239 IRQ_TYPE_LEVEL_HIGH>, + <0 240 IRQ_TYPE_LEVEL_HIGH>; + num-cs = <1>; + #address-cells = <1>; + #size-cells = <0>; + };
Signature · 1 line
1.7.9.5
RFC PATCH 4/6 Documentation: dt: Add Renesas RSPI/QSPI bindings
Hi Geert,
Thank you for the patch. It's nice to see DT support for the RSPI driver.
Quoted 20 lines · On Tuesday 24 December 2013 12:56:48 Geert Uytterhoeven wrote:
Signed-off-by Geert Uytterhoeven <[email protected]>Cc devicetree at vger.kernel.org--- Documentation/devicetree/bindings/spi/spi-rspi.txt | 27 +++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Documentation/devicetree/bindings/spi/spi-rspi.txt(quoted diff) +0
-0
b/Documentation/devicetree/bindings/spi/spi-rspi.txtnew file mode 100644 index 000000000000..06ec17fce4c6Documentation/devicetree/bindings/spi/spi-rspi.txt new file +4
-0@@ -0,0 +1,27 @@ +Device tree configuration for Renesas RSPI/QSPI driver + +Required properties: +- compatible : "renesas,rspi-<soctype>". "renesas,rspi-rz" asfallback,
Documentation/devicetree/bindings/spi/spi-rspi.txt new file +2
-0+ or + "renesas,qspi-<soctype>", "renesas,qspi-rcar" as
Quoted 1 line
fallback.
I think you need to be a bit more verbose here and explain when to use rspi and when to use qspi. I'm also wondering where we need the -rz and -rcar suffixes for the generic compatible strings.
Quoted 6 lines
+- reg : address start and address range size of device +- interrupts : 3 interrupts for RSPI (SPEI, SPRI, SPTI), + 1 interrupt for QSPI +- num-cs : Number of chip selects +- #address-cells : should be <1> +- #size-cells : should be <0>
I would say "must" instead of "should".
Documentation/devicetree/bindings/spi/spi-rspi.txt line 23
Quoted 11 lines
Documentation/devicetree/bindings/spi/spi-rspi.txt new file +11
-0+ +Pinctrl properties might be needed, too. See there. + +Example: + + spi0: spi at e800c800 { + compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz"; + reg = <0xe800c800 0x24>; + interrupts = <0 238 IRQ_TYPE_LEVEL_HIGH>, + <0 239 IRQ_TYPE_LEVEL_HIGH>, + <0 240 IRQ_TYPE_LEVEL_HIGH>;
You're missing the interrupt-parent property.
Now that we have two ways to specify interrupts (interrupt-parent + interrupts or interrupts-extended) we should probably decide on a common wording for interrupt properties in individual DT bindings, but that's out of scope of this patch.
Quoted 4 lines
Documentation/devicetree/bindings/spi/spi-rspi.txt new file +4
-0+ num-cs = <1>; + #address-cells = <1>; + #size-cells = <0>; + };
Signature · 3 lines
Regards, Laurent Pinchart
RFC PATCH 4/6 Documentation: dt: Add Renesas RSPI/QSPI bindings
Hi Laurent,
Quoted 14 lines · Laurent Pinchart
Quoted 10 lines · On Tuesday 24 December 2013 12:56:48 Geert Uytterhoeven wrote:
+++
b/Documentation/devicetree/bindings/spi/spi-rspi.txtDocumentation/devicetree/bindings/spi/spi-rspi.txt new file +4
-0@@ -0,0 +1,27 @@ +Device tree configuration for Renesas RSPI/QSPI driver + +Required properties: +- compatible : "renesas,rspi-<soctype>". "renesas,rspi-rz" asfallback,
(quoted diff) +2
-0+ or + "renesas,qspi-<soctype>", "renesas,qspi-rcar" asfallback.
I think you need to be a bit more verbose here and explain when to use rspi and when to use qspi. I'm also wondering where we need the -rz and -rcar
OK.
Quoted 1 line
suffixes for the generic compatible strings.
The rationale behind this is that RSPI DT would apply to RSPI on RZ/A1H. The spi-rspi driver also supports legacy SH7757, which may not move to DT anytime soon.
For symmetry, I did the same thing for QSPI, which applies to QSPI on R-Car H2 and M2 (upon second look, it should be "renesas,qspi-rcar-gen2", as E1/M1/H1 have HSPI).
Does this makes sense? Or do you still prefer plain "renesas,rspi" and "renesas,qspi", and perhaps "renesas,rspi-sh" if we ever get DT there?
Quoted 8 lines
Quoted 6 lines
+- reg : address start and address range size of device +- interrupts : 3 interrupts for RSPI (SPEI, SPRI, SPTI), + 1 interrupt for QSPI +- num-cs : Number of chip selects +- #address-cells : should be <1> +- #size-cells : should be <0>I would say "must" instead of "should".
OK.
Quoted 10 lines
Documentation/devicetree/bindings/spi/spi-rspi.txt line 23
Quoted 8 lines
Documentation/devicetree/bindings/spi/spi-rspi.txt new file +8
-0+Example: + + spi0: spi at e800c800 { + compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz"; + reg = <0xe800c800 0x24>; + interrupts = <0 238 IRQ_TYPE_LEVEL_HIGH>, + <0 239 IRQ_TYPE_LEVEL_HIGH>, + <0 240 IRQ_TYPE_LEVEL_HIGH>;You're missing the interrupt-parent property.
OK.
But we don't need it in the spi node in the actual .dts, as we already have "interrupt-parent = <&gic>;" in the enclosing node, right?
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
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 Torvalds
RFC PATCH 4/6 Documentation: dt: Add Renesas RSPI/QSPI bindings
Hi Geert,
Quoted 28 lines · On Friday 27 December 2013 20:01:53 Geert Uytterhoeven wrote:
Quoted 15 lines · Laurent Pinchart
Quoted 10 lines · On Tuesday 24 December 2013 12:56:48 Geert Uytterhoeven wrote:
+++
b/Documentation/devicetree/bindings/spi/spi-rspi.txtDocumentation/devicetree/bindings/spi/spi-rspi.txt new file +4
-0@@ -0,0 +1,27 @@ +Device tree configuration for Renesas RSPI/QSPI driver + +Required properties: +- compatible : "renesas,rspi-<soctype>". "renesas,rspi-rz" asfallback,
(quoted diff) +2
-0+ or + "renesas,qspi-<soctype>", "renesas,qspi-rcar" asfallback.
I think you need to be a bit more verbose here and explain when to use rspi and when to use qspi. I'm also wondering where we need the -rz and - rcar
OK.
Quoted 1 line
suffixes for the generic compatible strings.
The rationale behind this is that RSPI DT would apply to RSPI on RZ/A1H. The spi-rspi driver also supports legacy SH7757, which may not move to DT anytime soon.
For symmetry, I did the same thing for QSPI, which applies to QSPI on R-Car H2 and M2 (upon second look, it should be "renesas,qspi-rcar-gen2", as E1/M1/H1 have HSPI).
Quoted 2 lines
Does this makes sense? Or do you still prefer plain "renesas,rspi" and "renesas,qspi", and perhaps "renesas,rspi-sh" if we ever get DT there?
The compatible strings should define what the device is compatible with. They should start with the most specific compability and end with the less specific one. In this case we definitely want to list the SoC-specific compatible string first, even if we don't need it, as experience with Renesas SoC shows that subtle differences between different versions of the same IP core can be discovered later. If all RSPI cores are similar enough to be supported by a single driver configuration, then I believe "renesas,rspi" would be a proper second compatible string. If the RSPI cores in the SH and RZ chips are incompatible then we need two different strings. The same is true for QSPI.
A quick look at the driver shows that RSPI is supported without caring whether the SoC is an SH or ARM, so I believe "renesas,rspi" should do. The question in my opinion is whether we want to use
compatible = "renesas,rspi-r7s72100", "renesas,rspi";
or
compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz", "renesas,rspi";
Quoted 22 lines
Quoted 8 lines
Quoted 6 lines
+- reg : address start and address range size of device +- interrupts : 3 interrupts for RSPI (SPEI, SPRI, SPTI), + 1 interrupt for QSPI +- num-cs : Number of chip selects +- #address-cells : should be <1> +- #size-cells : should be <0>I would say "must" instead of "should".
OK.
Quoted 10 lines
Documentation/devicetree/bindings/spi/spi-rspi.txt line 23
Quoted 8 lines
Documentation/devicetree/bindings/spi/spi-rspi.txt new file +8
-0+Example: + + spi0: spi at e800c800 { + compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz"; + reg = <0xe800c800 0x24>; + interrupts = <0 238 IRQ_TYPE_LEVEL_HIGH>, + <0 239 IRQ_TYPE_LEVEL_HIGH>, + <0 240 IRQ_TYPE_LEVEL_HIGH>;You're missing the interrupt-parent property.
Quoted 4 lines
OK.
But we don't need it in the spi node in the actual .dts, as we already have "interrupt-parent = <&gic>;" in the enclosing node, right?
That's right.
Signature · 3 lines
Regards, Laurent Pinchart
RFC PATCH 4/6 Documentation: dt: Add Renesas RSPI/QSPI bindings
Hi Laurent,
Thanks for your comments!
Quoted 42 lines · Laurent Pinchart
Quoted 28 lines · On Friday 27 December 2013 20:01:53 Geert Uytterhoeven wrote:
Quoted 15 lines · Laurent Pinchart
Quoted 10 lines · On Tuesday 24 December 2013 12:56:48 Geert Uytterhoeven wrote:
+++
b/Documentation/devicetree/bindings/spi/spi-rspi.txtDocumentation/devicetree/bindings/spi/spi-rspi.txt new file +4
-0@@ -0,0 +1,27 @@ +Device tree configuration for Renesas RSPI/QSPI driver + +Required properties: +- compatible : "renesas,rspi-<soctype>". "renesas,rspi-rz" asfallback,
(quoted diff) +2
-0+ or + "renesas,qspi-<soctype>", "renesas,qspi-rcar" asfallback.
I think you need to be a bit more verbose here and explain when to use rspi and when to use qspi. I'm also wondering where we need the -rz and - rcar
OK.
Quoted 1 line
suffixes for the generic compatible strings.
The rationale behind this is that RSPI DT would apply to RSPI on RZ/A1H. The spi-rspi driver also supports legacy SH7757, which may not move to DT anytime soon.
For symmetry, I did the same thing for QSPI, which applies to QSPI on R-Car H2 and M2 (upon second look, it should be "renesas,qspi-rcar-gen2", as E1/M1/H1 have HSPI).Quoted 2 lines
Does this makes sense? Or do you still prefer plain "renesas,rspi" and "renesas,qspi", and perhaps "renesas,rspi-sh" if we ever get DT there?
The compatible strings should define what the device is compatible with. They should start with the most specific compability and end with the less specific one. In this case we definitely want to list the SoC-specific compatible string first, even if we don't need it, as experience with Renesas SoC shows that subtle differences between different versions of the same IP core can be discovered later. If all RSPI cores are similar enough to be supported by a single driver configuration, then I believe "renesas,rspi" would be a proper second compatible string. If the RSPI cores in the SH and RZ chips are incompatible then we need two different strings. The same is true for QSPI.
Quoted 2 lines
A quick look at the driver shows that RSPI is supported without caring whether the SoC is an SH or ARM, so I believe "renesas,rspi" should do. The question
There are subtle register differences between RSPI on SH7757 and RZ/A1H, cfr. what rspi_parse_platform_data() does when no platform_data is passed[*]. RSPI on RZ/A1H seems to be an evolutionary step from RSPI on SH towards QSPI on RCar Gen2 (but without Dual/Quad).
[*] setup-sh7757.c doesn't pass platform data, although the rspi driver and its
platform data has support for DMA on SH7757, which is not used by
setup-sh7757.c nor any other in-tree platform.
Quoted 7 lines
in my opinion is whether we want to use
compatible = "renesas,rspi-r7s72100", "renesas,rspi";
or
compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz", "renesas,rspi";
So we end up with:
compatible = "renesas,sh7757", "renesas,rspi-sh" (SH legacy) compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz" (Genmai) compatible = "renesas,rspi-r8a7790", "renesas,qspi" (Lager) compatible = "renesas,rspi-r8a7791", "renesas,qspi" (Koelsch)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
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 Torvalds
RFC PATCH 4/6 Documentation: dt: Add Renesas RSPI/QSPI bindings
Hi Geert,
Quoted 50 lines · On Monday 30 December 2013 10:37:24 Geert Uytterhoeven wrote:
Quoted 45 lines · Laurent Pinchart
Quoted 29 lines · On Friday 27 December 2013 20:01:53 Geert Uytterhoeven wrote:
Quoted 16 lines · Laurent Pinchart
Quoted 10 lines · On Tuesday 24 December 2013 12:56:48 Geert Uytterhoeven wrote:
+++
b/Documentation/devicetree/bindings/spi/spi-rspi.txtDocumentation/devicetree/bindings/spi/spi-rspi.txt new file +4
-0@@ -0,0 +1,27 @@ +Device tree configuration for Renesas RSPI/QSPI driver + +Required properties: +- compatible : "renesas,rspi-<soctype>". "renesas,rspi-rz" asfallback,
(quoted diff) +2
-0+ or + "renesas,qspi-<soctype>", "renesas,qspi-rcar" asfallback.
I think you need to be a bit more verbose here and explain when to use rspi and when to use qspi. I'm also wondering where we need the -rz and -
rcarOK.
Quoted 1 line
suffixes for the generic compatible strings.
The rationale behind this is that RSPI DT would apply to RSPI on RZ/A1H. The spi-rspi driver also supports legacy SH7757, which may not move to DT anytime soon.
For symmetry, I did the same thing for QSPI, which applies to QSPI on R-Car H2 and M2 (upon second look, it should be "renesas,qspi-rcar-gen2", as E1/M1/H1 have HSPI).Quoted 2 lines
Does this makes sense? Or do you still prefer plain "renesas,rspi" and "renesas,qspi", and perhaps "renesas,rspi-sh" if we ever get DT there?
The compatible strings should define what the device is compatible with. They should start with the most specific compability and end with the less specific one. In this case we definitely want to list the SoC-specific compatible string first, even if we don't need it, as experience with Renesas SoC shows that subtle differences between different versions of the same IP core can be discovered later. If all RSPI cores are similar enough to be supported by a single driver configuration, then I believe "renesas,rspi" would be a proper second compatible string. If the RSPI cores in the SH and RZ chips are incompatible then we need two different strings. The same is true for QSPI.
Quoted 3 lines
A quick look at the driver shows that RSPI is supported without caring whether the SoC is an SH or ARM, so I believe "renesas,rspi" should do. The question
Quoted 8 lines
There are subtle register differences between RSPI on SH7757 and RZ/A1H, cfr. what
rspi_parse_platform_data()does when noplatform_datais passed[*]. RSPI on RZ/A1H seems to be an evolutionary step from RSPI on SH towards QSPI on RCar Gen2 (but without Dual/Quad).[*]
setup-sh7757.cdoesn't pass platform data, although the rspi driver and its platform data has support for DMA on SH7757, which is not used bysetup-sh7757.cnor any other in-tree platform.
The only important difference I can see (beside the hardcoded 16-bit width which could be selected as the default) is that the SSH7757 RSPI has no SPL bits in SPDCR. I don't have access tot he SH7757 datasheet, could you please confirm that ?
Quoted 6 lines
Quoted 6 lines
in my opinion is whether we want to use
compatible = "renesas,rspi-r7s72100", "renesas,rspi";
or
Quoted 8 lines
Quoted 1 line
compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz", "renesas,rspi";
So we end up with:
compatible = "renesas,sh7757", "renesas,rspi-sh" (SH legacy) compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz" (Genmai) compatible = "renesas,rspi-r8a7790", "renesas,qspi" (Lager) compatible = "renesas,rspi-r8a7791", "renesas,qspi" (Koelsch)
Don't you mean "renesas,qspi-r8a7790" and "renesas,qspi-r8a7791" ?
Signature · 3 lines
Regards, Laurent Pinchart
RFC PATCH 4/6 Documentation: dt: Add Renesas RSPI/QSPI bindings
Quoted 5 lines · Laurent Pinchart
Quoted 5 lines
There are subtle register differences between RSPI on SH7757 and RZ/A1H, cfr. what
rspi_parse_platform_data()does when noplatform_datais passed[*]. RSPI on RZ/A1H seems to be an evolutionary step from RSPI on SH towards QSPI on RCar Gen2 (but without Dual/Quad).
Quoted 8 lines
Quoted 3 lines
[*]
setup-sh7757.cdoesn't pass platform data, although the rspi driver and its platform data has support for DMA on SH7757, which is not used bysetup-sh7757.cnor any other in-tree platform.The only important difference I can see (beside the hardcoded 16-bit width which could be selected as the default) is that the SSH7757 RSPI has no SPL bits in SPDCR. I don't have access tot he SH7757 datasheet, could you please confirm that ?
SH7757 has RSPI Control Register 2 and the TX only mode flag, while RSPI-RZ (and QSPI) haven't.
The number of interrupts also differ, but that's easily handled via the interrupts
property.
BTW, I also don't have the SH7757 datasheet (will check), so my knowledge there is purely based on the behavior of the code.
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
in my opinion is whether we want to use
compatible = "renesas,rspi-r7s72100", "renesas,rspi";
or
compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz", "renesas,rspi";
Quoted 8 lines
Quoted 6 lines
So we end up with:
compatible = "renesas,sh7757", "renesas,rspi-sh" (SH legacy) compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz" (Genmai) compatible = "renesas,rspi-r8a7790", "renesas,qspi" (Lager) compatible = "renesas,rspi-r8a7791", "renesas,qspi" (Koelsch)
Don't you mean "renesas,qspi-r8a7790" and "renesas,qspi-r8a7791" ?
Oops, yes, sorry about that.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
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 Torvalds
RFC PATCH 5/6 ARM: shmobile: r7s72100 dtsi: Add RSPI nodes
In reply to Geert Uytterhoeven--- arch/arm/boot/dts/r7s72100.dtsi | 65 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+)
arch/arm/boot/dts/r7s72100.dtsi +65 -0
@@ -34,6 +34,11 @@ gpio10 = &port10; gpio11 = &port11; gpio12 = &jtagport0; + spi0 = &spi0; + spi1 = &spi1; + spi2 = &spi2; + spi3 = &spi3; + spi4 = &spi4; }; cpus {
@@ -289,4 +294,64 @@ clock-frequency = <100000>; status = "disabled"; }; + + spi0: spi at e800c800 { + compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz"; + reg = <0xe800c800 0x24>; + interrupts = <0 238 IRQ_TYPE_LEVEL_HIGH>, + <0 239 IRQ_TYPE_LEVEL_HIGH>, + <0 240 IRQ_TYPE_LEVEL_HIGH>; + num-cs = <1>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + spi1: spi at e800d000 { + compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz"; + reg = <0xe800d000 0x24>; + interrupts = <0 241 IRQ_TYPE_LEVEL_HIGH>, + <0 242 IRQ_TYPE_LEVEL_HIGH>, + <0 243 IRQ_TYPE_LEVEL_HIGH>; + num-cs = <1>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + spi2: spi at e800d800 { + compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz"; + reg = <0xe800d800 0x24>; + interrupts = <0 244 IRQ_TYPE_LEVEL_HIGH>, + <0 245 IRQ_TYPE_LEVEL_HIGH>, + <0 246 IRQ_TYPE_LEVEL_HIGH>; + num-cs = <1>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + spi3: spi at e800e000 { + compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz"; + reg = <0xe800e000 0x24>; + interrupts = <0 247 IRQ_TYPE_LEVEL_HIGH>, + <0 248 IRQ_TYPE_LEVEL_HIGH>, + <0 249 IRQ_TYPE_LEVEL_HIGH>; + num-cs = <1>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + spi4: spi at e800e800 { + compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz"; + reg = <0xe800e800 0x24>; + interrupts = <0 250 IRQ_TYPE_LEVEL_HIGH>, + <0 251 IRQ_TYPE_LEVEL_HIGH>, + <0 252 IRQ_TYPE_LEVEL_HIGH>; + num-cs = <1>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; };
Signature · 1 line
1.7.9.5
RFC PATCH 6/6 arm: shmobile: genmai reference: Add RSPI nodes
In reply to Geert UytterhoevenAdd pinctrl and SPI devices for RSPI on Genmai.
On this board, only rspi4 is in use. It's bus contains a single device (a wm8978 audio codec), for which no bindings are defined yet.
--- arch/arm/boot/dts/r7s72100-genmai-reference.dts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
arch/arm/boot/dts/r7s72100-genmai-reference.dts +17 -1
@@ -43,7 +43,7 @@ }; &pfc { - pinctrl-0 = <&scif2_pins ðernet_pins>; + pinctrl-0 = <&scif2_pins ðernet_pins &rspi4_pins>; pinctrl-names = "default"; scif2_pins: serial2 {
@@ -73,6 +73,12 @@ "ethernet_int_p1_15"; renesas,function = "ethernet"; }; + + rspi4_pins: spi4 { + renesas,groups = "rspi4_rspck_p4_0", "rspi4_ssl0_p4_1", + "rspi4_mosi_p4_2", "rspi4_miso_p4_3"; + renesas,function = "rspi4"; + }; }; &i2c2 {
@@ -85,3 +91,13 @@ pagesize = <64>; }; }; + +&spi4 { + status = "okay"; + + codec: wm8978 at 0 { + compatible = "wlf,wm8978"; + reg = <0>; + spi-max-frequency = <5000000>; + }; +};
Signature · 1 line
1.7.9.5
RFC PATCH 6/6 arm: shmobile: genmai reference: Add RSPI nodes
Hello.
Quoted 15 lines · Geert Uytterhoeven
Add pinctrl and SPI devices for RSPI on Genmai.
On this board, only rspi4 is in use. It's bus contains a single device (a wm8978 audio codec), for which no bindings are defined yet.
Signed-off-by Geert Uytterhoeven <[email protected]>Cc devicetree at vger.kernel.org--- arch/arm/boot/dts/r7s72100-genmai-reference.dts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)arch/arm/boot/dts/r7s72100-genmai-reference.dts +0
-0
[...]
arch/arm/boot/dts/r7s72100-genmai-reference.dts line 98
Quoted 9 lines
arch/arm/boot/dts/r7s72100-genmai-reference.dts +5
-0@@ -85,3 +91,13 @@ pagesize = <64>; }; }; + +&spi4 { + status = "okay"; + + codec: wm8978 at 0 {
Do not give chip names to device nodes, please use somewhat generic names
instead, like "sound-codec at 0". That's to comply with ePAPR spec.
arch/arm/boot/dts/r7s72100-genmai-reference.dts line 103
Quoted 5 lines
arch/arm/boot/dts/r7s72100-genmai-reference.dts +5
-0+ compatible = "wlf,wm8978"; + reg = <0>; + spi-max-frequency = <5000000>; + }; +};
WBR, Sergei
RFC PATCH 6/6 arm: shmobile: genmai reference: Add RSPI nodes
Hi Sergei,
Quoted 4 lines · Sergei Shtylyov
Quoted 1 line
+ codec: wm8978 at 0 {
Do not give chip names to device nodes, please use somewhat generic names
instead, like "sound-codec at 0". That's to comply with ePAPR spec.
Oh, so the generic codec alias is not sufficient? Last time you gave this comment, the code didn't contain a generic name at all, so I thought this would be OK...
Seems like Documentation/devicetree/bindings can use some cleanups, as it's full of examples like "codec: wm8510 at 1a"...
Thanks for your comments!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
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 Torvalds
RFC PATCH 6/6 arm: shmobile: genmai reference: Add RSPI nodes
In reply to Geert UytterhoevenHi Geert,
Thank you for the patch.
Quoted 17 lines · On Tuesday 24 December 2013 12:56:50 Geert Uytterhoeven wrote:
Add pinctrl and SPI devices for RSPI on Genmai.
On this board, only rspi4 is in use. It's bus contains a single device (a wm8978 audio codec), for which no bindings are defined yet.
Signed-off-by Geert Uytterhoeven <[email protected]>Cc devicetree at vger.kernel.org--- arch/arm/boot/dts/r7s72100-genmai-reference.dts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)(quoted diff) +0
-0
b/arch/arm/boot/dts/r7s72100-genmai-reference.dtsindex114510f8bf09..6d99630627e4100644
arch/arm/boot/dts/r7s72100-genmai-reference.dts line 46
Quoted 5 lines
arch/arm/boot/dts/r7s72100-genmai-reference.dts +1
-1@@ -43,7 +43,7 @@ }; &pfc { - pinctrl-0 = <&scif2_pins ðernet_pins>; + pinctrl-0 = <&scif2_pins ðernet_pins &rspi4_pins>;
You should add pinctrl-0 and pinctrl-names properties to the spi4 node instead. Device nodes should reference their pinctrl configuration directly, scif2 and ethernet are exceptions as DT bindings for those devices are not in mainline yet.
arch/arm/boot/dts/r7s72100-genmai-reference.dts line 81
Quoted 13 lines
arch/arm/boot/dts/r7s72100-genmai-reference.dts +6
-0pinctrl-names = "default"; scif2_pins: serial2 {@@ -73,6 +73,12 @@ "ethernet_int_p1_15"; renesas,function = "ethernet"; }; + + rspi4_pins: spi4 { + renesas,groups = "rspi4_rspck_p4_0", "rspi4_ssl0_p4_1", + "rspi4_mosi_p4_2", "rspi4_miso_p4_3"; + renesas,function = "rspi4"; + };
This node is at the right place and doesn't need to be moved.
Quoted 17 lines
arch/arm/boot/dts/r7s72100-genmai-reference.dts +10
-0}; &i2c2 {@@ -85,3 +91,13 @@ pagesize = <64>; }; }; + +&spi4 { + status = "okay"; + + codec: wm8978 at 0 { + compatible = "wlf,wm8978"; + reg = <0>; + spi-max-frequency = <5000000>; + }; +};
Signature · 3 lines
Regards, Laurent Pinchart
RFC PATCH 6/6 arm: shmobile: genmai reference: Add RSPI nodes
Quoted 20 lines · Laurent Pinchart
Quoted 19 lines · On Tuesday 24 December 2013 12:56:50 Geert Uytterhoeven wrote:
Add pinctrl and SPI devices for RSPI on Genmai.
On this board, only rspi4 is in use. It's bus contains a single device (a wm8978 audio codec), for which no bindings are defined yet.
Signed-off-by Geert Uytterhoeven <[email protected]>Cc devicetree at vger.kernel.org--- arch/arm/boot/dts/r7s72100-genmai-reference.dts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)(quoted diff) +0
-0
b/arch/arm/boot/dts/r7s72100-genmai-reference.dtsindex114510f8bf09..6d99630627e4100644arch/arm/boot/dts/r7s72100-genmai-reference.dts +0
-0@@ -43,7 +43,7 @@ };
Quoted 8 lines
arch/arm/boot/dts/r7s72100-genmai-reference.dts line 46
Quoted 3 lines
arch/arm/boot/dts/r7s72100-genmai-reference.dts +1
-1&pfc { - pinctrl-0 = <&scif2_pins ðernet_pins>; + pinctrl-0 = <&scif2_pins ðernet_pins &rspi4_pins>;You should add pinctrl-0 and pinctrl-names properties to the spi4 node instead. Device nodes should reference their pinctrl configuration directly, scif2 and ethernet are exceptions as DT bindings for those devices are not in mainline yet.
I put it there because the actual driver doesn't use DT yet. Is that OK?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
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 Torvalds
RFC PATCH 6/6 arm: shmobile: genmai reference: Add RSPI nodes
Hi Geert,
Quoted 31 lines · On Friday 27 December 2013 20:08:18 Geert Uytterhoeven wrote:
Quoted 21 lines · Laurent Pinchart
Quoted 20 lines · On Tuesday 24 December 2013 12:56:50 Geert Uytterhoeven wrote:
Add pinctrl and SPI devices for RSPI on Genmai.
On this board, only rspi4 is in use. It's bus contains a single device (a wm8978 audio codec), for which no bindings are defined yet.
Signed-off-by Geert Uytterhoeven <[email protected]>Cc devicetree at vger.kernel.org---
arch/arm/boot/dts/r7s72100-genmai-reference.dts | 18 ++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)(quoted diff) +0
-0
b/arch/arm/boot/dts/r7s72100-genmai-reference.dtsindex114510f8bf09..6d99630627e4100644arch/arm/boot/dts/r7s72100-genmai-reference.dts +0
-0@@ -43,7 +43,7 @@ };Quoted 8 lines
arch/arm/boot/dts/r7s72100-genmai-reference.dts line 46
Quoted 3 lines
arch/arm/boot/dts/r7s72100-genmai-reference.dts +1
-1&pfc { - pinctrl-0 = <&scif2_pins ðernet_pins>; + pinctrl-0 = <&scif2_pins ðernet_pins &rspi4_pins>;You should add pinctrl-0 and pinctrl-names properties to the spi4 node instead. Device nodes should reference their pinctrl configuration directly, scif2 and ethernet are exceptions as DT bindings for those devices are not in mainline yet.
Quoted 1 line
I put it there because the actual driver doesn't use DT yet. Is that OK?
I had missed that. That's fine, but shouldn't you then delay patch 5/6 until the driver gets DT support ?
You've already sent a DT bindings proposal (thanks for that !), wouldn't it make sense to implement support in the driver before this patch ? We're pretty close to that from what I can see.
Signature · 3 lines
Regards, Laurent Pinchart