Skip to content

Commit 44a94c7

Browse files
montjoiemripard
authored andcommitted
arm64: dts: allwinner: H5: Restore EMAC changes
The original dwmac-sun8i DT bindings have some issue on how to handle integrated PHY and was reverted in last RC of 4.13. But now we have a solution so we need to get back that was reverted. This patch restore arm64 DT about dwmac-sun8i for H5 This reverts a part of commit 87e1f5e ("arm64: dts: allwinner: Revert EMAC changes") Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
1 parent 4904337 commit 44a94c7

File tree

3 files changed

+51
-0
lines changed

3 files changed

+51
-0
lines changed

arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
compatible = "friendlyarm,nanopi-neo2", "allwinner,sun50i-h5";
5151

5252
aliases {
53+
ethernet0 = &emac;
5354
serial0 = &uart0;
5455
};
5556

@@ -108,6 +109,22 @@
108109
status = "okay";
109110
};
110111

112+
&emac {
113+
pinctrl-names = "default";
114+
pinctrl-0 = <&emac_rgmii_pins>;
115+
phy-supply = <&reg_gmac_3v3>;
116+
phy-handle = <&ext_rgmii_phy>;
117+
phy-mode = "rgmii";
118+
status = "okay";
119+
};
120+
121+
&external_mdio {
122+
ext_rgmii_phy: ethernet-phy@7 {
123+
compatible = "ethernet-phy-ieee802.3-c22";
124+
reg = <7>;
125+
};
126+
};
127+
111128
&mmc0 {
112129
pinctrl-names = "default";
113130
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;

arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
};
6060

6161
aliases {
62+
ethernet0 = &emac;
6263
serial0 = &uart0;
6364
};
6465

@@ -136,6 +137,22 @@
136137
status = "okay";
137138
};
138139

140+
&emac {
141+
pinctrl-names = "default";
142+
pinctrl-0 = <&emac_rgmii_pins>;
143+
phy-supply = <&reg_gmac_3v3>;
144+
phy-handle = <&ext_rgmii_phy>;
145+
phy-mode = "rgmii";
146+
status = "okay";
147+
};
148+
149+
&external_mdio {
150+
ext_rgmii_phy: ethernet-phy@1 {
151+
compatible = "ethernet-phy-ieee802.3-c22";
152+
reg = <1>;
153+
};
154+
};
155+
139156
&ir {
140157
pinctrl-names = "default";
141158
pinctrl-0 = <&ir_pins_a>;

arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
compatible = "xunlong,orangepi-prime", "allwinner,sun50i-h5";
5555

5656
aliases {
57+
ethernet0 = &emac;
5758
serial0 = &uart0;
5859
};
5960

@@ -143,6 +144,22 @@
143144
status = "okay";
144145
};
145146

147+
&emac {
148+
pinctrl-names = "default";
149+
pinctrl-0 = <&emac_rgmii_pins>;
150+
phy-supply = <&reg_gmac_3v3>;
151+
phy-handle = <&ext_rgmii_phy>;
152+
phy-mode = "rgmii";
153+
status = "okay";
154+
};
155+
156+
&external_mdio {
157+
ext_rgmii_phy: ethernet-phy@1 {
158+
compatible = "ethernet-phy-ieee802.3-c22";
159+
reg = <1>;
160+
};
161+
};
162+
146163
&ir {
147164
pinctrl-names = "default";
148165
pinctrl-0 = <&ir_pins_a>;

0 commit comments

Comments
 (0)