Add R8A7794/SILK QSPI DT support
Subsystems (2)
cover Add R8A7794/SILK QSPI DT support
Hello.
Here's the set of 2 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-20150807-v4.2-rc5' tag plus the R8A7794 GPIO patches I've just posted. Here we add the QSPI device tree support for the R8A7794/SILK board.
[1/2] ARM: shmobile: r8a7794: add QSPI DT support
[2/2] ARM: shmobile: silk: add QSPI DT support
WBR, Sergei
PATCH 1/2 ARM: shmobile: r8a7794: add QSPI DT support
Define the generic R8A7794 part of the QSPI device node.
Based on original patch by Hisashi Nakamura <[email protected]>.
--- arch/arm/boot/dts/r8a7794.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
arch/arm/boot/dts/r8a7794.dtsi +18 -0
@@ -19,6 +19,10 @@ #address-cells = <2>; #size-cells = <2>; + aliases { + spi0 = &qspi; + }; + cpus { #address-cells = <1>; #size-cells = <0>;
@@ -537,6 +541,20 @@ status = "disabled"; }; + qspi: spi at e6b10000 { + compatible = "renesas,qspi-r8a7794", "renesas,qspi"; + reg = <0 0xe6b10000 0 0x2c>; + interrupts = <0 184 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp9_clks R8A7794_CLK_QSPI_MOD>; + power-domains = <&cpg_clocks>; + dmas = <&dmac0 0x17>, <&dmac0 0x18>; + dma-names = "tx", "rx"; + num-cs = <1>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + clocks { #address-cells = <2>; #size-cells = <2>;
PATCH 2/2 ARM: shmobile: silk: add QSPI DT support
In reply to Sergei ShtylyovDefine the SILK board dependent part of the QSPI device node.
Add device nodes for Spansion S25FL512S SPI flash and MTD partitions on it.
Based on the original patch by Vladimir Barinov
<[email protected]>.
--- arch/arm/boot/dts/r8a7794-silk.dts | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+)
arch/arm/boot/dts/r8a7794-silk.dts +40 -0
@@ -65,6 +65,11 @@ renesas,groups = "mmc_data8", "mmc_ctrl"; renesas,function = "mmc"; }; + + qspi_pins: spi0 { + renesas,groups = "qspi_ctrl", "qspi_data4"; + renesas,function = "qspi"; + }; }; &scif2 {
@@ -100,3 +105,38 @@ non-removable; status = "okay"; }; + +&qspi { + pinctrl-0 = <&qspi_pins>; + pinctrl-names = "default"; + + status = "okay"; + + flash at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "spansion,s25fl512s"; + reg = <0>; + spi-max-frequency = <30000000>; + spi-tx-bus-width = <4>; + spi-rx-bus-width = <4>; + m25p,fast-read; + spi-cpol; + spi-cpha; + + partition at 0 { + label = "loader"; + reg = <0x00000000 0x00040000>; + read-only; + }; + partition at 40000 { + label = "user"; + reg = <0x00040000 0x00400000>; + read-only; + }; + partition at 440000 { + label = "flash"; + reg = <0x00440000 0x03bc0000>; + }; + }; +};
PATCH 1/2 ARM: shmobile: r8a7794: add QSPI DT support
In reply to Sergei ShtylyovQuoted 5 lines · Sergei Shtylyov
Define the generic R8A7794 part of the QSPI device node.
Based on original patch by Hisashi Nakamura <[email protected]>.
Signed-off-by Sergei Shtylyov <[email protected]>
arch/arm/boot/dts/r8a7794.dtsi | 18 ++++++++++++++++++
Quoted 18 lines
1 file changed, 18 insertions(+)Index:
renesas/arch/arm/boot/dts/r8a7794.dtsi
===================================================================arch/arm/boot/dts/r8a7794.dtsi +4
-0@@ -19,6 +19,10 @@ #address-cells = <2>; #size-cells = <2>; + aliases { + spi0 = &qspi; + }; + cpus { #address-cells = <1>; #size-cells = <0>;
arch/arm/boot/dts/r8a7794.dtsi line 549
Quoted 9 lines
arch/arm/boot/dts/r8a7794.dtsi +6
-0@@ -537,6 +541,20 @@ status = "disabled"; }; + qspi: spi at e6b10000 { + compatible = "renesas,qspi-r8a7794", "renesas,qspi"; + reg = <0 0xe6b10000 0 0x2c>; + interrupts = <0 184 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp9_clks R8A7794_CLK_QSPI_MOD>; + power-domains = <&cpg_clocks>;
For consistency with the other nodes, I'd add "power-domains" below the DMA-related properties.
arch/arm/boot/dts/r8a7794.dtsi line 560
Quoted 11 lines
arch/arm/boot/dts/r8a7794.dtsi +8
-0+ dmas = <&dmac0 0x17>, <&dmac0 0x18>; + dma-names = "tx", "rx"; + num-cs = <1>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + clocks { #address-cells = <2>; #size-cells = <2>;
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/2 ARM: shmobile: silk: add QSPI DT support
In reply to Sergei ShtylyovHi Sergei,
Quoted 11 lines · Sergei Shtylyov
Define the SILK board dependent part of the QSPI device node.
Add device nodes for Spansion S25FL512S SPI flash and MTD partitions on it.Based on the original patch by Vladimir Barinov
<[email protected]>.Signed-off-by Sergei Shtylyov <[email protected]>arch/arm/boot/dts/r8a7794-silk.dts +0
-0
arch/arm/boot/dts/r8a7794-silk.dts line 118
Quoted 10 lines
arch/arm/boot/dts/r8a7794-silk.dts +10
-0+&qspi { + pinctrl-0 = <&qspi_pins>; + pinctrl-names = "default"; + + status = "okay"; + + flash at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "spansion,s25fl512s";
Please add the "jedec,spi-nor" fallback.
arch/arm/boot/dts/r8a7794-silk.dts line 123
Quoted 5 lines
arch/arm/boot/dts/r8a7794-silk.dts +5
-0+ reg = <0>; + spi-max-frequency = <30000000>; + spi-tx-bus-width = <4>; + spi-rx-bus-width = <4>; + m25p,fast-read;
Please keep all "spi-*" properties together.
Quoted 7 lines
arch/arm/boot/dts/r8a7794-silk.dts +6
-0+ spi-cpol; + spi-cpha; + partition at 0 { + label = "loader"; + reg = <0x00000000 0x00040000>; + read-only;
arch/arm/boot/dts/r8a7794-silk.dts line 140
Quoted 10 lines
arch/arm/boot/dts/r8a7794-silk.dts +10
-0+ }; + partition at 40000 { + label = "user"; + reg = <0x00040000 0x00400000>; + read-only; + }; + partition at 440000 { + label = "flash"; + reg = <0x00440000 0x03bc0000>; + };
The above part I cannot verify, so I have to trust you.
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/2 ARM: shmobile: silk: add QSPI DT support
Hello.
Quoted 11 lines · Geert Uytterhoeven
Quoted 10 lines
Define the SILK board dependent part of the QSPI device node.
Add device nodes for Spansion S25FL512S SPI flash and MTD partitions on it.Based on the original patch by Vladimir Barinov
<[email protected]>.Signed-off-by Sergei Shtylyov <[email protected]>arch/arm/boot/dts/r8a7794-silk.dts +0
-0
Quoted 12 lines
arch/arm/boot/dts/r8a7794-silk.dts line 118
Quoted 10 lines
+&qspi {
arch/arm/boot/dts/r8a7794-silk.dts +9
-0+ pinctrl-0 = <&qspi_pins>; + pinctrl-names = "default"; + + status = "okay"; + + flash at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "spansion,s25fl512s";Please add the "jedec,spi-nor" fallback.
Hm, spi-nor.c alone can't control this device, it's rather m25p80.c that's
the real driver. So if a fallback needs to be added indeed it should be "st,m25p80" I think...
[...]
Quoted 1 line
Gr{oetje,eeting}s,
MBR, Sergei
PATCH 2/2 ARM: shmobile: silk: add QSPI DT support
Hi Sergei,
Quoted 14 lines · Sergei Shtylyov
Quoted 4 lines · Geert Uytterhoeven
Quoted 4 lines
+&qspi {
arch/arm/boot/dts/r8a7794-silk.dts +3
-0+ pinctrl-0 = <&qspi_pins>; + pinctrl-names = "default"; +Quoted 8 lines
arch/arm/boot/dts/r8a7794-silk.dts line 118
Quoted 6 lines
arch/arm/boot/dts/r8a7794-silk.dts +6
-0+ status = "okay"; + + flash at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "spansion,s25fl512s";Please add the "jedec,spi-nor" fallback.
Quoted 3 lines
Hm,
spi-nor.calone can't control this device, it's ratherm25p80.c
that's the real driver. So if a fallback needs to be added indeed it should be "st,m25p80" I think...
Please have a look at Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt.
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