[PATCH v4 0/8] Add MV88E6xxx DSA driver and use on gwventana

Fabio Estevam festevam at gmail.com
Mon Oct 3 18:26:42 CEST 2022


Hi Tim,

On Wed, Sep 28, 2022 at 4:37 PM Tim Harvey <tharvey at gateworks.com> wrote:
>
> This series adds a DSA driver for the MV88E6xxx based on
> drivers/net/phy/mv88e61xx and uses it in the gwventana_gw5904_defconfig.
>
> The hope is that the other three boards that use the MV88E61xx driver
> can move to this as well eventually so that we can remove the non-dm
> driver and the 4 Kconfig options it requires.
>
> The MV88E6xxx has an MDIO interface thus DM_MDIO must be used so support
> for a UCLASS_MDIO driver is added to the fec_mxc ethernet driver in a
> way that allows a fallback to the previous non DM_MDIO case as there are
> many boards out there using this driver that define DM_MDIO but do not
> have the required dt props for a DM_MDIO driver which would cause a
> regression.
>
> Additionally some other patches are here suggested by Vladimir:
>  - ensure MDIO children are scanned on post-bind is needed
>  - sanity check DSA driver required ops are present
>  - allow DSA drivers to not require xmit/recv functions
>  - remove unecessary xmit/recv functions from ksz9477 driver

I am trying to test your series on a custom imx8mn-based board with a Marvell
88E6320 switch.

I applied your series against U-Boot master, and added the change below
to support 88E6320:

diff --git a/drivers/net/mv88e6xxx.c b/drivers/net/mv88e6xxx.c
index 6064bb7325..09ce6dd114 100644
--- a/drivers/net/mv88e6xxx.c
+++ b/drivers/net/mv88e6xxx.c
@@ -176,6 +176,7 @@
 #define PORT_SWITCH_ID_6220            0x2200
 #define PORT_SWITCH_ID_6240            0x2400
 #define PORT_SWITCH_ID_6250            0x2500
+#define PORT_SWITCH_ID_6320            0x1150
 #define PORT_SWITCH_ID_6352            0x3520

 struct mv88e6xxx_priv {
@@ -792,6 +793,7 @@ static int mv88e6xxx_probe(struct udevice *dev)
        case PORT_SWITCH_ID_6071:
        case PORT_SWITCH_ID_6220:
        case PORT_SWITCH_ID_6250:
+       case PORT_SWITCH_ID_6320:
                priv->port_count = 7;
                priv->phy_ctrl1_en_det_shift = 14;
                priv->phy_ctrl1_en_det_width = 1;

When booting I get:

Error: ethernet at 30be0000 address not set.
No ethernet found.

And 'dm tree' shows that the Ethernet drivers have not been probed:

=> dm tree

 ethernet      0  [   ]   fecmxc                |   |   `-- ethernet at 30be0000
...
 mdio          0  [   ]   fec_mdio              |   |       `-- mdio

If you have any suggestions, please let me know.

Thanks


More information about the U-Boot mailing list