From b279bd7282094e83fffa522081d1bb8e58b7794e Mon Sep 17 00:00:00 2001 From: Heiko Stuebner Date: Wed, 11 Jun 2025 10:59:31 +0200 Subject: [PATCH 1/3] arm64: dts: rockchip: add basic mdio node to px30 Using snps,reset-* properties for handling the phy-reset is deprecated and instead a real phy node should be defined that then contains the reset-gpios handling. To facilitate this, add the core mdio node under the px30's gmac, similar to how the other Rockchip socs already do this. Signed-off-by: Heiko Stuebner Reviewed-by: Quentin Schulz Link: https://lore.kernel.org/r/20250514150745.2437804-2-heiko@sntech.de Signed-off-by: Heiko Stuebner [ upstream commit: ede4837a504ca7e5811217060aa8300b8d0cf7f2 ] (cherry picked from commit cb54a264ecdb9e95b1529e4542e157cb9acded30) Reviewed-by: Sumit Garg --- dts/upstream/src/arm64/rockchip/px30.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dts/upstream/src/arm64/rockchip/px30.dtsi b/dts/upstream/src/arm64/rockchip/px30.dtsi index 9137dd76e72..feabdadfa44 100644 --- a/dts/upstream/src/arm64/rockchip/px30.dtsi +++ b/dts/upstream/src/arm64/rockchip/px30.dtsi @@ -985,6 +985,12 @@ resets = <&cru SRST_GMAC_A>; reset-names = "stmmaceth"; status = "disabled"; + + mdio: mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <1>; + #size-cells = <0>; + }; }; sdmmc: mmc@ff370000 { From 8279df493c7a4fa7c81c232cc6d9783f8bdec5b2 Mon Sep 17 00:00:00 2001 From: Heiko Stuebner Date: Wed, 11 Jun 2025 10:59:32 +0200 Subject: [PATCH 2/3] arm64: dts: rockchip: move reset to dedicated eth-phy node on ringneck Using snps,reset-* properties to handle the ethernet-phy resets is deprecated and instead a real phy node should be used. Move the Ringneck phy-reset properties to such a node Signed-off-by: Heiko Stuebner Reviewed-by: Quentin Schulz Tested-by: Quentin Schulz Link: https://lore.kernel.org/r/20250514150745.2437804-3-heiko@sntech.de Signed-off-by: Heiko Stuebner [ upstream commit: e463625af7f92c4a9f097f7fb87f6baaad6e762a ] (cherry picked from commit 76d0d8e00c9ac845ca8d6cbe191cf015ca3a8c16) Reviewed-by: Sumit Garg --- .../src/arm64/rockchip/px30-ringneck.dtsi | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/dts/upstream/src/arm64/rockchip/px30-ringneck.dtsi b/dts/upstream/src/arm64/rockchip/px30-ringneck.dtsi index e80412abec0..185d5ba22fd 100644 --- a/dts/upstream/src/arm64/rockchip/px30-ringneck.dtsi +++ b/dts/upstream/src/arm64/rockchip/px30-ringneck.dtsi @@ -83,9 +83,7 @@ /* On-module TI DP83825I PHY but no connector, enable in carrierboard */ &gmac { - snps,reset-gpio = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>; - snps,reset-active-low; - snps,reset-delays-us = <0 50000 50000>; + phy-handle = <&dp83825>; phy-supply = <&vcc_3v3>; clock_in_out = "output"; }; @@ -348,6 +346,18 @@ status = "okay"; }; +&mdio { + dp83825: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0x0>; + pinctrl-names = "default"; + pinctrl-0 = <&phy_rst>; + reset-assert-us = <50000>; + reset-deassert-us = <50000>; + reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>; + }; +}; + &pinctrl { emmc { emmc_reset: emmc-reset { @@ -355,6 +365,12 @@ }; }; + ethernet { + phy_rst: phy-rst { + rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + leds { module_led_pin: module-led-pin { rockchip,pins = <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; From 21c3a37f074e195c849659b1bf3bef2a30381f26 Mon Sep 17 00:00:00 2001 From: Quentin Schulz Date: Wed, 11 Jun 2025 10:59:33 +0200 Subject: [PATCH 3/3] configs: ringneck-px30: fix Ethernet Due to updates to the Device Tree (migrating from snps,reset-* properties to a PHY node on the MDIO bus) in previous commits and the inability of the designware net driver to support the old Device Tree (without the MDIO bus and PHY nodes) with DM_MDIO and DM_ETH_PHY enabled, support for Ethernet on Ringneck PX30 is currently broken. Now that the transition was made, we can simply enable DM_MDIO and DM_ETH_PHY to fix Ethernet support on that board. Ideally, we could squash this commit with the one migrating the Device Tree, but we want to keep having upstream changes to the Device Trees made by tools/update-subtree.sh tool without manual intervention. Signed-off-by: Quentin Schulz --- configs/ringneck-px30_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/ringneck-px30_defconfig b/configs/ringneck-px30_defconfig index a6562d03edc..539a94cb16f 100644 --- a/configs/ringneck-px30_defconfig +++ b/configs/ringneck-px30_defconfig @@ -83,6 +83,8 @@ CONFIG_SUPPORT_EMMC_RPMB=y CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y CONFIG_PHY_TI_GENERIC=y +CONFIG_DM_MDIO=y +CONFIG_DM_ETH_PHY=y CONFIG_PHY_GIGE=y CONFIG_ETH_DESIGNWARE=y CONFIG_GMAC_ROCKCHIP=y