* [PATCH v2 0/2] arm64: dts: rockchip: Improve gmac phy setup for QNAP-TS433
@ 2025-03-18 21:08 Uwe Kleine-König
2025-03-18 21:08 ` [PATCH v2 1/2] arm64: dts: rockchip: Correct gmac phy address Uwe Kleine-König
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Uwe Kleine-König @ 2025-03-18 21:08 UTC (permalink / raw)
To: Heiko Stuebner, Andrew Lunn
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, devicetree,
linux-arm-kernel, linux-rockchip
Hello,
as suggested by Heiko I split the patch to improve the phy setup of the
gmac ethernet into two patches. The initial patch can be found at
https://lore.kernel.org/linux-arm-kernel/20250318184550.47642-2-uwe@kleine-koenig.org/ .
Heiko also suggested to add Fixes tags. I'm unsure these are justified
because while these patches are an improvement the old devicetree is
working fine. I suggest Heiko to add the tags if he feels strongly
enough about these.
Best regards
Uwe
Uwe Kleine-König (2):
arm64: dts: rockchip: Correct gmac phy address
arm64: dts: rockchip: Add gmac phy reset GPIO
.../arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b
--
2.47.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/2] arm64: dts: rockchip: Correct gmac phy address
2025-03-18 21:08 [PATCH v2 0/2] arm64: dts: rockchip: Improve gmac phy setup for QNAP-TS433 Uwe Kleine-König
@ 2025-03-18 21:08 ` Uwe Kleine-König
2025-03-20 12:52 ` Andrew Lunn
2025-03-18 21:08 ` [PATCH v2 2/2] arm64: dts: rockchip: Add gmac phy reset GPIO Uwe Kleine-König
2025-04-07 7:17 ` [PATCH v2 0/2] arm64: dts: rockchip: Improve gmac phy setup for QNAP-TS433 Heiko Stuebner
2 siblings, 1 reply; 6+ messages in thread
From: Uwe Kleine-König @ 2025-03-18 21:08 UTC (permalink / raw)
To: Heiko Stuebner, Andrew Lunn
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, devicetree,
linux-arm-kernel, linux-rockchip
The Motorcomm Phy can be talked to on mdio broadcast address 0, but the
actuall address is 3. Adapt the reg property and node name accordingly.
Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
---
arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
index 7bd32d230ad2..70e88769e21c 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
@@ -481,9 +481,10 @@ eeprom@56 {
};
&mdio0 {
- rgmii_phy0: ethernet-phy@0 {
+ rgmii_phy0: ethernet-phy@3 {
+ /* Motorcomm YT8521 phy */
compatible = "ethernet-phy-ieee802.3-c22";
- reg = <0x0>;
+ reg = <0x3>;
};
};
--
2.47.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/2] arm64: dts: rockchip: Add gmac phy reset GPIO
2025-03-18 21:08 [PATCH v2 0/2] arm64: dts: rockchip: Improve gmac phy setup for QNAP-TS433 Uwe Kleine-König
2025-03-18 21:08 ` [PATCH v2 1/2] arm64: dts: rockchip: Correct gmac phy address Uwe Kleine-König
@ 2025-03-18 21:08 ` Uwe Kleine-König
2025-03-20 12:52 ` Andrew Lunn
2025-04-07 7:17 ` [PATCH v2 0/2] arm64: dts: rockchip: Improve gmac phy setup for QNAP-TS433 Heiko Stuebner
2 siblings, 1 reply; 6+ messages in thread
From: Uwe Kleine-König @ 2025-03-18 21:08 UTC (permalink / raw)
To: Heiko Stuebner, Andrew Lunn
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, devicetree,
linux-arm-kernel, linux-rockchip
While looking through the vendor U-Boot code Heiko spotted that a SoC
GPIO is connected to the ethernet phy's reset pin. Add the respective
reset-gpios property with pinmuxing for the GPIO to the phy node.
Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
---
arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
index 70e88769e21c..411f8ac7994b 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
@@ -485,6 +485,10 @@ rgmii_phy0: ethernet-phy@3 {
/* Motorcomm YT8521 phy */
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0x3>;
+ pinctrl-0 = <ð_phy0_reset_pin>;
+ pinctrl-names = "default";
+ reset-assert-us = <10000>;
+ reset-gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_LOW>;
};
};
@@ -557,6 +561,12 @@ &pcie3x2 {
};
&pinctrl {
+ gmac0 {
+ eth_phy0_reset_pin: eth-phy0-reset-pin {
+ rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
keys {
copy_button_pin: copy-button-pin {
rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>;
--
2.47.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/2] arm64: dts: rockchip: Add gmac phy reset GPIO
2025-03-18 21:08 ` [PATCH v2 2/2] arm64: dts: rockchip: Add gmac phy reset GPIO Uwe Kleine-König
@ 2025-03-20 12:52 ` Andrew Lunn
0 siblings, 0 replies; 6+ messages in thread
From: Andrew Lunn @ 2025-03-20 12:52 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
devicetree, linux-arm-kernel, linux-rockchip
On Tue, Mar 18, 2025 at 10:08:46PM +0100, Uwe Kleine-König wrote:
> While looking through the vendor U-Boot code Heiko spotted that a SoC
> GPIO is connected to the ethernet phy's reset pin. Add the respective
> reset-gpios property with pinmuxing for the GPIO to the phy node.
>
> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
> ---
> arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
> index 70e88769e21c..411f8ac7994b 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
> @@ -485,6 +485,10 @@ rgmii_phy0: ethernet-phy@3 {
> /* Motorcomm YT8521 phy */
> compatible = "ethernet-phy-ieee802.3-c22";
> reg = <0x3>;
> + pinctrl-0 = <ð_phy0_reset_pin>;
> + pinctrl-names = "default";
> + reset-assert-us = <10000>;
> + reset-gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_LOW>;
Sometimes a reset-deassert-us property is needed, in order to give the
PHY time to get ready. But i assume you have tested this with lots of
reboot.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] arm64: dts: rockchip: Correct gmac phy address
2025-03-18 21:08 ` [PATCH v2 1/2] arm64: dts: rockchip: Correct gmac phy address Uwe Kleine-König
@ 2025-03-20 12:52 ` Andrew Lunn
0 siblings, 0 replies; 6+ messages in thread
From: Andrew Lunn @ 2025-03-20 12:52 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
devicetree, linux-arm-kernel, linux-rockchip
On Tue, Mar 18, 2025 at 10:08:45PM +0100, Uwe Kleine-König wrote:
> The Motorcomm Phy can be talked to on mdio broadcast address 0, but the
> actuall address is 3. Adapt the reg property and node name accordingly.
>
> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/2] arm64: dts: rockchip: Improve gmac phy setup for QNAP-TS433
2025-03-18 21:08 [PATCH v2 0/2] arm64: dts: rockchip: Improve gmac phy setup for QNAP-TS433 Uwe Kleine-König
2025-03-18 21:08 ` [PATCH v2 1/2] arm64: dts: rockchip: Correct gmac phy address Uwe Kleine-König
2025-03-18 21:08 ` [PATCH v2 2/2] arm64: dts: rockchip: Add gmac phy reset GPIO Uwe Kleine-König
@ 2025-04-07 7:17 ` Heiko Stuebner
2 siblings, 0 replies; 6+ messages in thread
From: Heiko Stuebner @ 2025-04-07 7:17 UTC (permalink / raw)
To: Andrew Lunn, Uwe Kleine-König
Cc: Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
devicetree, linux-arm-kernel, linux-rockchip
On Tue, 18 Mar 2025 22:08:44 +0100, Uwe Kleine-König wrote:
> as suggested by Heiko I split the patch to improve the phy setup of the
> gmac ethernet into two patches. The initial patch can be found at
> https://lore.kernel.org/linux-arm-kernel/20250318184550.47642-2-uwe@kleine-koenig.org/ .
>
> Heiko also suggested to add Fixes tags. I'm unsure these are justified
> because while these patches are an improvement the old devicetree is
> working fine. I suggest Heiko to add the tags if he feels strongly
> enough about these.
>
> [...]
Applied, thanks!
[1/2] arm64: dts: rockchip: Correct gmac phy address
commit: 831263a4164e189c47e3a9ea189cb4b5bc078b1e
[2/2] arm64: dts: rockchip: Add gmac phy reset GPIO
commit: d01e09a9f7cd4fb5a947e3dc718242b51b581615
Best regards,
--
Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-04-07 7:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-18 21:08 [PATCH v2 0/2] arm64: dts: rockchip: Improve gmac phy setup for QNAP-TS433 Uwe Kleine-König
2025-03-18 21:08 ` [PATCH v2 1/2] arm64: dts: rockchip: Correct gmac phy address Uwe Kleine-König
2025-03-20 12:52 ` Andrew Lunn
2025-03-18 21:08 ` [PATCH v2 2/2] arm64: dts: rockchip: Add gmac phy reset GPIO Uwe Kleine-König
2025-03-20 12:52 ` Andrew Lunn
2025-04-07 7:17 ` [PATCH v2 0/2] arm64: dts: rockchip: Improve gmac phy setup for QNAP-TS433 Heiko Stuebner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).