* [cip-dev] [PATCH 1/3] spi: rspi: Add r8a7743/5 to the compatible list
2018-03-08 17:54 [cip-dev] [PATCH 0/3] Add SPI flash support to r8a7743 Fabrizio Castro
@ 2018-03-08 17:54 ` Fabrizio Castro
2018-03-08 17:54 ` [cip-dev] [PATCH 2/3] ARM: dts: r8a7743: Add QSPI support Fabrizio Castro
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Fabrizio Castro @ 2018-03-08 17:54 UTC (permalink / raw)
To: cip-dev
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 10c1705eced11d6ad710fddcdb57aaa9f85a6f98)
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
Documentation/devicetree/bindings/spi/spi-rspi.txt | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/spi/spi-rspi.txt b/Documentation/devicetree/bindings/spi/spi-rspi.txt
index 8f4169f..3b02b3a 100644
--- a/Documentation/devicetree/bindings/spi/spi-rspi.txt
+++ b/Documentation/devicetree/bindings/spi/spi-rspi.txt
@@ -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)
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [cip-dev] [PATCH 2/3] ARM: dts: r8a7743: Add QSPI support
2018-03-08 17:54 [cip-dev] [PATCH 0/3] Add SPI flash support to r8a7743 Fabrizio Castro
2018-03-08 17:54 ` [cip-dev] [PATCH 1/3] spi: rspi: Add r8a7743/5 to the compatible list Fabrizio Castro
@ 2018-03-08 17:54 ` Fabrizio Castro
2018-03-08 17:54 ` [cip-dev] [PATCH 3/3] ARM: dts: iwg20m: Add SPI NOR support Fabrizio Castro
2018-04-10 17:53 ` [cip-dev] [PATCH 0/3] Add SPI flash support to r8a7743 Ben Hutchings
3 siblings, 0 replies; 5+ messages in thread
From: Fabrizio Castro @ 2018-03-08 17:54 UTC (permalink / raw)
To: cip-dev
Add the DT node for the QSPI interface to the SoC dtsi.
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Chris Paterson <chris.paterson2@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 450c03718e971880ae067dc5f94a86f961acd6c3)
(changed clocks and power-domains property, removed resets property)
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
arch/arm/boot/dts/r8a7743.dtsi | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7743.dtsi b/arch/arm/boot/dts/r8a7743.dtsi
index 0cdfb6b..a6f953b 100644
--- a/arch/arm/boot/dts/r8a7743.dtsi
+++ b/arch/arm/boot/dts/r8a7743.dtsi
@@ -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";
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [cip-dev] [PATCH 3/3] ARM: dts: iwg20m: Add SPI NOR support
2018-03-08 17:54 [cip-dev] [PATCH 0/3] Add SPI flash support to r8a7743 Fabrizio Castro
2018-03-08 17:54 ` [cip-dev] [PATCH 1/3] spi: rspi: Add r8a7743/5 to the compatible list Fabrizio Castro
2018-03-08 17:54 ` [cip-dev] [PATCH 2/3] ARM: dts: r8a7743: Add QSPI support Fabrizio Castro
@ 2018-03-08 17:54 ` Fabrizio Castro
2018-04-10 17:53 ` [cip-dev] [PATCH 0/3] Add SPI flash support to r8a7743 Ben Hutchings
3 siblings, 0 replies; 5+ messages in thread
From: Fabrizio Castro @ 2018-03-08 17:54 UTC (permalink / raw)
To: cip-dev
Add support for the SPI NOR device used to boot up the system
to the System on Module DT.
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Chris Paterson <chris.paterson2@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 781e923a5fe4751d3aaa740ca3de0f9d179c34ef)
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
---
arch/arm/boot/dts/r8a7743-iwg20m.dtsi | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7743-iwg20m.dtsi b/arch/arm/boot/dts/r8a7743-iwg20m.dtsi
index 4119737..75a8ca5 100644
--- a/arch/arm/boot/dts/r8a7743-iwg20m.dtsi
+++ b/arch/arm/boot/dts/r8a7743-iwg20m.dtsi
@@ -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";
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [cip-dev] [PATCH 0/3] Add SPI flash support to r8a7743
2018-03-08 17:54 [cip-dev] [PATCH 0/3] Add SPI flash support to r8a7743 Fabrizio Castro
` (2 preceding siblings ...)
2018-03-08 17:54 ` [cip-dev] [PATCH 3/3] ARM: dts: iwg20m: Add SPI NOR support Fabrizio Castro
@ 2018-04-10 17:53 ` Ben Hutchings
3 siblings, 0 replies; 5+ messages in thread
From: Ben Hutchings @ 2018-04-10 17:53 UTC (permalink / raw)
To: cip-dev
I've applied this series, thanks.
Ben.
On Thu, 2018-03-08 at 17:54 +0000, Fabrizio Castro wrote:
> 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(-)
>
--
Ben Hutchings
Software Developer, Codethink Ltd.
^ permalink raw reply [flat|nested] 5+ messages in thread