Skip to contentSkip to conversation

riscv: dts: spacemit: Fix phy id check for the phy

PATCH Applied Inochi Amaoto 4 participants 9 messages Jul 25 – Jul 28

Subsystems (5)

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw

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.

Fixes 74657a376960 ("riscv: dts: spacemit: Add ethernet device for K3")
---
 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
index b2a7d2d0d3a8..b9d2de878f38 100644
@@ -196,7 +196,8 @@ &eth0 {
 
 	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
#6 lore raw

PATCH 2/2 riscv: dts: spacemit: Fix phy id check for the phy on com260 board

In reply to 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 com260 manually so the phy id dectection can be skipped.

Fixes cfe5c91cb73c ("riscv: dts: spacemit: k3: Initial support for CoM260-IFX board")
---
 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
index b704b537385c..a26b18aabec1 100644
@@ -174,7 +174,8 @@ &eth1 {
 
 	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
maintainer Reviewed-by on the v1 series
#7 lore raw
In reply to Inochi Amaoto

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)
#2 lore raw

Re: [PATCH 1/2] riscv: dts: spacemit: Fix phy id check for the phy on pico-itx board

In reply to Inochi Amaoto

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")
---
 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
index b2a7d2d0d3a8..b9d2de878f38 100644

arch/riscv/boot/dts/spacemit/k3-pico-itx.dts &eth0 { · line 203

Quoted 9 lines
arch/riscv/boot/dts/spacemit/k3-pico-itx.dts +2 -1
@@ -196,7 +196,8 @@ &eth0 {
 
 	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

maintainer
#3 lore raw

Re: [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")
---
 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
index b2a7d2d0d3a8..b9d2de878f38 100644
@@ -196,7 +196,8 @@ &eth0 {
 
Quoted 13 lines

arch/riscv/boot/dts/spacemit/k3-pico-itx.dts &eth0 { · line 203

Quoted 8 lines
arch/riscv/boot/dts/spacemit/k3-pico-itx.dts +2 -1
 	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.

Yes, I will fix them while applying, no need to resend, thanks for review

Signature · 1 line
Yixun Lan (dlan)
#4 lore raw

Re: [PATCH 1/2] riscv: dts: spacemit: Fix phy id check for the phy on pico-itx board

In reply to Inochi Amaoto
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")
---
 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
index b2a7d2d0d3a8..b9d2de878f38 100644

arch/riscv/boot/dts/spacemit/k3-pico-itx.dts &eth0 { · line 200

Quoted 6 lines
arch/riscv/boot/dts/spacemit/k3-pico-itx.dts +2 -1
@@ -196,7 +196,8 @@ &eth0 {
 
 	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

#5 lore raw

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")
---
 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
index b2a7d2d0d3a8..b9d2de878f38 100644
@@ -196,7 +196,8 @@ &eth0 {
 
Quoted 10 lines

arch/riscv/boot/dts/spacemit/k3-pico-itx.dts &eth0 { · line 200

Quoted 5 lines
arch/riscv/boot/dts/spacemit/k3-pico-itx.dts +2 -1
 	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?

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

maintainer Applied
#8 lore raw
In reply to Inochi Amaoto
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]>