Skip to content

Commit 09dd2f6

Browse files
committed
USB: host: ehci-atmel: Add support for HSIC phy
Add support for USB Host High Speed Port HSIC phy. Signed-off-by: Cristian Birsan <cristian.birsan@microchip.com>
1 parent fb72c56 commit 09dd2f6

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

drivers/usb/host/ehci-atmel.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,18 @@
1818
#include <linux/platform_device.h>
1919
#include <linux/usb.h>
2020
#include <linux/usb/hcd.h>
21+
#include <linux/usb/phy.h>
22+
#include <linux/usb/of.h>
2123

2224
#include "ehci.h"
2325

2426
#define DRIVER_DESC "EHCI Atmel driver"
2527

2628
static const char hcd_name[] = "ehci-atmel";
2729

30+
#define EHCI_INSNREG(index) ((index) * 4 + 0x90)
31+
#define EHCI_INSNREG08_HSIC_EN BIT(2)
32+
2833
/* interface and function clocks */
2934
#define hcd_to_atmel_ehci_priv(h) \
3035
((struct atmel_ehci_priv *)hcd_to_ehci(h)->priv)
@@ -154,6 +159,9 @@ static int ehci_atmel_drv_probe(struct platform_device *pdev)
154159
goto fail_add_hcd;
155160
device_wakeup_enable(hcd->self.controller);
156161

162+
if (of_usb_get_phy_mode(pdev->dev.of_node) == USBPHY_INTERFACE_MODE_HSIC)
163+
writel(EHCI_INSNREG08_HSIC_EN, hcd->regs + EHCI_INSNREG(8));
164+
157165
return retval;
158166

159167
fail_add_hcd:

0 commit comments

Comments
 (0)