Add SPI flash support to r8a7743
Subsystems (2)
cover Add SPI flash support to r8a7743
Dear All,
this patch backports all that is required to add SPI flash support to the r8a7743.
Thanks,
Fabrizio Castro (3):
spi: rspi: Add r8a7743/5 to the compatible list
ARM: dts: r8a7743: Add QSPI support
ARM: dts: iwg20m: Add SPI NOR support
Documentation/devicetree/bindings/spi/spi-rspi.txt | 5 ++++- arch/arm/boot/dts/r8a7743-iwg20m.dtsi | 26 ++++++++++++++++++++++ arch/arm/boot/dts/r8a7743.dtsi | 16 +++++++++++++ 3 files changed, 46 insertions(+), 1 deletion(-)
Signature · 1 line
2.7.4
PATCH 1/3 spi: rspi: Add r8a7743/5 to the compatible list
--- Documentation/devicetree/bindings/spi/spi-rspi.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/spi/spi-rspi.txt +4 -1
@@ -5,11 +5,14 @@ Required properties: "renesas,rspi-<soctype>", "renesas,rspi" as fallback. For Renesas Serial Peripheral Interface on RZ/A1H: "renesas,rspi-<soctype>", "renesas,rspi-rz" as fallback. - For Quad Serial Peripheral Interface on R-Car Gen2: + For Quad Serial Peripheral Interface on R-Car Gen2 and + RZ/G1 devices: "renesas,qspi-<soctype>", "renesas,qspi" as fallback. Examples with soctypes are: - "renesas,rspi-sh7757" (SH) - "renesas,rspi-r7s72100" (RZ/A1H) + - "renesas,qspi-r8a7743" (RZ/G1M) + - "renesas,qspi-r8a7745" (RZ/G1E) - "renesas,qspi-r8a7790" (R-Car H2) - "renesas,qspi-r8a7791" (R-Car M2-W) - "renesas,qspi-r8a7792" (R-Car V2H)
Signature · 1 line
2.7.4
PATCH 2/3 ARM: dts: r8a7743: Add QSPI support
In reply to Fabrizio CastroAdd the DT node for the QSPI interface to the SoC dtsi.
(changed clocks and power-domains property, removed resets property)
--- arch/arm/boot/dts/r8a7743.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
arch/arm/boot/dts/r8a7743.dtsi +16 -0
@@ -28,6 +28,7 @@ i2c6 = &iic0; i2c7 = &iic1; i2c8 = &iic3; + spi0 = &qspi; spi1 = &msiof0; spi2 = &msiof1; spi3 = &msiof2;
@@ -782,6 +783,21 @@ status = "disabled"; }; + qspi: spi at e6b10000 { + compatible = "renesas,qspi-r8a7743", "renesas,qspi"; + reg = <0 0xe6b10000 0 0x2c>; + interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp9_clks R8A7743_CLK_QSPI_MOD>; + dmas = <&dmac0 0x17>, <&dmac0 0x18>, + <&dmac1 0x17>, <&dmac1 0x18>; + dma-names = "tx", "rx", "tx", "rx"; + power-domains = <&cpg_clocks>; + num-cs = <1>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + msiof0: spi at e6e20000 { compatible = "renesas,msiof-r8a7743", "renesas,rcar-gen2-msiof";
Signature · 1 line
2.7.4
PATCH 3/3 ARM: dts: iwg20m: Add SPI NOR support
In reply to Fabrizio CastroAdd support for the SPI NOR device used to boot up the system to the System on Module DT.
--- arch/arm/boot/dts/r8a7743-iwg20m.dtsi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
arch/arm/boot/dts/r8a7743-iwg20m.dtsi +26 -0
@@ -44,6 +44,11 @@ function = "mmc"; }; + qspi_pins: qspi { + groups = "qspi_ctrl", "qspi_data2"; + function = "qspi"; + }; + sdhi0_pins: sd0 { groups = "sdhi0_data4", "sdhi0_ctrl"; function = "sdhi0";
@@ -61,6 +66,27 @@ status = "okay"; }; +&qspi { + pinctrl-0 = <&qspi_pins>; + pinctrl-names = "default"; + + status = "okay"; + + /* WARNING - This device contains the bootloader. Handle with care. */ + flash: flash at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "sst,sst25vf016b", "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + spi-tx-bus-width = <1>; + spi-rx-bus-width = <1>; + m25p,fast-read; + spi-cpol; + spi-cpha; + }; +}; + &sdhi0 { pinctrl-0 = <&sdhi0_pins>; pinctrl-names = "default";
Signature · 1 line
2.7.4
Ben Hutchings
Appliedcover Add SPI flash support to r8a7743
In reply to Fabrizio CastroI've applied this series, thanks.
Ben.
Quoted 17 lines · Fabrizio Castro
Dear All,
this patch backports all that is required to add SPI flash support to the r8a7743.
Thanks,
Fabrizio Castro (3):
? spi: rspi: Add r8a7743/5 to the compatible list
? ARM: dts: r8a7743: Add QSPI support
? ARM: dts: iwg20m: Add SPI NOR support?Documentation/devicetree/bindings/spi/spi-rspi.txt |??5 ++++- ?arch/arm/boot/dts/r8a7743-iwg20m.dtsi??????????????| 26 ++++++++++++++++++++++ ?arch/arm/boot/dts/r8a7743.dtsi?????????????????????| 16 +++++++++++++?3 files changed, 46 insertions(+), 1 deletion(-)
Signature · 2 lines
Ben Hutchings Software Developer, Codethink Ltd.