[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221110163425.7b4974d5@wsk>
Date: Thu, 10 Nov 2022 16:34:25 +0100
From: Lukasz Majewski <lukma@...x.de>
To: Andrew Lunn <andrew@...n.ch>
Cc: Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
Matthias Schiffer <matthias.schiffer@...tq-group.com>
Subject: Re: [PATCH 1/9] net: dsa: allow switch drivers to override default
slave PHY addresses
Hi Andrew,
> On Tue, Nov 08, 2022 at 09:23:22AM +0100, Lukasz Majewski wrote:
> > From: Matthias Schiffer <matthias.schiffer@...tq-group.com>
> >
> > Avoid having to define a PHY for every physical port when PHY
> > addresses are fixed, but port index != PHY address.
>
> Please could you expand the commit message.
I've left the comment untouched from Matthias...
> What i think is going on
> is that for the lower device, port 0 has phy address 0, port 1 phy
> address 1. But the upper switch has port 0 phy address 16, port 1 phy
> addr 17?
To be more specific -> for mv88e6071 and mv88e6020:
PHY ports have SMI addresses from 0 to 0x6 and
Switch PORTS have addresses from 0x8 to 0xE
Global 2 -> 0x7
Global 1 -> 0xF
Access to PHYs is ONLY possible via indirect access from Global 2 (0x7
SMI addr) - offsets 0x18 and 0x19.
but :-)
there is also RO_LED/ADDR4 pin (bootstrap), which when set changes the
SMI address of PHYs (from 0x00 - 0x04 to 0x10 to 0x14). This allows
easy expansion of the number of ports for switch...
>
> 6141 and 6341 set phy_base_addr to 0x10.
It depends if the HW designer set this bootstrap pin low or high :-)
(often this pin is not concerned until mainline/BSP driver is not
working :-) )
As it costs $ to fix this - it is easier to add "quirk" to the code.
> Oddly, this is only used for
> the interrupt. So i assume these two devices also need device tree
> phy-handle descriptions?
I only have access to 6071 and 6020 switches.
>
> It would be nice to fix the 6141 and the 6341 as well.
As Vladimir pointed out - many Marvell switches use the "old" DTS
description ...
>
> What might help with understanding is have the patch for the mv88e6xxx
> op first, and then wire it up in the core afterwards. Reviews tend to
> happen first to last, so either your commit message needs to explain
> what is coming, or you do things in the order which helps the reviewer
> the most.
I must admit, that I've just used code (his patch sert) from Matthias as
a starting point (to keep his credits).
>
> Andrew
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@...x.de
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists