Skip to contentSkip to conversation

arm: kirkwood: Pogoplug V4 : Use Marvel network PHY driver

PATCH Superseded Tony Dinh 2 participants 4 messages Jan 25, 2022 – Jan 31, 2022

lore
Share & tools
lore

Tony Dinh

author
#0 lore raw

PATCH 1/1 arm: kirkwood: Pogoplug V4 : Use Marvel network PHY driver

The Pogoplug V4 board has the network chip Marvell 88E1118R. So to properly configure the network, enable CONFIG_PHY_MARVELL to activate the driver M88E1118R.

- This patch depends on the series:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

---

 configs/pogo_v4_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/pogo_v4_defconfig +1 -0
index 5490067b9e..1cf409c834 100644
@@ -62,6 +62,7 @@ CONFIG_KIRKWOOD_GPIO=y
 CONFIG_MVEBU_MMC=y
 CONFIG_MTD=y
 CONFIG_MTD_RAW_NAND=y
+CONFIG_PHY_MARVELL=y
 CONFIG_DM_ETH=y
 CONFIG_MVGBE=y
 CONFIG_MII=y
Signature · 1 line
2.30.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Tony Dinh

The Pogoplug V4 board has the network chip Marvell 88E1118R. So to properly configure the network, enable CONFIG_PHY_MARVELL to activate the driver M88E1118R.

- This patch depends on the series:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

I was wondering, how all this "magically" works without the Marvell PHY driver being involved. ;) So:

Thanks,
Stefan

Quoted 10 lines

---

  configs/pogo_v4_defconfig | 1 +
  1 file changed, 1 insertion(+)
configs/pogo_v4_defconfig +0 -0
index 5490067b9e..1cf409c834 100644

configs/pogo_v4_defconfig CONFIG_KIRKWOOD_GPIO=y · line 68

Quoted 7 lines
configs/pogo_v4_defconfig +1 -0
@@ -62,6 +62,7 @@ CONFIG_KIRKWOOD_GPIO=y
  CONFIG_MVEBU_MMC=y
  CONFIG_MTD=y
  CONFIG_MTD_RAW_NAND=y
+CONFIG_PHY_MARVELL=y
  CONFIG_DM_ETH=y
  CONFIG_MVGBE=y
  CONFIG_MII=y

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
author
#2 lore raw

Hi Stefan,

Quoted 6 lines · Stefan Roese
Quoted 4 lines · Tony Dinh

The Pogoplug V4 board has the network chip Marvell 88E1118R. So to properly configure the network, enable CONFIG_PHY_MARVELL to activate the driver M88E1118R.

Quoted 7 lines
Quoted 4 lines

- This patch depends on the series:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

I was wondering, how all this "magically" works without the Marvell PHY driver being involved. ;) So:

I was wondering the same thing :) so I traced the mvgbe uclass code calling sequence. It sets up the network in the same way for Marvell network chips used in Kirkwood boards so the network was brought up successfully. And it is because the driver .config hook falls back to the genphy_config() in drivers/net/phy/phy.c. And there is enough there for the network configuration. Hypothetically, if we encountered an unknown chip, it still works in Gbit mode.

However, the specific settings such as RGMII and LED are done by the driver .config and .startup hook if the Marvell PHY driver is enabled.

Initially, I thought if there is info in the DTS (or we could add more), then this mvgbe uclass could do the work as the same as the driver, too. But things such as phy-mode, speed, and duplex... must be added to the DTS to make that happen. And it is counterproductive when we already have the driver for that.

And thank you, Marek, and Pali for reviewing and critics. After many years of absence from u-boot, I got up to speed again a lot easier thanks to your comments!

Thanks,
Tony

Quoted 30 lines

Thanks,
Stefan

Quoted 10 lines

---

  configs/pogo_v4_defconfig | 1 +
  1 file changed, 1 insertion(+)
configs/pogo_v4_defconfig +0 -0
index 5490067b9e..1cf409c834 100644

configs/pogo_v4_defconfig CONFIG_KIRKWOOD_GPIO=y · line 68

Quoted 7 lines
configs/pogo_v4_defconfig +1 -0
@@ -62,6 +62,7 @@ CONFIG_KIRKWOOD_GPIO=y
  CONFIG_MVEBU_MMC=y
  CONFIG_MTD=y
  CONFIG_MTD_RAW_NAND=y
+CONFIG_PHY_MARVELL=y
  CONFIG_DM_ETH=y
  CONFIG_MVGBE=y
  CONFIG_MII=y

Viele Grüße,
Stefan Roese

--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]

#3 lore raw
In reply to Tony Dinh
Quoted 8 lines · Tony Dinh

The Pogoplug V4 board has the network chip Marvell 88E1118R. So to properly configure the network, enable CONFIG_PHY_MARVELL to activate the driver M88E1118R.

- This patch depends on the series:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Applied to u-boot-marvell/master

Thanks,
Stefan

Quoted 10 lines

---

  configs/pogo_v4_defconfig | 1 +
  1 file changed, 1 insertion(+)
configs/pogo_v4_defconfig +0 -0
index 5490067b9e..1cf409c834 100644

configs/pogo_v4_defconfig CONFIG_KIRKWOOD_GPIO=y · line 68

Quoted 7 lines
configs/pogo_v4_defconfig +1 -0
@@ -62,6 +62,7 @@ CONFIG_KIRKWOOD_GPIO=y
  CONFIG_MVEBU_MMC=y
  CONFIG_MTD=y
  CONFIG_MTD_RAW_NAND=y
+CONFIG_PHY_MARVELL=y
  CONFIG_DM_ETH=y
  CONFIG_MVGBE=y
  CONFIG_MII=y

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]