riscv: dts: spacemit: Fix phy id check for the phy
Subsystems (5)
cover riscv: dts: spacemit: Fix phy id check for the phy
As reported, the phy framework can not detected the phy id correctly when reiniting this. So add the phy id compatible string to the etherenet phy, so the phy can be reinit successfully.
Note: separate this patchset as two patch for backport if necessary.
Inochi Amaoto (2):
riscv: dts: spacemit: Fix phy id check for the phy on pico-itx board
riscv: dts: spacemit: Fix phy id check for the phy on com260 board
arch/riscv/boot/dts/spacemit/k3-com260.dtsi | 3 ++- arch/riscv/boot/dts/spacemit/k3-pico-itx.dts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
--
2.55.0
PATCH 1/2 riscv: dts: spacemit: Fix phy id check for the phy on pico-itx board
Current phy framework can not reinit the phy correctly, as it will assert the phy reset GPIO so the phy id can not be readed. Setting the phy id of board pico-itx manually so the phy id dectection can be skipped.
--- arch/riscv/boot/dts/spacemit/k3-pico-itx.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/riscv/boot/dts/spacemit/k3-pico-itx.dts +2 -1
@@ -196,7 +196,8 @@ ð0 { mdio { phy0: phy@1 { - compatible = "ethernet-phy-ieee802.3-c22"; + compatible = "ethernet-phy-id001c.c916", + "ethernet-phy-ieee802.3-c22"; reg = <1>; reset-gpios = <&gpio 0 15 GPIO_ACTIVE_LOW>; reset-assert-us = <10000>;
Signature · 1 line
2.55.0
Re: [PATCH 1/2] riscv: dts: spacemit: Fix phy id check for the phy on pico-itx board
Hi Inochi,
Quoted 20 lines · Inochi Amaoto
Current phy framework can not reinit the phy correctly, as it will assert the phy reset GPIO so the phy id can not be readed. Setting the phy id of board pico-itx manually so the phy id dectection can be skipped.
Fixes 74657a376960 ("riscv: dts: spacemit: Add ethernet device for K3")Reported-by E Shattow <[email protected]>Reported-by Inochi Amaoto <[email protected]>Signed-off-by Inochi Amaoto <[email protected]>Tested-by E Shattow <[email protected]>--- arch/riscv/boot/dts/spacemit/k3-pico-itx.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)arch/riscv/boot/dts/spacemit/k3-pico-itx.dts +0
-0
arch/riscv/boot/dts/spacemit/k3-pico-itx.dts ð0 { · line 203
Quoted 9 lines
arch/riscv/boot/dts/spacemit/k3-pico-itx.dts +2
-1@@ -196,7 +196,8 @@ ð0 { mdio { phy0: phy@1 { - compatible = "ethernet-phy-ieee802.3-c22"; + compatible = "ethernet-phy-id001c.c916", + "ethernet-phy-ieee802.3-c22"; reg = <1>; reset-gpios = <&gpio 0 15 GPIO_ACTIVE_LOW>; reset-assert-us = <10000>;
Looks good to me, aside from commit message spelling and grammar nits ("re-initialize", "read", "detection"). Yixun may just fix in-flight, my R-by and T-by tags can stay.
Thanks! -E
Yixun Lan
maintainerRe: [PATCH 1/2] riscv: dts: spacemit: Fix phy id check for the phy on pico-itx board
Hi E Shattow,
Quoted 24 lines · E Shattow
Hi Inochi,
Quoted 21 lines · Inochi Amaoto
Current phy framework can not reinit the phy correctly, as it will assert the phy reset GPIO so the phy id can not be readed. Setting the phy id of board pico-itx manually so the phy id dectection can be skipped.
Fixes 74657a376960 ("riscv: dts: spacemit: Add ethernet device for K3")Reported-by E Shattow <[email protected]>Reported-by Inochi Amaoto <[email protected]>Signed-off-by Inochi Amaoto <[email protected]>Tested-by E Shattow <[email protected]>--- arch/riscv/boot/dts/spacemit/k3-pico-itx.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)arch/riscv/boot/dts/spacemit/k3-pico-itx.dts +0
-0@@ -196,7 +196,8 @@ ð0 {
Quoted 13 lines
arch/riscv/boot/dts/spacemit/k3-pico-itx.dts ð0 { · line 203
Quoted 8 lines
arch/riscv/boot/dts/spacemit/k3-pico-itx.dts +2
-1mdio { phy0: phy@1 { - compatible = "ethernet-phy-ieee802.3-c22"; + compatible = "ethernet-phy-id001c.c916", + "ethernet-phy-ieee802.3-c22"; reg = <1>; reset-gpios = <&gpio 0 15 GPIO_ACTIVE_LOW>; reset-assert-us = <10000>;Looks good to me, aside from commit message spelling and grammar nits ("re-initialize", "read", "detection"). Yixun may just fix in-flight, my R-by and T-by tags can stay.
Yes, I will fix them while applying, no need to resend, thanks for review
Signature · 1 line
Yixun Lan (dlan)
Re: [PATCH 1/2] riscv: dts: spacemit: Fix phy id check for the phy on pico-itx board
In reply to Inochi AmaotoQuoted 20 lines · Inochi Amaoto
Current phy framework can not reinit the phy correctly, as it will assert the phy reset GPIO so the phy id can not be readed. Setting the phy id of board pico-itx manually so the phy id dectection can be skipped.
Fixes 74657a376960 ("riscv: dts: spacemit: Add ethernet device for K3")Reported-by E Shattow <[email protected]>Reported-by Inochi Amaoto <[email protected]>Signed-off-by Inochi Amaoto <[email protected]>Tested-by E Shattow <[email protected]>--- arch/riscv/boot/dts/spacemit/k3-pico-itx.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)arch/riscv/boot/dts/spacemit/k3-pico-itx.dts +0
-0
arch/riscv/boot/dts/spacemit/k3-pico-itx.dts ð0 { · line 200
Quoted 6 lines
arch/riscv/boot/dts/spacemit/k3-pico-itx.dts +2
-1@@ -196,7 +196,8 @@ ð0 { mdio { phy0: phy@1 { - compatible = "ethernet-phy-ieee802.3-c22"; + compatible = "ethernet-phy-id001c.c916", + "ethernet-phy-ieee802.3-c22";
There was a patch recently from one of the DT Maintainers removing the -c22 compatible when there was a specific PHY ID. I did not look into why. Does this pass all the binding tool checks?
Andrew
Re: [PATCH 1/2] riscv: dts: spacemit: Fix phy id check for the phy on pico-itx board
Quoted 22 lines · Andrew Lunn
Quoted 21 lines · Inochi Amaoto
Current phy framework can not reinit the phy correctly, as it will assert the phy reset GPIO so the phy id can not be readed. Setting the phy id of board pico-itx manually so the phy id dectection can be skipped.
Fixes 74657a376960 ("riscv: dts: spacemit: Add ethernet device for K3")Reported-by E Shattow <[email protected]>Reported-by Inochi Amaoto <[email protected]>Signed-off-by Inochi Amaoto <[email protected]>Tested-by E Shattow <[email protected]>--- arch/riscv/boot/dts/spacemit/k3-pico-itx.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)arch/riscv/boot/dts/spacemit/k3-pico-itx.dts +0
-0@@ -196,7 +196,8 @@ ð0 {
Quoted 10 lines
arch/riscv/boot/dts/spacemit/k3-pico-itx.dts ð0 { · line 200
Quoted 5 lines
arch/riscv/boot/dts/spacemit/k3-pico-itx.dts +2
-1mdio { phy0: phy@1 { - compatible = "ethernet-phy-ieee802.3-c22"; + compatible = "ethernet-phy-id001c.c916", + "ethernet-phy-ieee802.3-c22";There was a patch recently from one of the DT Maintainers removing the -c22 compatible when there was a specific PHY ID. I did not look into why. Does this pass all the binding tool checks?
Thanks for this mention, I have found the patch link.
https://lore.kernel.org/netdev/[email protected]/
It seems like this patch is not merge at now, but I am fine to send a new version for the incoming change.
Regards,
Inochi
PATCH 2/2 riscv: dts: spacemit: Fix phy id check for the phy on com260 board
In reply to Inochi AmaotoCurrent phy framework can not reinit the phy correctly, as it will assert the phy reset GPIO so the phy id can not be readed. Setting the phy id of board com260 manually so the phy id dectection can be skipped.
--- arch/riscv/boot/dts/spacemit/k3-com260.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/riscv/boot/dts/spacemit/k3-com260.dtsi +2 -1
@@ -174,7 +174,8 @@ ð1 { mdio { phy1: phy@1 { - compatible = "ethernet-phy-ieee802.3-c22"; + compatible = "ethernet-phy-id001c.c916", + "ethernet-phy-ieee802.3-c22"; reg = <1>; reset-gpios = <&gpio 1 5 GPIO_ACTIVE_LOW>; reset-assert-us = <10000>;
Signature · 1 line
2.55.0
Hi Inochi,
Quoted 10 lines · Inochi Amaoto
As reported, the phy framework can not detected the phy id correctly when reiniting this. So add the phy id compatible string to the etherenet phy, so the phy can be reinit successfully.
Note: separate this patchset as two patch for backport if necessary.
Inochi Amaoto (2):
riscv: dts: spacemit: Fix phy id check for the phy on pico-itx board
riscv: dts: spacemit: Fix phy id check for the phy on com260 board
for the series, with R-B
Quoted 7 lines
arch/riscv/boot/dts/spacemit/k3-com260.dtsi | 3 ++- arch/riscv/boot/dts/spacemit/k3-pico-itx.dts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)--
2.55.0
Signature · 1 line
Yixun Lan (dlan)
Quoted 11 lines · Inochi Amaoto
As reported, the phy framework can not detected the phy id correctly when reiniting this. So add the phy id compatible string to the etherenet phy, so the phy can be reinit successfully.
Note: separate this patchset as two patch for backport if necessary.
Inochi Amaoto (2):
riscv: dts: spacemit: Fix phy id check for the phy on pico-itx board
riscv: dts: spacemit: Fix phy id check for the phy on com260 board[...]
Applied, thanks!
[1/2] riscv: dts: spacemit: Fix phy id check for the phy on pico-itx board
https://git.kernel.org/pub/scm/linux/kernel/git/spacemit/linux.git/commit/?id=6d6536c880febe2340d8d388f42660eccff5aa81 [2/2] riscv: dts: spacemit: Fix phy id check for the phy on com260 board https://git.kernel.org/pub/scm/linux/kernel/git/spacemit/linux.git/commit/?id=9db839d52ccd9af67d460cb9ac893276a74b88e5
Best regards,
Signature · 1 line
Yixun Lan <[email protected]>