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.m...@microchip.com>
Tested-by: Mihai Sain <mihai.s...@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.

[...]

Reply via email to