On 10/22/26 12:52 PM, Krzysztof Kozlowski wrote:
On 22/10/2026 09:08, Mehmet Fide wrote:
- phy_addr = ofnode_get_addr(phy_node);
-       for (i = 0; i < ARRAY_SIZE(phy_bases); i++) {
-               if (phy_addr == phy_bases[i])
-                       break;
-       }
-       if (i == ARRAY_SIZE(phy_bases))
+       ret = ofnode_get_alias_seq(phy.node, "usbphy", &seq);

Just for the record, this looks like undocumented ABI which would not be
accepted in Linux kernel, so you won't be able to use OF_UPSTREAM.
This does indeed interact with the enumeration of USB controllers in U-Boot, which itself is a legacy crutch to prevent the command line ABI breakage. It seems to resolve PHY node using the /aliases { usbphy = &... } which is already in Linux ./arch/arm/boot/dts/nxp/vf/vfxxx.dtsi :

 27                 usbphy0 = &usbphy0;
 28                 usbphy1 = &usbphy1;

Mehmet, would it be possible to parse fsl,usbphy = <&usbphy0>; DT property to arrive at the PHY node instead ?

441                         usbdev0: usb@40034000 {
442 compatible = "fsl,vf610-usb", "fsl,imx27-usb";
443                                 reg = <0x40034000 0x800>;
444                                 interrupts = <75 IRQ_TYPE_LEVEL_HIGH>;
445                                 clocks = <&clks VF610_CLK_USBC0>;
446 fsl,usbphy = <&usbphy0>; <----------- HERE
447                                 fsl,usbmisc = <&usbmisc0 0>;
448                                 dr_mode = "peripheral";
449                                 status = "disabled";
450                         };

I think you might still need the portnr sequence number, or could you get rid of that too ? (I would be fine with a follow up series too) ?

Reply via email to