Skip to content

Commit 1a4e620

Browse files
rmurphy-armmmind
authored andcommitted
arm64: dts: rockchip: Add nanopi4 ethernet phy
The nanopi4 boards have the INTB pin of the RTL8211E phy wired up, so we can make use of that and avoid having to poll for line status changes. Apparently RTL8211E only requires 30ms of post-reset delay, so we may as well save a little bit of time there as well. Signed-off-by: Robin Murphy <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]>
1 parent 980b521 commit 1a4e620

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,15 +148,28 @@
148148
assigned-clocks = <&cru SCLK_RMII_SRC>;
149149
clock_in_out = "input";
150150
pinctrl-names = "default";
151-
pinctrl-0 = <&rgmii_pins>;
151+
pinctrl-0 = <&rgmii_pins>, <&phy_intb>, <&phy_rstb>;
152+
phy-handle = <&rtl8211e>;
152153
phy-mode = "rgmii";
153154
phy-supply = <&vcc3v3_s3>;
154155
snps,reset-active-low;
155-
snps,reset-delays-us = <0 10000 50000>;
156+
snps,reset-delays-us = <0 10000 30000>;
156157
snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
157158
tx_delay = <0x28>;
158159
rx_delay = <0x11>;
159160
status = "okay";
161+
162+
mdio {
163+
compatible = "snps,dwmac-mdio";
164+
#address-cells = <1>;
165+
#size-cells = <0>;
166+
167+
rtl8211e: phy@1 {
168+
reg = <1>;
169+
interrupt-parent = <&gpio3>;
170+
interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>;
171+
};
172+
};
160173
};
161174

162175
&gpu {
@@ -481,6 +494,16 @@
481494
};
482495
};
483496

497+
phy {
498+
phy_intb: phy-intb {
499+
rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
500+
};
501+
502+
phy_rstb: phy-rstb {
503+
rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
504+
};
505+
};
506+
484507
pmic {
485508
cpu_b_sleep: cpu-b-sleep {
486509
rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;

0 commit comments

Comments
 (0)