Skip to contentSkip to conversation

ARM: dts: dlink-dns327l: fix reg-init PHY

PATCH In review Daniel González Cabanelas 3 participants 3 messages Jun 26, 2020 – Jul 18, 2020 Device tree bindings

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: dlink-dns327l: fix reg-init PHY

The marvell PHY reg-init registers for the D-Link DNS-327L are wrong. Currently the first field is used to set the page 2, but this is pointless. The usage is not correct, and we are setting the wrong registers.

Fix it.

---
 arch/arm/boot/dts/armada-370-dlink-dns327l.dts | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
arch/arm/boot/dts/armada-370-dlink-dns327l.dts +2 -3
index baa459dd5..2008c6eaa 100644
@@ -247,9 +247,8 @@ &uart1 {
 &mdio {
 	phy0: ethernet-phy@0 { /* Marvell 88E1318 */
 		reg = <0>;
-		marvell,reg-init = <0x0 0x16 0x0 0x0002>,
-				<0x0 0x19 0x0 0x0077>,
-				<0x0 0x18 0x0 0x5747>;
+		marvell,reg-init = <0x2 0x19 0x0 0x0077>,
+				   <0x2 0x18 0x0 0x5747>;
 	};
 };
 
Signature · 1 line
2.27.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 17 lines · Daniel González Cabanelas

The marvell PHY reg-init registers for the D-Link DNS-327L are wrong. Currently the first field is used to set the page 2, but this is pointless. The usage is not correct, and we are setting the wrong registers.

Fix it.

---
 arch/arm/boot/dts/armada-370-dlink-dns327l.dts | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
arch/arm/boot/dts/armada-370-dlink-dns327l.dts +0 -0
index baa459dd5..2008c6eaa 100644

arch/arm/boot/dts/armada-370-dlink-dns327l.dts &uart1 { · line 250

Quoted 4 lines
arch/arm/boot/dts/armada-370-dlink-dns327l.dts +0 -1
@@ -247,9 +247,8 @@ &uart1 {
 &mdio {
 	phy0: ethernet-phy@0 { /* Marvell 88E1318 */
 		reg = <0>;
-		marvell,reg-init = <0x0 0x16 0x0 0x0002>,

Interesting. That is writing to the page register, to change to page 2! So this might of worked with an earlier implementation. But not now.

arch/arm/boot/dts/armada-370-dlink-dns327l.dts &uart1 { · line 251

Quoted 4 lines
arch/arm/boot/dts/armada-370-dlink-dns327l.dts +2 -2
-				<0x0 0x19 0x0 0x0077>,
-				<0x0 0x18 0x0 0x5747>;
+		marvell,reg-init = <0x2 0x19 0x0 0x0077>,
+				   <0x2 0x18 0x0 0x5747>;

Andrew

#2 lore raw
In reply to Daniel González Cabanelas
Quoted 8 lines · Daniel González Cabanelas

The marvell PHY reg-init registers for the D-Link DNS-327L are wrong. Currently the first field is used to set the page 2, but this is pointless. The usage is not correct, and we are setting the wrong registers.

Fix it.

Applied on mvebu/dt

Thanks,

Gregory

Quoted 26 lines
---
 arch/arm/boot/dts/armada-370-dlink-dns327l.dts | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
arch/arm/boot/dts/armada-370-dlink-dns327l.dts +2 -3
index baa459dd5..2008c6eaa 100644
@@ -247,9 +247,8 @@ &uart1 {
 &mdio {
 	phy0: ethernet-phy@0 { /* Marvell 88E1318 */
 		reg = <0>;
-		marvell,reg-init = <0x0 0x16 0x0 0x0002>,
-				<0x0 0x19 0x0 0x0077>,
-				<0x0 0x18 0x0 0x5747>;
+		marvell,reg-init = <0x2 0x19 0x0 0x0077>,
+				   <0x2 0x18 0x0 0x5747>;
 	};
 };
 
Signature · 1 line
2.27.0
Signature · 3 lines
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com