Skip to contentSkip to conversation

arm64: dts: renesas: r8a779h0/gray-hawk-single: Add remaining serial ports

PATCH In review Geert Uytterhoeven 2 participants 5 messages Mar 12, 2024

Subsystems (2)
lore
Share & tools
lore

Geert Uytterhoeven

author maintainer
#0 lore raw

cover arm64: dts: renesas: r8a779h0/gray-hawk-single: Add remaining serial ports

Hi all,

This patch series adds the remaining (High) Speed Serial Communication Interfaces with FIFO ((H)SCIF) on the Renesas R-Car V4M (R8A779H0) SoC, and enables the second debug serial port on the Renesas Gray Hawk Single development board.

As SCIF0 can use the same pins as HSCIF0, it has been tested by switching the first debug serial port from HSCIF0 to SCIF0.

I plan to queue this in renesas-devel for v6.10.

Thanks for your comments!

Geert Uytterhoeven (3):
arm64: dts: renesas: r8a779h0: Add remaining HSCIF nodes
arm64: dts: renesas: r8a779h0: Add SCIF nodes
arm64: dts: renesas: gray-hawk-single: Add second debug serial port

 .../dts/renesas/r8a779h0-gray-hawk-single.dts |  25 +++-
 arch/arm64/boot/dts/renesas/r8a779h0.dtsi     | 127 +++++++++++++++++-
 2 files changed, 150 insertions(+), 2 deletions(-)
Signature · 12 lines
2.34.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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
author maintainer
#1 lore raw

PATCH 1/3 arm64: dts: renesas: r8a779h0: Add remaining HSCIF nodes

Add device nodes for the remaining High Speed Serial Communication Interfaces with FIFO (HSCIF) on the Renesas R-Car V4M (R8A779H0) SoC, including DMA support and the optional external clock source used by HSCIF2.

Based on a patch in the BSP by Nghia Nguyen.

---
Changes compared to the BSP:
- Update External SCIF clock comment for multiple clocks,
- Insert "-clk" into scif2 clock node name,
- Change "scif_clk2" to "scif_clk" in clock-names for HSCIF2,
- Add DMA properies.

---
 arch/arm64/boot/dts/renesas/r8a779h0.dtsi | 59 ++++++++++++++++++++++-
 1 file changed, 58 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/renesas/r8a779h0.dtsi +58 -1
index a01929231e08fa30..4bad906bf2cb155b 100644
@@ -144,13 +144,19 @@ psci {
 		method = "smc";
 	};
 
-	/* External SCIF clock - to be overridden by boards that provide it */
+	/* External SCIF clocks - to be overridden by boards that provide them */
 	scif_clk: scif-clk {
 		compatible = "fixed-clock";
 		#clock-cells = <0>;
 		clock-frequency = <0>;
 	};
 
