Skip to contentSkip to conversation

arm64: dts: renesas: Add TSN support for V4H

PATCH Superseded Niklas Söderlund 2 participants 5 messages Jan 22, 2024 – Feb 15, 2024

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover arm64: dts: renesas: Add TSN support for V4H

Hi,

This series describes the Ethernet TSN on V4H. Patch 1 adds the device to the base DTSI while patch 2 adds an overlay that can be used when a PHY is mounted on the board.

Niklas Söderlund (2):
arm64: dts: renesas: r8a779g0: R-Car Ethernet TSN support
arm64: dts: renesas: white-hawk: Add Ethernet TSN overlay

 arch/arm64/boot/dts/renesas/Makefile          |  2 +
 .../dts/renesas/r8a779g0-white-hawk-tsn.dtso  | 53 +++++++++++++++++++
 arch/arm64/boot/dts/renesas/r8a779g0.dtsi     | 16 ++++++
 3 files changed, 71 insertions(+)
 create mode 100644 arch/arm64/boot/dts/renesas/r8a779g0-white-hawk-tsn.dtso
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/2 arm64: dts: renesas: r8a779g0: R-Car Ethernet TSN support

Add Ethernet TSN support for R-Car V4H.

---
 arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/renesas/r8a779g0.dtsi +16 -0
index d3d25e077c5d..e64a204f1f8a 100644
@@ -538,6 +538,22 @@ tmu4: timer@ffc00000 {
 			status = "disabled";
 		};
 
