Thread (38 messages) 38 messages, 7 authors, 2022-12-09
STALE1328d
Revisions (5)
  1. v1 current
  2. v2 [diff vs current]
  3. v3 [diff vs current]
  4. v4 [diff vs current]
  5. v5 [diff vs current]

[PATCH v1 7/7] riscv: dts: starfive: visionfive-v2: Add phy delay_chain configuration

From: Yanhong Wang <hidden>
Date: 2022-12-01 09:02:44
Also in: linux-devicetree, linux-riscv, lkml
Subsystem: risc-v architecture, starfive devicetrees, the rest · Maintainers: Paul Walmsley, Palmer Dabbelt, Albert Ou, Emil Renner Berthing, Conor Dooley, Linus Torvalds

Add phy delay_chain configuration to support motorcomm phy driver for
StarFive VisionFive 2 board.

Signed-off-by: Yanhong Wang <redacted>
---
 .../jh7110-starfive-visionfive-v2.dts         | 46 +++++++++++++++++++
 1 file changed, 46 insertions(+)
diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-v2.dts b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-v2.dts
index c8946cf3a268..2868ef4c74ef 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-v2.dts
+++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-v2.dts
@@ -15,6 +15,8 @@
 
 	aliases {
 		serial0 = &uart0;
+		ethernet0=&gmac0;
+		ethernet1=&gmac1;
 	};
 
 	chosen {
@@ -114,3 +116,47 @@
 	pinctrl-0 = <&uart0_pins>;
 	status = "okay";
 };
+
+&gmac0 {
+	status = "okay";
+	#address-cells = <1>;
+	#size-cells = <0>;
+	phy-handle = <&phy0>;
+	status = "okay";
+	mdio0 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible = "snps,dwmac-mdio";
+		phy0: ethernet-phy@0 {
+			reg = <0>;
+			rxc_dly_en = <1>;
+			tx_delay_sel_fe = <5>;
+			tx_delay_sel = <0xa>;
+			tx_inverted_10 = <0x1>;
+			tx_inverted_100 = <0x1>;
+			tx_inverted_1000 = <0x1>;
+		};
+	};
+};
+
+&gmac1 {
+	status = "okay";
+	#address-cells = <1>;
+	#size-cells = <0>;
+	phy-handle = <&phy1>;
+	status = "okay";
+	mdio1 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible = "snps,dwmac-mdio";
+		phy1: ethernet-phy@1 {
+			reg = <1>;
+			tx_delay_sel_fe = <5>;
+			tx_delay_sel = <0>;
+			rxc_dly_en = <0>;
+			tx_inverted_10 = <0x1>;
+			tx_inverted_100 = <0x1>;
+			tx_inverted_1000 = <0x0>;
+		};
+	};
+};
-- 
2.17.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help