+	scif_clk2: scif-clk2 {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <0>;
+	};
+
 	soc: soc {
 		compatible = "simple-bus";
 		interrupt-parent = <&gic>;
@@ -413,6 +419,57 @@ hscif0: serial@e6540000 {
 			status = "disabled";
 		};
 
+		hscif1: serial@e6550000 {
+			compatible = "renesas,hscif-r8a779h0",
+				     "renesas,rcar-gen4-hscif", "renesas,hscif";
+			reg = <0 0xe6550000 0 0x60>;
+			interrupts = <GIC_SPI 247 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 515>,
+				 <&cpg CPG_CORE R8A779H0_CLK_SASYNCPERD1>,
+				 <&scif_clk>;
+			clock-names = "fck", "brg_int", "scif_clk";
+			power-domains = <&sysc R8A779H0_PD_ALWAYS_ON>;
+			resets = <&cpg 515>;
+			dmas = <&dmac1 0x33>, <&dmac1 0x32>,
+			       <&dmac2 0x33>, <&dmac2 0x32>;
+			dma-names = "tx", "rx", "tx", "rx";
+			status = "disabled";
+		};
+
+		hscif2: serial@e6560000 {
+			compatible = "renesas,hscif-r8a779h0",
+				     "renesas,rcar-gen4-hscif", "renesas,hscif";
+			reg = <0 0xe6560000 0 0x60>;
+			interrupts = <GIC_SPI 248 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 516>,
+				 <&cpg CPG_CORE R8A779H0_CLK_SASYNCPERD1>,
+				 <&scif_clk2>;
+			clock-names = "fck", "brg_int", "scif_clk";
+			power-domains = <&sysc R8A779H0_PD_ALWAYS_ON>;
+			resets = <&cpg 516>;
+			dmas = <&dmac1 0x35>, <&dmac1 0x34>,
+			       <&dmac2 0x35>, <&dmac2 0x34>;
+			dma-names = "tx", "rx", "tx", "rx";
+			status = "disabled";
+		};
+
+		hscif3: serial@e66a0000 {
+			compatible = "renesas,hscif-r8a779h0",
+				     "renesas,rcar-gen4-hscif", "renesas,hscif";
+			reg = <0 0xe66a0000 0 0x60>;
+			interrupts = <GIC_SPI 249 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 517>,
+				 <&cpg CPG_CORE R8A779H0_CLK_SASYNCPERD1>,
+				 <&scif_clk>;
+			clock-names = "fck", "brg_int", "scif_clk";
+			power-domains = <&sysc R8A779H0_PD_ALWAYS_ON>;
+			resets = <&cpg 517>;
+			dmas = <&dmac1 0x37>, <&dmac1 0x36>,
+			       <&dmac2 0x37>, <&dmac2 0x36>;
+			dma-names = "tx", "rx", "tx", "rx";
+			status = "disabled";
+		};
+
 		avb0: ethernet@e6800000 {
 			compatible = "renesas,etheravb-r8a779h0",
 				     "renesas,etheravb-rcar-gen4";
Signature · 1 line
2.34.1
author maintainer
#2 lore raw

PATCH 2/3 arm64: dts: renesas: r8a779h0: Add SCIF nodes

In reply to Geert Uytterhoeven

Add device nodes for the Serial Communication Interfaces with FIFO (SCIF) on the Renesas R-Car V4M (R8A779H0) SoC, including DMA support.

Based on a patch in the BSP by Nghia Nguyen.

---
Changes compared to the BSP:
- Change reg size from 0x64 to 64,
- Change "scif_clk2" to "scif_clk" in clock-names for SCIF4,
- Add DMA properies.

---
 arch/arm64/boot/dts/renesas/r8a779h0.dtsi | 68 +++++++++++++++++++++++
 1 file changed, 68 insertions(+)
arch/arm64/boot/dts/renesas/r8a779h0.dtsi +68 -0
index 4bad906bf2cb155b..3a40b56c4dcf113c 100644
@@ -614,6 +614,74 @@ avb2: ethernet@e6820000 {
 			status = "disabled";
 		};
 
+		scif0: serial@e6e60000 {
+			compatible = "renesas,scif-r8a779h0",
+				     "renesas,rcar-gen4-scif", "renesas,scif";
+			reg = <0 0xe6e60000 0 64>;
+			interrupts = <GIC_SPI 251 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 702>,
+				 <&cpg CPG_CORE R8A779H0_CLK_SASYNCPERD1>,
+				 <&scif_clk>;
+			clock-names = "fck", "brg_int", "scif_clk";
+			power-domains = <&sysc R8A779H0_PD_ALWAYS_ON>;
+			resets = <&cpg 702>;
+			dmas = <&dmac1 0x51>, <&dmac1 0x50>,
+			       <&dmac2 0x51>, <&dmac2 0x50>;
+			dma-names = "tx", "rx", "tx", "rx";
+			status = "disabled";
+		};
+
+		scif1: serial@e6e68000 {
+			compatible = "renesas,scif-r8a779h0",
+				     "renesas,rcar-gen4-scif", "renesas,scif";
+			reg = <0 0xe6e68000 0 64>;
+			interrupts = <GIC_SPI 252 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 703>,
+				 <&cpg CPG_CORE R8A779H0_CLK_SASYNCPERD1>,
+				 <&scif_clk>;
+			clock-names = "fck", "brg_int", "scif_clk";
+			power-domains = <&sysc R8A779H0_PD_ALWAYS_ON>;
+			resets = <&cpg 703>;
+			dmas = <&dmac1 0x53>, <&dmac1 0x52>,
+			       <&dmac2 0x53>, <&dmac2 0x52>;
+			dma-names = "tx", "rx", "tx", "rx";
+			status = "disabled";
+		};
+
+		scif3: serial@e6c50000 {
+			compatible = "renesas,scif-r8a779h0",
+				     "renesas,rcar-gen4-scif", "renesas,scif";
+			reg = <0 0xe6c50000 0 64>;
+			interrupts = <GIC_SPI 253 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 704>,
+				 <&cpg CPG_CORE R8A779H0_CLK_SASYNCPERD1>,
+				 <&scif_clk>;
+			clock-names = "fck", "brg_int", "scif_clk";
+			power-domains = <&sysc R8A779H0_PD_ALWAYS_ON>;
+			resets = <&cpg 704>;
+			dmas = <&dmac1 0x57>, <&dmac1 0x56>,
+			       <&dmac2 0x57>, <&dmac2 0x56>;
+			dma-names = "tx", "rx", "tx", "rx";
+			status = "disabled";
+		};
+
+		scif4: serial@e6c40000 {
+			compatible = "renesas,scif-r8a779h0",
+				     "renesas,rcar-gen4-scif", "renesas,scif";
+			reg = <0 0xe6c40000 0 64>;
+			interrupts = <GIC_SPI 254 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 705>,
+				 <&cpg CPG_CORE R8A779H0_CLK_SASYNCPERD1>,
+				 <&scif_clk2>;
+			clock-names = "fck", "brg_int", "scif_clk";
+			power-domains = <&sysc R8A779H0_PD_ALWAYS_ON>;
+			resets = <&cpg 705>;
+			dmas = <&dmac1 0x59>, <&dmac1 0x58>,
+			       <&dmac2 0x59>, <&dmac2 0x58>;
+			dma-names = "tx", "rx", "tx", "rx";
+			status = "disabled";
+		};
+
 		dmac1: dma-controller@e7350000 {
 			compatible = "renesas,dmac-r8a779h0",
 				     "renesas,rcar-gen4-dmac";
Signature · 1 line
2.34.1
author maintainer
#3 lore raw

PATCH 3/3 arm64: dts: renesas: gray-hawk-single: Add second debug serial port

In reply to Geert Uytterhoeven

Describe the second debug serial port (CN9800) on the Gray Hawk Single board, as provided by HSCIF2, including the SCIF_CLK2 external clock source, and all related pin control.

Based on a patch for Gray Hawk in the BSP by Nghia Nguyen.

---
 .../dts/renesas/r8a779h0-gray-hawk-single.dts | 25 ++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/renesas/r8a779h0-gray-hawk-single.dts +24 -1
index bc8616a56c039b20..acf1d625ec410e55 100644
@@ -18,6 +18,7 @@ / {
 
 	aliases {
 		serial0 = &hscif0;
+		serial1 = &hscif2;
 		ethernet0 = &avb0;
 	};
 
@@ -90,6 +91,14 @@ &hscif0 {
 	status = "okay";
 };
 
+&hscif2 {
+	pinctrl-0 = <&hscif2_pins>;
+	pinctrl-names = "default";
+
+	uart-has-rtscts;
+	status = "okay";
+};
+
 &i2c0 {
 	pinctrl-0 = <&i2c0_pins>;
 	pinctrl-names = "default";
@@ -144,7 +153,7 @@ &mmc0 {
 };
 
 &pfc {
-	pinctrl-0 = <&scif_clk_pins>;
+	pinctrl-0 = <&scif_clk_pins>, <&scif_clk2_pins>;
 	pinctrl-names = "default";
 
 	avb0_pins: avb0 {
@@ -170,6 +179,11 @@ hscif0_pins: hscif0 {
 		function = "hscif0";
 	};
 
+	hscif2_pins: hscif2 {
+		groups = "hscif2_data", "hscif2_ctrl";
+		function = "hscif2";
+	};
+
 	i2c0_pins: i2c0 {
 		groups = "i2c0";
 		function = "i2c0";
@@ -190,6 +204,11 @@ scif_clk_pins: scif-clk {
 		groups = "scif_clk";
 		function = "scif_clk";
 	};
+
+	scif_clk2_pins: scif-clk2 {
+		groups = "scif_clk2";
+		function = "scif_clk2";
+	};
 };
 
 &rpc {
@@ -228,3 +247,7 @@ &rwdt {
 &scif_clk {
 	clock-frequency = <24000000>;
 };
+
+&scif_clk2 {
+	clock-frequency = <24000000>;
+};
Signature · 1 line
2.34.1
maintainer
#4 lore raw
In reply to Geert Uytterhoeven
Quoted 28 lines · Geert Uytterhoeven

Hi all,

This patch series adds the remaining (High) Speed Serial Communication Interfaces with FIFO ((H)SCIF) on the Renesas R-Car V4M (R8A779H0) SoC, and enables the second debug serial port on the Renesas Gray Hawk Single development board.

As SCIF0 can use the same pins as HSCIF0, it has been tested by switching the first debug serial port from HSCIF0 to SCIF0.

I plan to queue this in renesas-devel for v6.10.

Thanks for your comments!

Geert Uytterhoeven (3):
arm64: dts: renesas: r8a779h0: Add remaining HSCIF nodes
arm64: dts: renesas: r8a779h0: Add SCIF nodes
arm64: dts: renesas: gray-hawk-single: Add second debug serial port

 .../dts/renesas/r8a779h0-gray-hawk-single.dts |  25 +++-
 arch/arm64/boot/dts/renesas/r8a779h0.dtsi     | 127 +++++++++++++++++-
 2 files changed, 150 insertions(+), 2 deletions(-)

--
2.34.1

Gr{oetje,eeting}s,

Quoted 10 lines

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

My bot found new DTB warnings on the .dts files added or changed in this series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings are fixed by another series. Ultimately, it is up to the platform maintainer whether these warnings are acceptable or not. No need to reply unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then make sure dt-schema is up to date:

  pip3 install dtschema --upgrade

New warnings running 'make CHECK_DTBS=y renesas/r8a779h0-gray-hawk-single.dtb' for [email protected]:

arch/arm64/boot/dts/renesas/r8a779h0-gray-hawk-single.dtb: serial@e6e60000: compatible: 'oneOf' conditional failed, one must be fixed:

	['renesas,scif-r8a779h0', 'renesas,rcar-gen4-scif', 'renesas,scif'] is too long
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r7s72100']
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r7s9210']
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r8a7778', 'renesas,scif-r8a7779']
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r8a7742', 'renesas,scif-r8a7743', 'renesas,scif-r8a7744', 'renesas,scif-r8a7745', 'renesas,scif-r8a77470', 'renesas,scif-r8a7790', 'renesas,scif-r8a7791', 'renesas,scif-r8a7792', 'renesas,scif-r8a7793', 'renesas,scif-r8a7794']
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r8a774a1', 'renesas,scif-r8a774b1', 'renesas,scif-r8a774c0', 'renesas,scif-r8a774e1', 'renesas,scif-r8a7795', 'renesas,scif-r8a7796', 'renesas,scif-r8a77961', 'renesas,scif-r8a77965', 'renesas,scif-r8a77970', 'renesas,scif-r8a77980', 'renesas,scif-r8a77990', 'renesas,scif-r8a77995']
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r8a779a0', 'renesas,scif-r8a779f0', 'renesas,scif-r8a779g0']
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r9a07g044']
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r9a07g043', 'renesas,scif-r9a07g054', 'renesas,scif-r9a08g045']
	'renesas,scif' was expected
	'renesas,rcar-gen1-scif' was expected
	'renesas,rcar-gen2-scif' was expected
	'renesas,rcar-gen3-scif' was expected
	'renesas,scif-r9a07g044' was expected
	from schema $id: http://devicetree.org/schemas/serial/renesas,scif.yaml#
arch/arm64/boot/dts/renesas/r8a779h0-gray-hawk-single.dtb: serial@e6e68000: compatible: 'oneOf' conditional failed, one must be fixed:
	['renesas,scif-r8a779h0', 'renesas,rcar-gen4-scif', 'renesas,scif'] is too long
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r7s72100']
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r7s9210']
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r8a7778', 'renesas,scif-r8a7779']
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r8a7742', 'renesas,scif-r8a7743', 'renesas,scif-r8a7744', 'renesas,scif-r8a7745', 'renesas,scif-r8a77470', 'renesas,scif-r8a7790', 'renesas,scif-r8a7791', 'renesas,scif-r8a7792', 'renesas,scif-r8a7793', 'renesas,scif-r8a7794']
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r8a774a1', 'renesas,scif-r8a774b1', 'renesas,scif-r8a774c0', 'renesas,scif-r8a774e1', 'renesas,scif-r8a7795', 'renesas,scif-r8a7796', 'renesas,scif-r8a77961', 'renesas,scif-r8a77965', 'renesas,scif-r8a77970', 'renesas,scif-r8a77980', 'renesas,scif-r8a77990', 'renesas,scif-r8a77995']
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r8a779a0', 'renesas,scif-r8a779f0', 'renesas,scif-r8a779g0']
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r9a07g044']
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r9a07g043', 'renesas,scif-r9a07g054', 'renesas,scif-r9a08g045']
	'renesas,scif' was expected
	'renesas,rcar-gen1-scif' was expected
	'renesas,rcar-gen2-scif' was expected
	'renesas,rcar-gen3-scif' was expected
	'renesas,scif-r9a07g044' was expected
	from schema $id: http://devicetree.org/schemas/serial/renesas,scif.yaml#
arch/arm64/boot/dts/renesas/r8a779h0-gray-hawk-single.dtb: serial@e6c50000: compatible: 'oneOf' conditional failed, one must be fixed:
	['renesas,scif-r8a779h0', 'renesas,rcar-gen4-scif', 'renesas,scif'] is too long
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r7s72100']
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r7s9210']
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r8a7778', 'renesas,scif-r8a7779']
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r8a7742', 'renesas,scif-r8a7743', 'renesas,scif-r8a7744', 'renesas,scif-r8a7745', 'renesas,scif-r8a77470', 'renesas,scif-r8a7790', 'renesas,scif-r8a7791', 'renesas,scif-r8a7792', 'renesas,scif-r8a7793', 'renesas,scif-r8a7794']
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r8a774a1', 'renesas,scif-r8a774b1', 'renesas,scif-r8a774c0', 'renesas,scif-r8a774e1', 'renesas,scif-r8a7795', 'renesas,scif-r8a7796', 'renesas,scif-r8a77961', 'renesas,scif-r8a77965', 'renesas,scif-r8a77970', 'renesas,scif-r8a77980', 'renesas,scif-r8a77990', 'renesas,scif-r8a77995']
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r8a779a0', 'renesas,scif-r8a779f0', 'renesas,scif-r8a779g0']
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r9a07g044']
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r9a07g043', 'renesas,scif-r9a07g054', 'renesas,scif-r9a08g045']
	'renesas,scif' was expected
	'renesas,rcar-gen1-scif' was expected
	'renesas,rcar-gen2-scif' was expected
	'renesas,rcar-gen3-scif' was expected
	'renesas,scif-r9a07g044' was expected
	from schema $id: http://devicetree.org/schemas/serial/renesas,scif.yaml#
arch/arm64/boot/dts/renesas/r8a779h0-gray-hawk-single.dtb: serial@e6c40000: compatible: 'oneOf' conditional failed, one must be fixed:
	['renesas,scif-r8a779h0', 'renesas,rcar-gen4-scif', 'renesas,scif'] is too long
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r7s72100']
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r7s9210']
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r8a7778', 'renesas,scif-r8a7779']
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r8a7742', 'renesas,scif-r8a7743', 'renesas,scif-r8a7744', 'renesas,scif-r8a7745', 'renesas,scif-r8a77470', 'renesas,scif-r8a7790', 'renesas,scif-r8a7791', 'renesas,scif-r8a7792', 'renesas,scif-r8a7793', 'renesas,scif-r8a7794']
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r8a774a1', 'renesas,scif-r8a774b1', 'renesas,scif-r8a774c0', 'renesas,scif-r8a774e1', 'renesas,scif-r8a7795', 'renesas,scif-r8a7796', 'renesas,scif-r8a77961', 'renesas,scif-r8a77965', 'renesas,scif-r8a77970', 'renesas,scif-r8a77980', 'renesas,scif-r8a77990', 'renesas,scif-r8a77995']
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r8a779a0', 'renesas,scif-r8a779f0', 'renesas,scif-r8a779g0']
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r9a07g044']
	'renesas,scif-r8a779h0' is not one of ['renesas,scif-r9a07g043', 'renesas,scif-r9a07g054', 'renesas,scif-r9a08g045']
	'renesas,scif' was expected
	'renesas,rcar-gen1-scif' was expected
	'renesas,rcar-gen2-scif' was expected
	'renesas,rcar-gen3-scif' was expected
	'renesas,scif-r9a07g044' was expected
	from schema $id: http://devicetree.org/schemas/serial/renesas,scif.yaml#