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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx>
---
 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

diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile
index 8ea68d582710..c26047c9f84a 100644
--- a/arch/arm64/boot/dts/renesas/Makefile
+++ b/arch/arm64/boot/dts/renesas/Makefile
@@ -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
diff --git a/arch/arm64/boot/dts/renesas/r8a779g0-white-hawk-tsn.dtso b/arch/arm64/boot/dts/renesas/r8a779g0-white-hawk-tsn.dtso
new file mode 100644
index 000000000000..d9b6c11c425c
--- /dev/null
+++ b/arch/arm64/boot/dts/renesas/r8a779g0-white-hawk-tsn.dtso
@@ -0,0 +1,53 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+/*
+ * Device Tree Source for the White Hawk board with connected TSN PHY.
+ *
+ * Copyright (C) 2023 Niklas Söderlund <niklas.soderlund@xxxxxxxxxxxx>
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+&pfc {
+	tsn0_pins: tsn0 {
+		mux {
+			groups = "tsn0_link", "tsn0_mdio", "tsn0_rgmii",
+				 "tsn0_txcrefclk";
+			function = "tsn0";
+		};
+
+		pins_mdio {
+			groups = "tsn0_mdio";
+			drive-strength = <21>;
+		};
+
+		pins_mii {
+			groups = "tsn0_rgmii";
+			drive-strength = <21>;
+		};
+
+	};
+};
+
+&tsn0 {
+	pinctrl-0 = <&tsn0_pins>;
+	pinctrl-names = "default";
+	phy-mode = "rgmii";
+	phy-handle = <&phy3>;
+	tx-internal-delay-ps = <2000>;
+	status = "okay";
+
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	phy3: ethernet-phy@3 {
+		compatible = "ethernet-phy-ieee802.3-c45";
+		reg = <0>;
+		interrupt-parent = <&gpio4>;
+		interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
+		reset-gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;
+	};
+};
-- 
2.43.0





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux