All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] arm64: dts: renesas: r8a779f0: Add HSCIF 0+1 nodes
@ 2022-06-13 13:10 Wolfram Sang
  2022-06-13 13:10 ` [PATCH 2/2] arm64: dts: renesas: spider-cpu: Switch from SCIF3 to HSCIF0 Wolfram Sang
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfram Sang @ 2022-06-13 13:10 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: Linh Phung, Wolfram Sang, Geert Uytterhoeven, Magnus Damm,
	Rob Herring, Krzysztof Kozlowski, devicetree, linux-kernel

From: Linh Phung <linh.phung.jy@renesas.com>

Extracted from a bigger patch in the BSP, rebased and DMA
properties added. HSCIF0+1 work fine, HSCIF2+3 skipped because they
haven't been tested yet.

Signed-off-by: Linh Phung <linh.phung.jy@renesas.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 arch/arm64/boot/dts/renesas/r8a779f0.dtsi | 34 +++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a779f0.dtsi b/arch/arm64/boot/dts/renesas/r8a779f0.dtsi
index d89064f86d85..ebc4a052207a 100644
--- a/arch/arm64/boot/dts/renesas/r8a779f0.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a779f0.dtsi
@@ -271,6 +271,40 @@ i2c5: i2c@e66e0000 {
 			status = "disabled";
 		};
 
+		hscif0: serial@e6540000 {
+			compatible = "renesas,hscif-r8a779f0",
+				     "renesas,rcar-gen4-hscif", "renesas,hscif";
+			reg = <0 0xe6540000 0 0x60>;
+			interrupts = <GIC_SPI 245 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 514>,
+				 <&cpg CPG_CORE R8A779F0_CLK_S0D3>,
+				 <&scif_clk>;
+			clock-names = "fck", "brg_int", "scif_clk";
+			dmas = <&dmac0 0x31>, <&dmac0 0x30>,
+			       <&dmac1 0x31>, <&dmac1 0x30>;
+			dma-names = "tx", "rx", "tx", "rx";
+			power-domains = <&sysc R8A779F0_PD_ALWAYS_ON>;
+			resets = <&cpg 514>;
+			status = "disabled";
+		};
+
+		hscif1: serial@e6550000 {
+			compatible = "renesas,hscif-r8a779f0",
+				     "renesas,rcar-gen4-hscif", "renesas,hscif";
+			reg = <0 0xe6550000 0 0x60>;
+			interrupts = <GIC_SPI 246 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 515>,
+				 <&cpg CPG_CORE R8A779F0_CLK_S0D3>,
+				 <&scif_clk>;
+			clock-names = "fck", "brg_int", "scif_clk";
+			dmas = <&dmac0 0x33>, <&dmac0 0x32>,
+			       <&dmac1 0x33>, <&dmac1 0x32>;
+			dma-names = "tx", "rx", "tx", "rx";
+			power-domains = <&sysc R8A779F0_PD_ALWAYS_ON>;
+			resets = <&cpg 515>;
+			status = "disabled";
+		};
+
 		scif3: serial@e6c50000 {
 			compatible = "renesas,scif-r8a779f0",
 				     "renesas,rcar-gen4-scif", "renesas,scif";
-- 
2.35.1


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

* [PATCH 2/2] arm64: dts: renesas: spider-cpu: Switch from SCIF3 to HSCIF0
  2022-06-13 13:10 [PATCH 1/2] arm64: dts: renesas: r8a779f0: Add HSCIF 0+1 nodes Wolfram Sang
@ 2022-06-13 13:10 ` Wolfram Sang
  2022-06-15  9:06   ` Geert Uytterhoeven
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfram Sang @ 2022-06-13 13:10 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: Wolfram Sang, Geert Uytterhoeven, Magnus Damm, Rob Herring,
	Krzysztof Kozlowski, devicetree, linux-kernel

Every loader before Linux utilizes HSCIF0 with a speed of 1843200bps.
Make Linux behave the same.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 .../boot/dts/renesas/r8a779f0-spider-cpu.dtsi | 26 +++++++++----------
 .../boot/dts/renesas/r8a779f0-spider.dts      |  4 +--
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/arch/arm64/boot/dts/renesas/r8a779f0-spider-cpu.dtsi b/arch/arm64/boot/dts/renesas/r8a779f0-spider-cpu.dtsi
index 41aa8591b3b1..3208d2148768 100644
--- a/arch/arm64/boot/dts/renesas/r8a779f0-spider-cpu.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a779f0-spider-cpu.dtsi
@@ -31,6 +31,14 @@ &extalr_clk {
 	clock-frequency = <32768>;
 };
 
+&hscif0 {
+	pinctrl-0 = <&hscif0_pins>;
+	pinctrl-names = "default";
+
+	uart-has-rtscts;
+	status = "okay";
+};
+
 &i2c4 {
 	pinctrl-0 = <&i2c4_pins>;
 	pinctrl-names = "default";
@@ -50,16 +58,16 @@ &pfc {
 	pinctrl-0 = <&scif_clk_pins>;
 	pinctrl-names = "default";
 
+	hscif0_pins: hscif0 {
+		groups = "hscif0_data", "hscif0_ctrl";
+		function = "hscif0";
+	};
+
 	i2c4_pins: i2c4 {
 		groups = "i2c4";
 		function = "i2c4";
 	};
 
-	scif3_pins: scif3 {
-		groups = "scif3_data", "scif3_ctrl";
-		function = "scif3";
-	};
-
 	scif_clk_pins: scif_clk {
 		groups = "scif_clk";
 		function = "scif_clk";
@@ -71,14 +79,6 @@ &rwdt {
 	status = "okay";
 };
 
-&scif3 {
-	pinctrl-0 = <&scif3_pins>;
-	pinctrl-names = "default";
-
-	uart-has-rtscts;
-	status = "okay";
-};
-
 &scif_clk {
 	clock-frequency = <24000000>;
 };
diff --git a/arch/arm64/boot/dts/renesas/r8a779f0-spider.dts b/arch/arm64/boot/dts/renesas/r8a779f0-spider.dts
index 2e3b719cc749..954ba227bfa7 100644
--- a/arch/arm64/boot/dts/renesas/r8a779f0-spider.dts
+++ b/arch/arm64/boot/dts/renesas/r8a779f0-spider.dts
@@ -14,11 +14,11 @@ / {
 	compatible = "renesas,spider-breakout", "renesas,spider-cpu", "renesas,r8a779f0";
 
 	aliases {
-		serial0 = &scif3;
+		serial0 = &hscif0;
 	};
 
 	chosen {
-		stdout-path = "serial0:115200n8";
+		stdout-path = "serial0:1843200n8";
 	};
 };
 
-- 
2.35.1


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

* Re: [PATCH 2/2] arm64: dts: renesas: spider-cpu: Switch from SCIF3 to HSCIF0
  2022-06-13 13:10 ` [PATCH 2/2] arm64: dts: renesas: spider-cpu: Switch from SCIF3 to HSCIF0 Wolfram Sang
