Skip to contentSkip to conversation

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

PATCH In review Inochi Amaoto 2 participants 4 messages Jul 25 – Jul 26

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

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

As reported, the phy framework can not detected the phy id correctly when re-initialize 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.

Changed from v1:
- https://lore.kernel.org/spacemit/[email protected]
1. Remove all the c22 fallback compatible.

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  | 2 +-
 arch/riscv/boot/dts/spacemit/k3-pico-itx.dts | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--
2.55.0

#1 lore raw

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

Current phy framework can not re-initialize the phy correctly, as it will assert the phy reset GPIO so the phy id can not be read. Setting the phy id of board pico-itx manually so the phy id detection can be skipped.

Fixes 74657a376960 ("riscv: dts: spacemit: Add ethernet device for K3")
---
 arch/riscv/boot/dts/spacemit/k3-pico-itx.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/boot/dts/spacemit/k3-pico-itx.dts +1 -1
index b2a7d2d0d3a8..d78416f3118e 100644
@@ -196,7 +196,7 @@ &eth0 {
 
 	mdio {
 		phy0: phy@1 {
-			compatible = "ethernet-phy-ieee802.3-c22";
+			compatible = "ethernet-phy-id001c.c916";
 			reg = <1>;
 			reset-gpios = <&gpio 0 15 GPIO_ACTIVE_LOW>;
 			reset-assert-us = <10000>;
Signature · 1 line
2.55.0
#2 lore raw

PATCH v2 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 re-initialize the phy correctly, as it will assert the phy reset GPIO so the phy id can not be read. 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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/boot/dts/spacemit/k3-com260.dtsi +1 -1
index b704b537385c..2a07cd8f2a56 100644
@@ -174,7 +174,7 @@ &eth1 {
 
 	mdio {
 		phy1: phy@1 {
-			compatible = "ethernet-phy-ieee802.3-c22";
+			compatible = "ethernet-phy-id001c.c916";
 			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 v2 series
#3 lore raw
In reply to Inochi Amaoto

Hi Inochi,

Quoted 9 lines · Inochi Amaoto

As reported, the phy framework can not detected the phy id correctly when re-initialize 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.

Changed from v1:
- https://lore.kernel.org/spacemit/[email protected]
1. Remove all the c22 fallback compatible.

Quoted 12 lines

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  | 2 +-
 arch/riscv/boot/dts/spacemit/k3-pico-itx.dts | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--
2.55.0

Signature · 1 line
Yixun Lan (dlan)