Skip to contentSkip to conversation

ARM: dts: rockchip: rk3036: Move PHY reset to ethernet-phy node

PATCH Applied Fabio Estevam 3 participants 8 messages Feb 28 – Mar 2

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ARM: dts: rockchip: rk3036: Move PHY reset to ethernet-phy node

According to rockchip,emac.yaml, 'phy-reset-duration' and 'phy-reset-gpios' are not valid properties.

Use the valid 'reset-gpios' and 'reset-assert-us' properties under the etherne-phy node.

This fixes the following dt-schema warning:

Unevaluated properties are not allowed ('phy-reset-duration', 'phy-reset-gpios' were unexpected)

---
 arch/arm/boot/dts/rockchip/rk3036-evb.dts   | 4 ++--
 arch/arm/boot/dts/rockchip/rk3036-kylin.dts | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/boot/dts/rockchip/rk3036-evb.dts +2 -2
index becdc0b664bf..c8100dc4c7ce 100644
@@ -16,8 +16,6 @@ memory@60000000 {
 
 &emac {
 	phy = <&phy0>;
-	phy-reset-duration = <10>; /* millisecond */
-	phy-reset-gpios = <&gpio2 RK_PC6 GPIO_ACTIVE_LOW>; /* PHY_RST */
 	pinctrl-names = "default";
 	pinctrl-0 = <&emac_xfer>, <&emac_mdio>;
 	status = "okay";
@@ -28,6 +26,8 @@ mdio {
 
 		phy0: ethernet-phy@0 {
 			reg = <0>;
+			reset-gpios = <&gpio2 RK_PC6 GPIO_ACTIVE_LOW>;
+			reset-assert-us = <10000>;
 		};
 	};
 };
arch/arm/boot/dts/rockchip/rk3036-kylin.dts +2 -2
index ae2f84a4e922..bc6e6468fcc4 100644
@@ -102,8 +102,6 @@ &acodec {
 
 &emac {
 	phy = <&phy0>;
-	phy-reset-duration = <10>; /* millisecond */
-	phy-reset-gpios = <&gpio2 RK_PC6 GPIO_ACTIVE_LOW>; /* PHY_RST */
 	pinctrl-names = "default";
 	pinctrl-0 = <&emac_xfer>, <&emac_mdio>;
 	status = "okay";
@@ -114,6 +112,8 @@ mdio {
 
 		phy0: ethernet-phy@0 {
 			reg = <0>;
+			reset-gpios = <&gpio2 RK_PC6 GPIO_ACTIVE_LOW>;
+			reset-assert-us = <10000>;
 		};
 	};
 };
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/2 ARM: dts: rockchip: rk3288: Remove rockchip,grf from tsadc

According to rockchip-thermal.yaml, RK3288 does not require rockchip,grf, so remove this invalid property.

This fixes the following dt-schema warning:

tsadc@ff280000 (rockchip,rk3288-tsadc): False schema does not allow [[53]]

The rockchip_thermal driver also confirms that grf is not needed as the rk3288_tsadc_data contains:
.grf_required = false,

---
 arch/arm/boot/dts/rockchip/rk3288.dtsi | 1 -
 1 file changed, 1 deletion(-)
arch/arm/boot/dts/rockchip/rk3288.dtsi +0 -1
index 4e5e7509de48..4f2c048aee54 100644
@@ -551,7 +551,6 @@ tsadc: tsadc@ff280000 {
 		pinctrl-1 = <&otp_out>;
 		pinctrl-2 = <&otp_pin>;
 		#thermal-sensor-cells = <1>;
-		rockchip,grf = <&grf>;
 		rockchip,hw-tshut-temp = <95000>;
 		status = "disabled";
 	};
Signature · 1 line
2.34.1
maintainer
#2 lore raw
In reply to Fabio Estevam

Hi Fabio,

Am Samstag, 28. Februar 2026, 02:32:56 Mitteleuropäische Normalzeit schrieb Fabio Estevam:

Quoted 6 lines

According to rockchip,emac.yaml, 'phy-reset-duration' and 'phy-reset-gpios' are not valid properties.

Use the valid 'reset-gpios' and 'reset-assert-us' properties under the etherne-phy node.

Quoted 6 lines

This fixes the following dt-schema warning:

Unevaluated properties are not allowed ('phy-reset-duration', 'phy-reset-gpios' were unexpected)

please don't send patches that "simply" fix devicetree warnings.

As you can see in [0] the driver uses these properties currently. So while this fixes schema warnings, it will break the actual boards.

So first of all you'll need to adapt the driver to handle the "official" properties and also provide a fallback in the driver for old devicetrees.

Only then can we think about modifying the actual devicetrees for the future.

Thanks
Heiko

[0] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/arc/emac_mdio.c#n153

Quoted 42 lines
---
 arch/arm/boot/dts/rockchip/rk3036-evb.dts   | 4 ++--
 arch/arm/boot/dts/rockchip/rk3036-kylin.dts | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/boot/dts/rockchip/rk3036-evb.dts +2 -2
index becdc0b664bf..c8100dc4c7ce 100644
@@ -16,8 +16,6 @@ memory@60000000 {
 
 &emac {
 	phy = <&phy0>;
-	phy-reset-duration = <10>; /* millisecond */
-	phy-reset-gpios = <&gpio2 RK_PC6 GPIO_ACTIVE_LOW>; /* PHY_RST */
 	pinctrl-names = "default";
 	pinctrl-0 = <&emac_xfer>, <&emac_mdio>;
 	status = "okay";
@@ -28,6 +26,8 @@ mdio {
 
 		phy0: ethernet-phy@0 {
 			reg = <0>;
+			reset-gpios = <&gpio2 RK_PC6 GPIO_ACTIVE_LOW>;
+			reset-assert-us = <10000>;
 		};
 	};
 };
arch/arm/boot/dts/rockchip/rk3036-kylin.dts +0 -2
index ae2f84a4e922..bc6e6468fcc4 100644
@@ -102,8 +102,6 @@ &acodec {
 
 &emac {
 	phy = <&phy0>;
-	phy-reset-duration = <10>; /* millisecond */
-	phy-reset-gpios = <&gpio2 RK_PC6 GPIO_ACTIVE_LOW>; /* PHY_RST */
 	pinctrl-names = "default";
 	pinctrl-0 = <&emac_xfer>, <&emac_mdio>;
 	status = "okay";

arch/arm/boot/dts/rockchip/rk3036-kylin.dts mdio { · line 119

Quoted 8 lines
arch/arm/boot/dts/rockchip/rk3036-kylin.dts +2 -0
@@ -114,6 +112,8 @@ mdio {
 
 		phy0: ethernet-phy@0 {
 			reg = <0>;
+			reset-gpios = <&gpio2 RK_PC6 GPIO_ACTIVE_LOW>;
+			reset-assert-us = <10000>;
 		};
 	};
 };

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

#5 lore raw
In reply to Fabio Estevam
Quoted 8 lines · Fabio Estevam

According to rockchip,emac.yaml, 'phy-reset-duration' and 'phy-reset-gpios' are not valid properties.

Use the valid 'reset-gpios' and 'reset-assert-us' properties under the etherne-phy node.

This fixes the following dt-schema warning:

Quoted 8 lines

Unevaluated properties are not allowed ('phy-reset-duration', 'phy-reset-gpios' were unexpected)

---
 arch/arm/boot/dts/rockchip/rk3036-evb.dts   | 4 ++--
 arch/arm/boot/dts/rockchip/rk3036-kylin.dts | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

Does this need a "Fixes:" tag (haven't checked)? And could stable benefit from this?

Cheers,
C. Mitrodimas

Quoted 45 lines
arch/arm/boot/dts/rockchip/rk3036-evb.dts +2 -2
index becdc0b664bf..c8100dc4c7ce 100644
@@ -16,8 +16,6 @@ memory@60000000 {
 
 &emac {
 	phy = <&phy0>;
-	phy-reset-duration = <10>; /* millisecond */
-	phy-reset-gpios = <&gpio2 RK_PC6 GPIO_ACTIVE_LOW>; /* PHY_RST */
 	pinctrl-names = "default";
 	pinctrl-0 = <&emac_xfer>, <&emac_mdio>;
 	status = "okay";
@@ -28,6 +26,8 @@ mdio {
 
 		phy0: ethernet-phy@0 {
 			reg = <0>;
+			reset-gpios = <&gpio2 RK_PC6 GPIO_ACTIVE_LOW>;
+			reset-assert-us = <10000>;
 		};
 	};
 };
arch/arm/boot/dts/rockchip/rk3036-kylin.dts +2 -2
index ae2f84a4e922..bc6e6468fcc4 100644
@@ -102,8 +102,6 @@ &acodec {
 
 &emac {
 	phy = <&phy0>;
-	phy-reset-duration = <10>; /* millisecond */
-	phy-reset-gpios = <&gpio2 RK_PC6 GPIO_ACTIVE_LOW>; /* PHY_RST */
 	pinctrl-names = "default";
 	pinctrl-0 = <&emac_xfer>, <&emac_mdio>;
 	status = "okay";
@@ -114,6 +112,8 @@ mdio {
 
 		phy0: ethernet-phy@0 {
 			reg = <0>;
+			reset-gpios = <&gpio2 RK_PC6 GPIO_ACTIVE_LOW>;
+			reset-assert-us = <10000>;
 		};
 	};
 };
maintainer Applied
#6 lore raw

Re: (subset) [PATCH 1/2] ARM: dts: rockchip: rk3036: Move PHY reset to ethernet-phy node

In reply to Fabio Estevam
Quoted 9 lines · Fabio Estevam

According to rockchip,emac.yaml, 'phy-reset-duration' and 'phy-reset-gpios' are not valid properties.

Use the valid 'reset-gpios' and 'reset-assert-us' properties under the etherne-phy node.

This fixes the following dt-schema warning:

[...]

Applied, thanks!

[2/2] ARM: dts: rockchip: rk3288: Remove rockchip,grf from tsadc

      commit: e2919e4299f132823712ecd44c08c8e8fd0a2e3c

Best regards,

Signature · 1 line
Heiko Stuebner <[email protected]>
#3 lore raw
In reply to Heiko Stuebner

Hi Heiko,

Quoted 7 lines · Heiko Stuebner

please don't send patches that "simply" fix devicetree warnings.

As you can see in [0] the driver uses these properties currently. So while this fixes schema warnings, it will break the actual boards.

So first of all you'll need to adapt the driver to handle the "official" properties and also provide a fallback in the driver for old devicetrees.

The rk3066a-rayeager board describes the reset-gpios inside the Ethernet PHY node:

https://github.com/torvalds/linux/blob/master/arch/arm/boot/dts/rockchip/rk3066a-rayeager.dts#L155-L157

Is this broken?

Regards,

Fabio Estevam

maintainer
#4 lore raw

Hey Fabio,

Am Samstag, 28. Februar 2026, 13:15:52 Mitteleuropäische Normalzeit schrieb Fabio Estevam:

Quoted 12 lines

Hi Heiko,

Quoted 7 lines · Heiko Stuebner

please don't send patches that "simply" fix devicetree warnings.

As you can see in [0] the driver uses these properties currently. So while this fixes schema warnings, it will break the actual boards.

So first of all you'll need to adapt the driver to handle the "official" properties and also provide a fallback in the driver for old devicetrees.

Quoted 6 lines

The rk3066a-rayeager board describes the reset-gpios inside the Ethernet PHY node:

https://github.com/torvalds/linux/blob/master/arch/arm/boot/dts/rockchip/rk3066a-rayeager.dts#L155-L157

Is this broken?

No it isn't :-) .

That's what I get when I try looking at patches on a saturday before coffee ;-) .

With the reset moving into the phy-node, the phy driver will trigger its reset itself of course. The arc-mdio also request the reset-gpio as optional, so the whole thing won't fail if te gpio is not present.

Sorry about the noise, the patch is correct obviously.

Heiko

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

maintainer Applied
#7 lore raw

Re: (subset) [PATCH 1/2] ARM: dts: rockchip: rk3036: Move PHY reset to ethernet-phy node

In reply to Fabio Estevam
Quoted 9 lines · Fabio Estevam

According to rockchip,emac.yaml, 'phy-reset-duration' and 'phy-reset-gpios' are not valid properties.

Use the valid 'reset-gpios' and 'reset-assert-us' properties under the etherne-phy node.

This fixes the following dt-schema warning:

[...]

Applied, thanks!

[1/2] ARM: dts: rockchip: rk3036: Move PHY reset to ethernet-phy node

      commit: 6b56706cde50f64382df90a244e9fd3c345c9917

Best regards,

Signature · 1 line
Heiko Stuebner <[email protected]>