+		tsn0: ethernet@e6460000 {
+			compatible = "renesas,r8a779g0-ethertsn", "renesas,rcar-gen4-ethertsn";
+			reg = <0 0xe6460000 0 0x7000>,
+			      <0 0xe6449000 0 0x500>;
+			reg-names = "tsnes", "gptp";
+			interrupts = <GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "tx", "rx";
+			clocks = <&cpg CPG_MOD 2723>;
+			power-domains = <&sysc R8A779G0_PD_ALWAYS_ON>;
+			resets = <&cpg 2723>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
 		i2c0: i2c@e6500000 {
 			compatible = "renesas,i2c-r8a779g0",
 				     "renesas,rcar-gen4-i2c";
Signature · 1 line
2.43.0
Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] arm64: dts: renesas: r8a779g0: R-Car Ethernet TSN support

Hi Niklas,

Quoted 3 lines · Niklas Söderlund

Add Ethernet TSN support for R-Car V4H.

Thanks for your patch!

Quoted 15 lines
arch/arm64/boot/dts/renesas/r8a779g0.dtsi +9 -0
@@ -538,6 +538,22 @@ tmu4: timer@ffc00000 {
                        status = "disabled";
                };
 
+               tsn0: ethernet@e6460000 {
+                       compatible = "renesas,r8a779g0-ethertsn", "renesas,rcar-gen4-ethertsn";
+                       reg = <0 0xe6460000 0 0x7000>,
+                             <0 0xe6449000 0 0x500>;
+                       reg-names = "tsnes", "gptp";
+                       interrupts = <GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "tx", "rx";
+                       clocks = <&cpg CPG_MOD 2723>;

arch/arm64/boot/dts/renesas/r8a779g0.dtsi tmu4: timer@ffc00000 { · line 559

Quoted 10 lines
arch/arm64/boot/dts/renesas/r8a779g0.dtsi +7 -0
+                       power-domains = <&sysc R8A779G0_PD_ALWAYS_ON>;
+                       resets = <&cpg 2723>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
+
                i2c0: i2c@e6500000 {
                        compatible = "renesas,i2c-r8a779g0",
                                     "renesas,rcar-gen4-i2c";

Matches the bindings (for which I did have some comments), so

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
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
#3 lore raw

PATCH 2/2 arm64: dts: renesas: white-hawk: Add Ethernet TSN overlay

In reply to Niklas Söderlund

On the white-hawk development board the Ethernet TSN IP can be connected to one of two different external PHYs. One PHY is located on the breakout board, and the other on the Ethernet sub-board. Which PHY is connected depends on what resistors are mounted on the board.

The default white-hawk configuration connect the TSN with the PHY on the breakout board. Unfortunately the standard breakout board do not populate the external PHY.

Add an overlay that can be applied to enable Ethernet TSN support for those boards that do populate the breakout board, or mount the appropriate resistors to connect TSN with the Ethernet sub-board.

---
 arch/arm64/boot/dts/renesas/Makefile          |  2 +
 .../dts/renesas/r8a779g0-white-hawk-tsn.dtso  | 53 +++++++++++++++++++
 2 files changed, 55 insertions(+)
 create mode 100644 arch/arm64/boot/dts/renesas/r8a779g0-white-hawk-tsn.dtso
arch/arm64/boot/dts/renesas/Makefile +2 -0
index 8ea68d582710..c26047c9f84a 100644
@@ -84,7 +84,9 @@ dtb-$(CONFIG_ARCH_R8A779F0) += r8a779f4-s4sk.dtb
 dtb-$(CONFIG_ARCH_R8A779G0) += r8a779g0-white-hawk.dtb
 dtb-$(CONFIG_ARCH_R8A779G0) += r8a779g0-white-hawk-ard-audio-da7212.dtbo
 r8a779g0-white-hawk-ard-audio-da7212-dtbs := r8a779g0-white-hawk.dtb r8a779g0-white-hawk-ard-audio-da7212.dtbo
+r8a779g0-white-hawk-tsn-dtbs := r8a779g0-white-hawk.dtb r8a779g0-white-hawk-tsn.dtbo
 dtb-$(CONFIG_ARCH_R8A779G0) += r8a779g0-white-hawk-ard-audio-da7212.dtb
+dtb-$(CONFIG_ARCH_R8A779G0) += r8a779g0-white-hawk-tsn.dtb
 
 dtb-$(CONFIG_ARCH_R8A77951) += r8a779m1-salvator-xs.dtb
 r8a779m1-salvator-xs-panel-aa104xd12-dtbs := r8a779m1-salvator-xs.dtb salvator-panel-aa104xd12.dtbo
arch/arm64/boot/dts/renesas/r8a779g0-white-hawk-tsn.dtso new file +53 -0

53 lines not on this page · raw message

Signature · 1 line
2.43.0
#4 lore raw

Re: [PATCH 2/2] arm64: dts: renesas: white-hawk: Add Ethernet TSN overlay

Hi Niklas,

Quoted 4 lines · Niklas Söderlund

On the white-hawk development board the Ethernet TSN IP can be connected to one of two different external PHYs. One PHY is located on the breakout board, and the other on the Ethernet sub-board. Which PHY is connected depends on what resistors are mounted on the board.

Actually there are three options:
1. Breakout board,
2. Ethernet sub-board,
3. Ether module board.

Quoted 3 lines

The default white-hawk configuration connect the TSN with the PHY on the breakout board. Unfortunately the standard breakout board do not populate the external PHY.

According to the schematics, this seems to depend on board revision:
- rev. 0.909: TSN is wired to 3,
- rev. 1.00: TSN is wired to 2.

Quoted 5 lines

Add an overlay that can be applied to enable Ethernet TSN support for those boards that do populate the breakout board, or mount the appropriate resistors to connect TSN with the Ethernet sub-board.

Thanks for your patch!

arch/arm64/boot/dts/renesas/Makefile dtb-$(CONFIG_ARCH_R8A779F0) += r8a779f4-s4sk.dtb · line 86

Quoted 6 lines
arch/arm64/boot/dts/renesas/Makefile +0 -0
@@ -84,7 +84,9 @@ dtb-$(CONFIG_ARCH_R8A779F0) += r8a779f4-s4sk.dtb
 dtb-$(CONFIG_ARCH_R8A779G0) += r8a779g0-white-hawk.dtb
 dtb-$(CONFIG_ARCH_R8A779G0) += r8a779g0-white-hawk-ard-audio-da7212.dtbo
 r8a779g0-white-hawk-ard-audio-da7212-dtbs := r8a779g0-white-hawk.dtb r8a779g0-white-hawk-ard-audio-da7212.dtbo

Please add

    dtb-$(CONFIG_ARCH_R8A779G0) += r8a779g0-white-hawk-tsn.dtbo

so that the .dtbo is considered for installation, too.

arch/arm64/boot/dts/renesas/Makefile dtb-$(CONFIG_ARCH_R8A779F0) += r8a779f4-s4sk.dtb · line 89

Quoted 3 lines
arch/arm64/boot/dts/renesas/Makefile +2 -0
+r8a779g0-white-hawk-tsn-dtbs := r8a779g0-white-hawk.dtb r8a779g0-white-hawk-tsn.dtbo
 dtb-$(CONFIG_ARCH_R8A779G0) += r8a779g0-white-hawk-ard-audio-da7212.dtb
+dtb-$(CONFIG_ARCH_R8A779G0) += r8a779g0-white-hawk-tsn.dtb

The rest LGTM.

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
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