2120974ec93cfebce18ed86f8ba8fe44459813f4
[openwrt/staging/xback.git] /
1 From 4b64ed510ed946a4e4ca6d51d6512bf5361f6a04 Mon Sep 17 00:00:00 2001
2 From: Jonas Karlman <jonas@kwiboo.se>
3 Date: Tue, 21 May 2024 21:10:10 +0000
4 Subject: [PATCH] arm64: dts: rockchip: Add mdio and ethernet-phy nodes to
5 rk3308-rock-pi-s
6
7 Be explicit about the Ethernet port and define mdio and ethernet-phy
8 nodes in the device tree for ROCK Pi S.
9
10 Fixes: bc3753aed81f ("arm64: dts: rockchip: rock-pi-s add more peripherals")
11 Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
12 Link: https://lore.kernel.org/r/20240521211029.1236094-8-jonas@kwiboo.se
13 Signed-off-by: Heiko Stuebner <heiko@sntech.de>
14 ---
15 .../boot/dts/rockchip/rk3308-rock-pi-s.dts | 26 ++++++++++++++++---
16 1 file changed, 23 insertions(+), 3 deletions(-)
17
18 --- a/arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts
19 +++ b/arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts
20 @@ -144,11 +144,25 @@
21
22 &gmac {
23 clock_in_out = "output";
24 + phy-handle = <&rtl8201f>;
25 phy-supply = <&vcc_io>;
26 - snps,reset-gpio = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
27 - snps,reset-active-low;
28 - snps,reset-delays-us = <0 50000 50000>;
29 status = "okay";
30 +
31 + mdio {
32 + compatible = "snps,dwmac-mdio";
33 + #address-cells = <1>;
34 + #size-cells = <0>;
35 +
36 + rtl8201f: ethernet-phy@1 {
37 + compatible = "ethernet-phy-ieee802.3-c22";
38 + reg = <1>;
39 + pinctrl-names = "default";
40 + pinctrl-0 = <&mac_rst>;
41 + reset-assert-us = <20000>;
42 + reset-deassert-us = <50000>;
43 + reset-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
44 + };
45 + };
46 };
47
48 &gpio0 {
49 @@ -221,6 +235,12 @@
50 pinctrl-names = "default";
51 pinctrl-0 = <&rtc_32k>;
52
53 + gmac {
54 + mac_rst: mac-rst {
55 + rockchip,pins = <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
56 + };
57 + };
58 +
59 leds {
60 green_led: green-led {
61 rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;