linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Add R8A77970 RPC-IF support
@ 2020-06-19 20:20 Sergei Shtylyov
  2020-06-19 20:21 ` [PATCH v2 1/2] arm64: dts: renesas: r8a77970: add " Sergei Shtylyov
  2020-06-19 20:22 ` [PATCH v2 2/2] arm64: dts: renesas: r8a77980: eagle/v3msk: add QSPI flash support Sergei Shtylyov
  0 siblings, 2 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2020-06-19 20:20 UTC (permalink / raw)
  To: Geert Uytterhoeven, devicetree, Rob Herring
  Cc: linux-renesas-soc, Magnus Damm

Hello!

Here's the set of 2 patches against Geert's 'renesas-devel.git' repo's
'renesas-devel-2020-06-15-v5.8-rc1' tag. I'm adding the RPC-IF device node
for R8A77970 (based on the RPC-IF driver) and describing the QSPI flashes
connected to RPC-IF on the Eagle and V3M Starter Kit boards. Feel free to
merge the 1st patch back to the R8A77980 patch from which the former one
was split.

[1/2] arm64: dts: renesas: r8a77970: add RPC-IF support
[2/2] arm64: dts: renesas: r8a77980: eagle/v3msk: add QSPI flash support

WBR, Sergei

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 1/2] arm64: dts: renesas: r8a77970: add RPC-IF support
  2020-06-19 20:20 [PATCH v2 0/2] Add R8A77970 RPC-IF support Sergei Shtylyov
@ 2020-06-19 20:21 ` Sergei Shtylyov
  2020-07-07  9:43   ` Geert Uytterhoeven
  2020-06-19 20:22 ` [PATCH v2 2/2] arm64: dts: renesas: r8a77980: eagle/v3msk: add QSPI flash support Sergei Shtylyov
  1 sibling, 1 reply; 6+ messages in thread
From: Sergei Shtylyov @ 2020-06-19 20:21 UTC (permalink / raw)
  To: Geert Uytterhoeven, devicetree, Rob Herring
  Cc: linux-renesas-soc, Magnus Damm

Describe RPC-IF in the R8A77970 device tree.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
Changes in version 2:
- removed the R8A77980 part, renamed the patch, and updated the description;
- renamed the RPC-IF node to "spi@ee200000";
- updated the R8A77970 RPC-IF "compatible" prop to match the bindings;
- split the 1st region in the "reg"/"reg-names" props for the WBUF registers;
- refreshed the patch.

 arch/arm64/boot/dts/renesas/r8a77970.dtsi |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

Index: renesas-devel/arch/arm64/boot/dts/renesas/r8a77970.dtsi
===================================================================
--- renesas-devel.orig/arch/arm64/boot/dts/renesas/r8a77970.dtsi
+++ renesas-devel/arch/arm64/boot/dts/renesas/r8a77970.dtsi
@@ -1039,6 +1039,23 @@
 			status = "disabled";
 		};
 
+		rpc: spi@ee200000 {
+			compatible = "renesas,r8a77970-rpc-if",
+				     "renesas,rcar-gen3-rpc-if";
+			reg = <0 0xee200000 0 0x200>,
+			      <0 0x08000000 0 0x4000000>,
+			      <0 0xee208000 0 0x100>;
+			reg-names = "regs", "dirmap", "wbuf";
+			interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 917>;
+			clock-names = "rpc";
+			power-domains = <&sysc R8A77970_PD_ALWAYS_ON>;
+			resets = <&cpg 917>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
 		gic: interrupt-controller@f1010000 {
 			compatible = "arm,gic-400";
 			#interrupt-cells = <3>;

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 2/2] arm64: dts: renesas: r8a77980: eagle/v3msk: add QSPI flash support
  2020-06-19 20:20 [PATCH v2 0/2] Add R8A77970 RPC-IF support Sergei Shtylyov
  2020-06-19 20:21 ` [PATCH v2 1/2] arm64: dts: renesas: r8a77970: add " Sergei Shtylyov