@ 2022-06-15  9:06   ` Geert Uytterhoeven
  2022-06-15  9:37     ` Wolfram Sang
  0 siblings, 1 reply; 5+ messages in thread
From: Geert Uytterhoeven @ 2022-06-15  9:06 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Linux-Renesas, Magnus Damm, Rob Herring, Krzysztof Kozlowski,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

Hi Wolfram,

Thanks for your patch!

On Mon, Jun 13, 2022 at 3:10 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> Every loader before Linux utilizes HSCIF0 with a speed of 1843200bps.
> Make Linux behave the same.

Is that true for all boards? Was there a firmware flag day?
I.e. the U-Boot on the Spider in Magnus' lab has "baudrate=115200"
in its environment, while I can read the output from ICUMXA Loader
to U-Boot, and Linux just fine.

> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

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] 5+ messages in thread

* Re: [PATCH 2/2] arm64: dts: renesas: spider-cpu: Switch from SCIF3 to HSCIF0
  2022-06-15  9:06   ` Geert Uytterhoeven
@ 2022-06-15  9:37     ` Wolfram Sang
  2022-11-09 20:44       ` Geert Uytterhoeven
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfram Sang @ 2022-06-15  9:37 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linux-Renesas, Magnus Damm, Rob Herring, Krzysztof Kozlowski,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 396 bytes --]

Hi Geert,

> I.e. the U-Boot on the Spider in Magnus' lab has "baudrate=115200"
> in its environment, while I can read the output from ICUMXA Loader
> to U-Boot, and Linux just fine.

Earlier U-Boot may have no HSCIF support. Recent ones have and the
installer suggests to set baudrate to highspeed. ICUMXA loaders never
worked for me in 115200.

I can keep my patch local if you prefer 115200.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 2/2] arm64: dts: renesas: spider-cpu: Switch from SCIF3 to HSCIF0
  2022-06-15  9:37     ` Wolfram Sang
@ 2022-11-09 20:44       ` Geert Uytterhoeven
  0 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2022-11-09 20:44 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Linux-Renesas, Magnus Damm, Rob Herring, Krzysztof Kozlowski,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

Hi Wolfram,

On Wed, Jun 15, 2022 at 11:37 AM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> > I.e. the U-Boot on the Spider in Magnus' lab has "baudrate=115200"
> > in its environment, while I can read the output from ICUMXA Loader
> > to U-Boot, and Linux just fine.
>
> Earlier U-Boot may have no HSCIF support. Recent ones have and the
> installer suggests to set baudrate to highspeed. ICUMXA loaders never
> worked for me in 115200.
>
> I can keep my patch local if you prefer 115200.

As all active white-hawk users are now suffering from this,
I will queue your patch in renesas-devel for v6.2.

Thanks!

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] 5+ messages in thread

end of thread, other threads:[~2022-11-09 20:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-13 13:10 [PATCH 1/2] arm64: dts: renesas: r8a779f0: Add HSCIF 0+1 nodes Wolfram Sang
2022-06-13 13:10 ` [PATCH 2/2] arm64: dts: renesas: spider-cpu: Switch from SCIF3 to HSCIF0 Wolfram Sang
2022-06-15  9:06   ` Geert Uytterhoeven
2022-06-15  9:37     ` Wolfram Sang
2022-11-09 20:44       ` Geert Uytterhoeven

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.