Modifying binding or duplicating compatible string

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

 




Hi,

We currently have a "brcm,ns-ax-usb3-phy" binding defined for Broadcom's USB
3.0 PHY which you can find in:
Documentation/devicetree/bindings/phy/bcm-ns-usb3-phy.txt


It looks like this:

usb3-phy {
	compatible = "brcm,ns-ax-usb3-phy";
	reg = <0x18003000 0x1000>, <0x18105000 0x1000>;
	reg-names = "ccb-mii", "dmp";
	#phy-cells = <0>;
};

The problem is that PHY is actually attached to the MDIO bus and 0x18003000
+ 0x18003004 registers are used to access whole MDIO, not just this single
PHY.

A correct binding should look like this:

mdio: mdio@18003000 {
	compatible = "brcm,iproc-mdio";
	reg = <0x18003000 0x8>;
	#size-cells = <1>;
	#address-cells = <0>;

	usb3-phy@10 {
		compatible = "brcm,ns-ax-usb3-phy";
		reg = <0x10>;
		usb3-dmp-syscon = <&usb3_dmp>;
		#phy-cells = <0>;
	};
};

usb3_dmp: syscon@18105000 {
        reg = <0x18105000 0x1000>;
};


I mean to clean up this situation. My question is: is this acceptable to
support the same compatible string in two contexts?

1) For backward compatibility the first one would require specifying both:
   ccb-mii / MDIO register and DMP register.

2) For cleaniness the new one would require reg to be PHY index and DMP one
   to be specified with usb3-dmp-syscon.

In Linux there shouldn't be a problem as MDIO children nodes are handled
separately, but I still don't know if it's an acceptable solution.

Can I have some opinions on this, please?
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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