@ 2020-06-19 20:22 ` Sergei Shtylyov
  2020-06-25  9:36   ` Sergei Shtylyov
  2020-07-07  9:54   ` Geert Uytterhoeven
  1 sibling, 2 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2020-06-19 20:22 UTC (permalink / raw)
  To: Geert Uytterhoeven, devicetree, Rob Herring
  Cc: linux-renesas-soc, Magnus Damm

Define the Eagle/V3MSK board dependent parts of the RPC-IF device node.
Add device nodes for Spansion S25FS512S SPI flash and MTD partitions on it.

Based on the original patches by Dmitry Shifrin.

Signed-off-by: Dmitry Shifrin <dmitry.shifrin@cogentembedded.com>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
 arch/arm64/boot/dts/renesas/r8a77970-eagle.dts |   67 +++++++++++++++++++++++++
 arch/arm64/boot/dts/renesas/r8a77970-v3msk.dts |   67 +++++++++++++++++++++++++
 2 files changed, 134 insertions(+)

Index: renesas-devel/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts
===================================================================
--- renesas-devel.orig/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts
+++ renesas-devel/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts
@@ -187,12 +187,79 @@
 		function = "i2c0";
 	};
 
+	qspi0_pins: qspi0 {
+		groups = "qspi0_ctrl", "qspi0_data4";
+		function = "qspi0";
+	};
+
 	scif0_pins: scif0 {
 		groups = "scif0_data";
 		function = "scif0";
 	};
 };
 
+&rpc {
+	pinctrl-0 = <&qspi0_pins>;
+	pinctrl-names = "default";
+
+	status = "okay";
+
+	flash@0 {
+		compatible = "spansion,s25fs512s", "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <50000000>;
+		spi-rx-bus-width = <4>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			bootparam@0 {
+				reg = <0x00000000 0x040000>;
+				read-only;
+			};
+			cr7@40000 {
+				reg = <0x00040000 0x080000>;
+				read-only;
+			};
+			cert_header_sa3@c0000 {
+				reg = <0x000c0000 0x080000>;
+				read-only;
+			};
+			bl2@140000 {
+				reg = <0x00140000 0x040000>;
+				read-only;
+			};
+			cert_header_sa6@180000 {
+				reg = <0x00180000 0x040000>;
+				read-only;
+			};
+			bl31@1c0000 {
+				reg = <0x001c0000 0x460000>;
+				read-only;
+			};
+			uboot@640000 {
+				reg = <0x00640000 0x0c0000>;
+				read-only;
+			};
+			uboot-env@700000 {
+				reg = <0x00700000 0x040000>;
+				read-only;
+			};
+			dtb@740000 {
+				reg = <0x00740000 0x080000>;
+			};
+			kernel@7c0000 {
+				reg = <0x007c0000 0x1400000>;
+			};
+			user@1bc0000 {
+				reg = <0x01bc0000 0x2440000>;
+			};
+		};
+	};
+};
+
 &rwdt {
 	timeout-sec = <60>;
 	status = "okay";
Index: renesas-devel/arch/arm64/boot/dts/renesas/r8a77970-v3msk.dts
===================================================================
--- renesas-devel.orig/arch/arm64/boot/dts/renesas/r8a77970-v3msk.dts
+++ renesas-devel/arch/arm64/boot/dts/renesas/r8a77970-v3msk.dts
@@ -212,12 +212,79 @@
 		power-source = <3300>;
 	};
 
+	qspi0_pins: qspi0 {
+		groups = "qspi0_ctrl", "qspi0_data4";
+		function = "qspi0";
+	};
+
 	scif0_pins: scif0 {
 		groups = "scif0_data";
 		function = "scif0";
 	};
 };
 
+&rpc {
+	pinctrl-0 = <&qspi0_pins>;
+	pinctrl-names = "default";
+
+	status = "okay";
+
+	flash@0 {
+		compatible = "spansion,s25fs512s", "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <50000000>;
+		spi-rx-bus-width = <4>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			bootparam@0 {
+				reg = <0x00000000 0x040000>;
+				read-only;
+			};
+			cr7@40000 {
+				reg = <0x00040000 0x080000>;
+				read-only;
+			};
+			cert_header_sa3@c0000 {
+				reg = <0x000c0000 0x080000>;
+				read-only;
+			};
+			bl2@140000 {
+				reg = <0x00140000 0x040000>;
+				read-only;
+			};
+			cert_header_sa6@180000 {
+				reg = <0x00180000 0x040000>;
+				read-only;
+			};
+			bl31@1c0000 {
+				reg = <0x001c0000 0x460000>;
+				read-only;
+			};
+			uboot@640000 {
+				reg = <0x00640000 0x0c0000>;
+				read-only;
+			};
+			uboot-env@700000 {
+				reg = <0x00700000 0x040000>;
+				read-only;
+			};
+			dtb@740000 {
+				reg = <0x00740000 0x080000>;
+			};
+			kernel@7c0000 {
+				reg = <0x007c0000 0x1400000>;
+			};
+			user@1bc0000 {
+				reg = <0x01bc0000 0x2440000>;
+			};
+		};
+	};
+};
+
 &scif0 {
 	pinctrl-0 = <&scif0_pins>;
 	pinctrl-names = "default";

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 2/2] arm64: dts: renesas: r8a77980: eagle/v3msk: add QSPI flash support
  2020-06-19 20:22 ` [PATCH v2 2/2] arm64: dts: renesas: r8a77980: eagle/v3msk: add QSPI flash support Sergei Shtylyov
