Add R8A7792/Wheat QSPI support
cover Add R8A7792/Wheat QSPI support
Hello.
Here's the set of 3 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-20160902-v4.8-rc4' tag plus the Wheat board patches posted this week. We're adding the R8A7792/Wheat QSPI clocks and device nodes. The board patch depends on the PFC driver QSPI patch in order for the QSPI pins to be configured...
[1/3] ARM: dts: r8a7792: add QSPI clock
[2/3] ARM: dts: r8a7792: add QSPI support
[3/3] ARM: dts: wheat: add QSPI support
WBR, Sergei
PATCH 1/3 ARM: dts: r8a7792: add QSPI clock
Describe the QSPI clock in the R8A7792 device tree.
Based on the original (and large) patch by Vladimir Barinov <[email protected]>.
--- arch/arm/boot/dts/r8a7792.dtsi | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
arch/arm/boot/dts/r8a7792.dtsi +5 -2
@@ -860,6 +860,7 @@ clocks = <&cp_clk>, <&cp_clk>, <&cp_clk>, <&cp_clk>, <&cp_clk>, <&cp_clk>, <&cp_clk>, <&cp_clk>, <&cp_clk>, <&cp_clk>, <&p_clk>, <&p_clk>, + <&cpg_clocks R8A7792_CLK_QSPI>, <&cp_clk>, <&cp_clk>, <&hp_clk>, <&hp_clk>, <&hp_clk>, <&hp_clk>, <&hp_clk>, <&hp_clk>; #clock-cells = <1>;
@@ -870,6 +871,7 @@ R8A7792_CLK_GPIO1 R8A7792_CLK_GPIO0 R8A7792_CLK_GPIO11 R8A7792_CLK_GPIO10 R8A7792_CLK_CAN1 R8A7792_CLK_CAN0 + R8A7792_CLK_QSPI_MOD R8A7792_CLK_GPIO9 R8A7792_CLK_GPIO8 R8A7792_CLK_I2C5 R8A7792_CLK_I2C4 R8A7792_CLK_I2C3 R8A7792_CLK_I2C2
@@ -879,8 +881,9 @@ "gpio7", "gpio6", "gpio5", "gpio4", "gpio3", "gpio2", "gpio1", "gpio0", "gpio11", "gpio10", "can1", "can0", - "gpio9", "gpio8", "i2c5", "i2c4", - "i2c3", "i2c2", "i2c1", "i2c0"; + "qspi_mod", "gpio9", "gpio8", + "i2c5", "i2c4", "i2c3", "i2c2", + "i2c1", "i2c0"; }; };
PATCH 2/3 ARM: dts: r8a7792: add QSPI support
In reply to Sergei ShtylyovDefine the generic R8A7792 part of the QSPI device node.
Based on the original (and large) patch by Vladimir Barinov <[email protected]>.
--- arch/arm/boot/dts/r8a7792.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
arch/arm/boot/dts/r8a7792.dtsi +16 -0
@@ -25,6 +25,7 @@ i2c3 = &i2c3; i2c4 = &i2c4; i2c5 = &i2c5; + spi0 = &qspi; vin0 = &vin0; vin1 = &vin1; vin2 = &vin2;
@@ -554,6 +555,21 @@ #address-cells = <1>; #size-cells = <0>; status = "disabled"; + }; + + qspi: spi at e6b10000 { + compatible = "renesas,qspi-r8a7792", "renesas,qspi"; + reg = <0 0xe6b10000 0 0x2c>; + interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp9_clks R8A7792_CLK_QSPI_MOD>; + dmas = <&dmac0 0x17>, <&dmac0 0x18>, + <&dmac1 0x17>, <&dmac1 0x18>; + dma-names = "tx", "rx", "tx", "rx"; + power-domains = <&sysc R8A7792_PD_ALWAYS_ON>; + num-cs = <1>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; }; du: display at feb00000 {
PATCH 3/3 ARM: dts: wheat: add QSPI support
In reply to Sergei ShtylyovDefine the Wheat 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 (and large) patch by Vladimir Barinov <[email protected]>.
--- arch/arm/boot/dts/r8a7792-wheat.dts | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+)
arch/arm/boot/dts/r8a7792-wheat.dts +43 -0
@@ -132,6 +132,11 @@ function = "sdhi0"; }; + qspi_pins: qspi { + groups = "qspi_ctrl", "qspi_data4"; + function = "qspi"; + }; + du0_pins: du0 { groups = "du0_rgb888", "du0_sync", "du0_disp"; function = "du0";
@@ -173,6 +178,44 @@ status = "okay"; }; +&qspi { + pinctrl-0 = <&qspi_pins>; + pinctrl-names = "default"; + status = "okay"; + + flash at 0 { + compatible = "spansion,s25fl512s", "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <30000000>; + spi-tx-bus-width = <4>; + spi-rx-bus-width = <4>; + spi-cpol; + spi-cpha; + m25p,fast-read; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + 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>; + }; + }; + }; +}; + &i2c4 { status = "okay"; clock-frequency = <400000>;
PATCH 1/3 ARM: dts: r8a7792: add QSPI clock
In reply to Sergei ShtylyovQuoted 6 lines · Sergei Shtylyov
Describe the QSPI clock in the R8A7792 device tree.
Based on the original (and large) patch by Vladimir Barinov <[email protected]>.
Signed-off-by Sergei Shtylyov <[email protected]>
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/3 ARM: dts: r8a7792: add QSPI support
In reply to Sergei ShtylyovQuoted 6 lines · Sergei Shtylyov
Define the generic R8A7792 part of the QSPI device node.
Based on the original (and large) patch by Vladimir Barinov <[email protected]>.
Signed-off-by Sergei Shtylyov <[email protected]>
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 3/3 ARM: dts: wheat: add QSPI support
In reply to Sergei ShtylyovQuoted 7 lines · Sergei Shtylyov
Define the Wheat 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 (and large) patch by Vladimir Barinov <[email protected]>.
Signed-off-by Sergei Shtylyov <[email protected]>
Disclaimer: I have no board schematics nor manuals describing FLASH layout.
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
cover Add R8A7792/Wheat QSPI support
In reply to Sergei ShtylyovQuoted 11 lines · Sergei Shtylyov
Hello.
Here's the set of 3 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-20160902-v4.8-rc4' tag plus the Wheat board patches posted this week. We're adding the R8A7792/Wheat QSPI clocks and device nodes. The board patch depends on the PFC driver QSPI patch in order for the QSPI pins to be configured...[1/3] ARM: dts: r8a7792: add QSPI clock
[2/3] ARM: dts: r8a7792: add QSPI support
[3/3] ARM: dts: wheat: add QSPI support
Thanks, I have queued these up.