[PATCH v2 3/3] usb: ohci-at91: Add USB PHY functionality

Marek Vasut marex at denx.de
Tue Jan 3 16:35:07 CET 2023


On 1/3/23 15:30, Sergiu Moga wrote:
> Add the ability to enable/disable whatever USB PHY's are
> passed to the AT91 OHCI driver through DT.
> 
> Signed-off-by: Sergiu Moga <sergiu.moga at microchip.com>
> Tested-by: Mihai Sain <mihai.sain at microchip.com>
> ---
> 
> 
> v1 -> v2:
> - use *_bulk API's
> 
> 
>   drivers/usb/host/ohci-at91.c | 35 +++++++++++++++++++++++++++++++++++
>   1 file changed, 35 insertions(+)
> 
> diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
> index 9de67df335..fece921d39 100644
> --- a/drivers/usb/host/ohci-at91.c
> +++ b/drivers/usb/host/ohci-at91.c
> @@ -74,6 +74,10 @@ int usb_cpu_init_fail(void)
>   #include <usb.h>
>   #include "ohci.h"
>   
> +#if CONFIG_IS_ENABLED(PHY_MICROCHIP_SAMA7_USB)
> +#include <generic-phy.h>
> +#endif
> +
>   #define AT91_MAX_USBH_PORTS        3
>   
>   #define at91_for_each_port(index, ports)					\
> @@ -90,15 +94,35 @@ struct at91_usbh_data {
>   struct ohci_at91_priv {
>   	ohci_t ohci;
>   	struct clk_bulk clks;
> +
> +#if CONFIG_IS_ENABLED(PHY_MICROCHIP_SAMA7_USB)
> +	struct phy_bulk phys;
> +#endif
>   };
>   
>   static int at91_start_clock(struct ohci_at91_priv *ohci_at91)
>   {
> +#if CONFIG_IS_ENABLED(PHY_MICROCHIP_SAMA7_USB)

if (CONFIG_IS_ENABLED(...)) please.

[...]


More information about the U-Boot mailing list