@ 2020-06-25  9:36   ` Sergei Shtylyov
  2020-07-07  9:54   ` Geert Uytterhoeven
  1 sibling, 0 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2020-06-25  9:36 UTC (permalink / raw)
  To: Geert Uytterhoeven, devicetree, Rob Herring
  Cc: linux-renesas-soc, Magnus Damm

Hello!

    The subject should read r8a77970, thanks Geert for noticing...

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/2] arm64: dts: renesas: r8a77970: add RPC-IF support
  2020-06-19 20:21 ` [PATCH v2 1/2] arm64: dts: renesas: r8a77970: add " Sergei Shtylyov
@ 2020-07-07  9:43   ` Geert Uytterhoeven
  0 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2020-07-07  9:43 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Rob Herring, Linux-Renesas, Magnus Damm

On Fri, Jun 19, 2020 at 10:21 PM Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> Describe RPC-IF in the R8A77970 device tree.
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-devel for v5.9.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 2/2] arm64: dts: renesas: r8a77980: eagle/v3msk: add QSPI flash support
  2020-06-19 20:22 ` [PATCH v2 2/2] arm64: dts: renesas: r8a77980: eagle/v3msk: add QSPI flash support Sergei Shtylyov
  2020-06-25  9:36   ` Sergei Shtylyov
@ 2020-07-07  9:54   ` Geert Uytterhoeven
  1 sibling, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2020-07-07  9:54 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Rob Herring, Linux-Renesas, Magnus Damm

Hi Sergei,

On Fri, Jun 19, 2020 at 10:22 PM Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> Define the Eagle/V3MSK board dependent parts of the RPC-IF device node.
> Add device nodes for Spansion S25FS512S SPI flash and MTD partitions on it.
>
> Based on the original patches by Dmitry Shifrin.
>
> Signed-off-by: Dmitry Shifrin <dmitry.shifrin@cogentembedded.com>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

Thanks for your patch!

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-devel for v5.9, with the subject fixed.

However, one question below...

> --- renesas-devel.orig/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts
> +++ renesas-devel/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts
> @@ -187,12 +187,79 @@
>                 function = "i2c0";
>         };
>
> +       qspi0_pins: qspi0 {
> +               groups = "qspi0_ctrl", "qspi0_data4";
> +               function = "qspi0";
> +       };
> +
>         scif0_pins: scif0 {
>                 groups = "scif0_data";
>                 function = "scif0";
>         };
>  };
>
> +&rpc {
> +       pinctrl-0 = <&qspi0_pins>;
> +       pinctrl-names = "default";
> +
> +       status = "okay";
> +
> +       flash@0 {
> +               compatible = "spansion,s25fs512s", "jedec,spi-nor";
> +               reg = <0>;
> +               spi-max-frequency = <50000000>;
> +               spi-rx-bus-width = <4>;

Why no "spi-tx-bus-width = <4>;"? Same for V3MSK.
If there's no good reason to omit it, I'll add it when applying.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-07-07  9:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-19 20:20 [PATCH v2 0/2] Add R8A77970 RPC-IF support Sergei Shtylyov
2020-06-19 20:21 ` [PATCH v2 1/2] arm64: dts: renesas: r8a77970: add " Sergei Shtylyov
2020-07-07  9:43   ` Geert Uytterhoeven
2020-06-19 20:22 ` [PATCH v2 2/2] arm64: dts: renesas: r8a77980: eagle/v3msk: add QSPI flash support Sergei Shtylyov
2020-06-25  9:36   ` Sergei Shtylyov
2020-07-07  9:54   ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).