
El Mon, Dec 05, 2022 at 08:08:40PM +0100, Marek Vasut deia:
On 12/5/22 19:54, Xavier Drudis Ferran wrote:
5- Trying to replicate linux and have usb2phy somehow provide a clk, or have a separate clock device for usb2phy in addition to the phy device. I just can't seem to imagine how to achieve this with the U-Boot driver model, maybe because of my limited familiarity with it.
Yes please
Have a look at the end of drivers/led/led_gpio.c and how gpio_led_wrap binds a gpio_led driver to each LED. You can bind an UCLASS_PHY and UCLASS_CLK driver to the u2phy0 the same way, the u2phy0 would behave the same way as gpio_led_wrap wrapper . You would likely be using device_bind_driver() instead of device_bind_driver_to_node() in the bind callback.
Ok, I will take a look and send a v3 if I understand it.
Thank you.