From: Lukasz Majewski <lukma@denx.de>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org,
Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Subject: Re: [PATCH 1/9] net: dsa: allow switch drivers to override default slave PHY addresses
Date: Thu, 10 Nov 2022 16:34:25 +0100 [thread overview]
Message-ID: <20221110163425.7b4974d5@wsk> (raw)
In-Reply-To: <Y2pX0qrLs/OCQOFr@lunn.ch>
[-- Attachment #1: Type: text/plain, Size: 2393 bytes --]
Hi Andrew,
> On Tue, Nov 08, 2022 at 09:23:22AM +0100, Lukasz Majewski wrote:
> > From: Matthias Schiffer <matthias.schiffer@ew.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@denx.de
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2022-11-10 15:35 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-08 8:23 [PATCH 0/9] net: dsa: Add support for mv88e6020 and mv88e6071 Lukasz Majewski
2022-11-08 8:23 ` [PATCH 1/9] net: dsa: allow switch drivers to override default slave PHY addresses Lukasz Majewski
2022-11-08 9:12 ` Vladimir Oltean
2022-11-08 10:34 ` Lukasz Majewski
2022-11-08 13:21 ` Andrew Lunn
2022-11-10 15:34 ` Lukasz Majewski [this message]
2022-11-10 22:05 ` Andrew Lunn
2022-11-14 8:51 ` Lukasz Majewski
2022-11-08 18:10 ` Florian Fainelli
2022-11-08 8:23 ` [PATCH 2/9] net: dsa: mv88e6xxx: account for PHY base address offset in dual chip mode Lukasz Majewski
2022-11-08 13:26 ` Andrew Lunn
2022-11-10 17:02 ` Lukasz Majewski
2022-11-08 8:23 ` [PATCH 3/9] net: dsa: mv88e6xxx: implement get_phy_address Lukasz Majewski
2022-11-08 9:12 ` Vladimir Oltean
2022-11-08 13:36 ` Andrew Lunn
2022-11-10 17:00 ` Lukasz Majewski
2022-11-11 21:38 ` Vladimir Oltean
2022-11-14 10:10 ` Lukasz Majewski
2022-11-10 16:37 ` Lukasz Majewski
2022-11-08 8:23 ` [PATCH 4/9] net: dsa: mv88e6xxx: add support for MV88E6020 switch Lukasz Majewski
2022-11-08 8:23 ` [PATCH 5/9] net: dsa: mv88e6xxx: Add support for MV88E6071 switch Lukasz Majewski
2022-11-08 8:23 ` [PATCH 6/9] net: dsa: marvell: Provide per device information about max frame size Lukasz Majewski
2022-11-08 13:47 ` Andrew Lunn
2022-11-10 15:36 ` Lukasz Majewski
2022-11-10 22:10 ` Andrew Lunn
2022-11-14 8:52 ` Lukasz Majewski
2022-11-08 8:23 ` [PATCH 7/9] net: dsa: mv88e6071: Define max frame size (2048 bytes) Lukasz Majewski
2022-11-08 13:49 ` Andrew Lunn
2022-11-10 15:42 ` Lukasz Majewski
2022-11-10 22:12 ` Andrew Lunn
2022-11-14 9:06 ` Lukasz Majewski
2022-11-08 8:23 ` [PATCH 8/9] net: dsa: mv88e6071: Provide struct mv88e6xxx_ops Lukasz Majewski
2022-11-08 8:23 ` [PATCH 9/9] net: dsa: mv88e6071: Set .set_max_frame_size callback Lukasz Majewski
2022-11-08 14:03 ` Andrew Lunn
2022-11-10 16:00 ` Lukasz Majewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221110163425.7b4974d5@wsk \
--to=lukma@denx.de \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=matthias.schiffer@ew.tq-group.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=vivien.didelot@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox