aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-5.4/950-0382-ARM-dts-bcm2838-Backport-genet-from-upstream.patch
blob: ffd7d8e54052aeed26c948b36b0f049e2328024e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
From 30bd619480b6a2b92d404a61a1e90ddb76ae4be8 Mon Sep 17 00:00:00 2001
From: Stefan Wahren <wahrenst@gmx.net>
Date: Wed, 25 Dec 2019 16:40:47 +0100
Subject: [PATCH] ARM: dts: bcm2838: Backport genet from upstream

This backport all genet differences (different compatible, right PHY mode,
board specific stuff) from upstream.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
---
 arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 14 ++++++++++++++
 arch/arm/boot/dts/bcm2838-rpi-4-b.dts | 14 ++++++++++++++
 arch/arm/boot/dts/bcm2838.dtsi        | 17 ++++-------------
 3 files changed, 32 insertions(+), 13 deletions(-)

--- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
+++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
@@ -134,6 +134,20 @@
 	vqmmc-supply = <&sd_io_1v8_reg>;
 };
 
+&genet {
+	phy-handle = <&phy1>;
+	phy-mode = "rgmii-rxid";
+	status = "okay";
+};
+
+&genet_mdio {
+	phy1: ethernet-phy@1 {
+		/* No PHY interrupt */
+		reg = <0x1>;
+		led-modes = <0x00 0x08>; /* link/activity link */
+	};
+};
+
 &leds {
 	act_led: act {
 		label = "led0";
--- a/arch/arm/boot/dts/bcm2838-rpi-4-b.dts
+++ b/arch/arm/boot/dts/bcm2838-rpi-4-b.dts
@@ -98,6 +98,20 @@
 	vqmmc-supply = <&sd_io_1v8_reg>;
 };
 
+&genet {
+	phy-handle = <&phy1>;
+	phy-mode = "rgmii-rxid";
+	status = "okay";
+};
+
+&genet_mdio {
+	phy1: ethernet-phy@1 {
+		/* No PHY interrupt */
+		reg = <0x1>;
+		led-modes = <0x00 0x08>; /* link/activity link */
+	};
+};
+
 /* uart0 communicates with the BT module */
 &uart0 {
 	pinctrl-names = "default";
--- a/arch/arm/boot/dts/bcm2838.dtsi
+++ b/arch/arm/boot/dts/bcm2838.dtsi
@@ -346,29 +346,20 @@
 		};
 
 		genet: ethernet@7d580000 {
-			compatible = "brcm,genet-v5";
+			compatible = "brcm,bcm2711-genet-v5", "brcm,genet-v5";
 			reg = <0x0 0x7d580000 0x10000>;
-			status = "okay";
 			#address-cells = <0x1>;
 			#size-cells = <0x1>;
 			interrupts = <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>;
-			phy-handle = <&phy1>;
-			phy-mode = "rgmii";
-			mdio@e14 {
+			status = "disabled";
+
+			genet_mdio: mdio@e14 {
 				#address-cells = <0x0>;
 				#size-cells = <0x1>;
 				compatible = "brcm,genet-mdio-v5";
 				reg = <0xe14 0x8>;
 				reg-names = "mdio";
-				phy1: ethernet-phy@0 {
-					compatible =
-						"ethernet-phy-ieee802.3-c22";
-					/* No interrupts - use PHY_POLL */
-					max-speed = <1000>;
-					reg = <0x1>;
-					led-modes = <0x00 0x08>; /* link/activity link */
-				};
 			};
 		};