[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2504b605-24e7-4573-bec0-78f55688a482@lunn.ch>
Date: Sun, 27 Jul 2025 21:09:56 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Jonas Karlman <jonas@...boo.se>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Alvin Šipraga <alsi@...g-olufsen.dk>,
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>,
Yao Zi <ziyao@...root.org>, Chukun Pan <amadeus@....edu.cn>,
Heiko Stuebner <heiko@...ech.de>, netdev@...r.kernel.org,
linux-rockchip@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 2/3] net: dsa: realtek: Add support for use of
an optional mdio node
On Sun, Jul 27, 2025 at 06:02:59PM +0000, Jonas Karlman wrote:
> The dt-bindings schema for Realtek switches for unmanaged switches
> contains a restriction on use of a mdio child OF node for MDIO-connected
> switches, i.e.:
>
> if:
> required:
> - reg
> then:
> not:
> required:
> - mdio
> properties:
> mdio: false
>
> However, the driver currently requires the existence of a mdio child OF
> node to successfully probe and properly function.
>
> Relax the requirement of a mdio child OF node and assign the dsa_switch
> user_mii_bus to allow a MDIO-connected switch to probe and function
> when a mdio child OF node is missing.
I could be getting this wrong.... Maybe Linus knows more.
It could be the switch does not have its own separate MDIO bus just
for its internal PHYs. They just appear on the parent mdio bus. So
you represent this with:
&mdio0 {
reset-delay-us = <25000>;
reset-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
reset-post-delay-us = <100000>;
phy0: ethernet-phy@0 {
reg = <0>;
};
phy1: ethernet-phy@1 {
reg = <0>;
};
ethernet-switch@1d {
compatible = "realtek,rtl8365mb";
reg = <0x1d>;
pinctrl-names = "default";
pinctrl-0 = <&rtl8367rb_eint>;
ethernet-ports {
#address-cells = <1>;
#size-cells = <0>;
ethernet-port@0 {
reg = <0>;
label = "wan";
phy-handle = <phy0>;
};
ethernet-port@1 {
reg = <1>;
label = "lan1";
phy-handle = <phy1>;
};
If this is correct, you should not need any driver or DT binding
changes.
Andrew
Powered by blists - more mailing lists