Re: [net-next RFC PATCH 03/14] dt-bindings: net: document ethernet PHY package nodes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 20, 2023 at 10:25:10PM +0100, Andrew Lunn wrote:
> > A real DT that use this is (ipq807x):
> > 
> > &mdio {
> > 	status = "okay";
> > 	pinctrl-0 = <&mdio_pins>;
> > 	pinctrl-names = "default";
> > 	reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
> > 
> > 	ethernet-phy-package {
> > 		compatible = "ethernet-phy-package";
> > 		phy-mode = "psgmii";
> > 
> > 		global-phys = <&qca8075_4>, <&qca8075_psgmii>;
> > 		global-phy-names = "combo", "analog_psgmii";
> > 
> > 		qca8075_0: ethernet-phy@0 {
> > 			compatible = "ethernet-phy-ieee802.3-c22";
> > 			reg = <0>;
> > 		};
> 
> ...
> 
> > 	};
> > 
> > 	qca8081: ethernet-phy@28 {
> > 		compatible = "ethernet-phy-id004d.d101";
> > 		reg = <28>;
> > 		reset-gpios = <&tlmm 31 GPIO_ACTIVE_LOW>;
> > 	};
> 
> I've no idea if DT allows this. The issue is that reg is the same for
> both nodes within the ethernet-phy-package container, and
> ethernet-phy@28. They are all addresses on the same MDIO bus.  We are
> parsing this bus structure ourselves in __of_mdiobus_register(), so we
> could make it work, but i don't know if we should make it work.
>

And that is why I have some reserve on the idea of defining a reg for
ethernet-phy-package. Adding a reg would create some duplicate. Is it
really a problem to have a node with no reg in the mdio node?

(patch 04 of this series already updates the parsing function to check
one level deeper in the presence of the ethernet-phy-compatible treating
any node found as it was defined in the upper mdio node)

-- 
	Ansuel




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux