Subject: Re: DSA with MV88E6321 and imx28

From: Andrew Lunn <[email-masked]>
Date: Wed, 5 Jun 2019 14:24:04 +0200

> I got the devicetree from somebody that is why German is in it. But
> first I wanted to get it running before I tidy it up.  The switch is
> strapped to single mode (so I can read SMI addresses 0x10-0x16 and
> 0x1b-0x1e directly).

Hi Benjamin

You have miss-understood what reg means.

There are three addressing modes used by the various switches,
although most only support two.

In multi-chip mode, it occupies one address, and there are two
registers used to multiplex access to the underlying registers.  In
this setup, you use reg=<X> to indicate the switch is using address X.

In single mode, it occupies all addresses on the MDIO bus, but many
are reserved. In this mode you use reg=<0>.

A few chips support dual mode, where you can have two switches on one
MDIO bus, one using 0x0-0xf, and the second using 0x10-0x1f. Here you
use reg=<0> or reg=<16>.

Try setting reg=<0> if you have it in single mode.

    Andrew