Re: [PATCH net-next v4 2/2] net:dsa:microchip: add property to select

From: Oleksij Rempel
Date: Mon Oct 23 2023 - 03:59:00 EST


On Mon, Oct 23, 2023 at 09:27:00AM +0200, Ante Knezic wrote:
> On Fri, 20 Oct 2023 17:37:59 +0300, Vladimir Oltean wrote:
>
> > Sorry, I didn't realize on v3 that you didn't completely apply my
> > feedback on v2. Can "microchip,rmii-clk-internal" be a port device tree
> > property? You have indeed moved its parsing to port code, but it is
> > still located directly under the switch node in the device tree.
> >
> > I'm thinking that if this property was also applicable to other switches
> > with multiple RMII ports, the setting would be per port rather than global.
>
> As far as I am aware only the KSZ8863 and KSZ8873 have this property available,
> but the biggger issue might be in scaling this to port property as the register
> "Forward Invalid VID Frame and Host Mode" where the setting is applied is
> located under "Advanced Control Registers" section which is actually global at
> least looking from the switch point of view. Usually port properties are more
> applicable when registers in question are located under "Port Registers" section.
> This is somewhat similar to for example enabling the tail tag mode which is
> again used only by the port 3 interface and is control from "Global Control 1"
> register.
> With this in mind - if you still believe we should move this to port dt
> property, then should we forbid setting the property for any other port other
> than port 3, and can/should this be enforced by the dt schema?
>

If I see it correctly, KSZ9897R supports RMII on two ports (6 and 7)
with configurable clock direction. See page 124 "5.2.3.2 XMII Port Control 1
Register"
http://ww1.microchip.com/downloads/en/DeviceDoc/00002330B.pdf

Regards,
Oleksij
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |