From: Christian Marangi <ansuelsmth@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: 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>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, netdev@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [net-next RFC PATCH v2 1/3] dt-bindings: net: dsa: Add Airoha AN8855 Gigabit Switch documentation
Date: Wed, 23 Oct 2024 19:14:37 +0200 [thread overview]
Message-ID: <67192f00.7b0a0220.343b2b.9836@mx.google.com> (raw)
In-Reply-To: <5761bdc3-7224-4de6-b0f5-bedc066c09f6@lunn.ch>
On Wed, Oct 23, 2024 at 07:08:57PM +0200, Andrew Lunn wrote:
> > + airoha,base_smi_address:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + description:
> > + Configure and change the base switch PHY address to a new address on
> > + the bus.
> > + On reset, the switch PHY address is ALWAYS 1.
> > + default: 1
> > + maximum: 31
>
> Given that this is a 5 port switch, what happens if i pick a value
> greater than 31 - 5 ?
The PHY at those address won't be reachable, I didn't think of this, you
are right.
>
> Do you have a real use case for this? A board which requires the PHYs
> get shifted from the default of 1? Vendors have all sorts of bells and
> whistles which we never use. If its not needed, i would not add it,
> until it is actually needed, if ever.
Well the first case that comes to mind is multiple switch and conflict.
I have no idea if there are hw strap to configure this so I assume if a
SoC have 2 switch (maybe of the same type), this permits to configure
them (with reset pin and deasserting them once the base address is
correctly configured)
But yes totally ok to drop this if too strange... I assume it's problematic
that PHY change at runtime.
>
> > + mdio:
> > + $ref: /schemas/net/mdio.yaml#
> > + unevaluatedProperties: false
> > + description:
> > + Define the relative address of the internal PHY for each port.
> > +
> > + Each reg for the PHY is relative to the switch base PHY address.
>
> Which is not the usual meaning of reg.
>
> > + mdio {
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > +
> > + internal_phy0: phy@0 {
> > + reg = <0>;
>
> So given that airoha,base_smi_address defaults to 1, this is actually
> address 1 on the MDIO bus?
>
Yes correct. One problem I had was that moving this outside the swich
cause panic as it does conflict with the switch PHY address...
--
Ansuel
next prev parent reply other threads:[~2024-10-23 18:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-23 16:19 [net-next RFC PATCH v2 0/3] net: dsa: Add Airoha AN8855 support Christian Marangi
2024-10-23 16:19 ` [net-next RFC PATCH v2 1/3] dt-bindings: net: dsa: Add Airoha AN8855 Gigabit Switch documentation Christian Marangi
2024-10-23 17:08 ` Andrew Lunn
2024-10-23 17:14 ` Christian Marangi [this message]
2024-10-23 17:39 ` Andrew Lunn
2024-10-23 17:45 ` Christian Marangi
2024-10-24 15:23 ` Rob Herring
2024-10-23 16:19 ` [net-next RFC PATCH v2 2/3] net: dsa: Add Airoha AN8855 5-Port Gigabit DSA Switch driver Christian Marangi
2024-10-23 16:19 ` [net-next RFC PATCH v2 3/3] net: phy: Add Airoha AN8855 Internal Switch Gigabit PHY Christian Marangi
2024-10-23 16:53 ` Andrew Lunn
2024-10-25 10:59 ` Christian Marangi
2024-10-25 12:56 ` Andrew Lunn
2024-10-23 17:00 ` Andrew Lunn
2024-10-23 17:07 ` Christian Marangi
2024-10-25 11:01 ` Christian Marangi
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=67192f00.7b0a0220.343b2b.9836@mx.google.com \
--to=ansuelsmth@gmail.com \
--cc=andrew@lunn.ch \
--cc=angelogioacchino.delregno@collabora.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=matthias.bgg@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).