[PATCH] usb: host: ehci-atmel: Add HSIC mode support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This adds support for USB HSIC-mode for the controllers found on the SAMA5D2 SOCs.

Signed-off-by: Alexander Shiyan <eagle.alexander923@xxxxxxxxx>
---
 drivers/usb/host/ehci-atmel.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c
index f176babfa7..4f1f5e5cde 100644
--- a/drivers/usb/host/ehci-atmel.c
+++ b/drivers/usb/host/ehci-atmel.c
@@ -11,11 +11,15 @@
 #include <linux/usb/usb.h>
 #include <linux/usb/usb_defs.h>
 #include <linux/usb/ehci.h>
+#include <linux/usb/phy.h>
 #include <errno.h>
 #include <io.h>
 
 #include "ehci.h"
 
+#define EHCI_INSNREG(index)			((index) * 4 + 0x90)
+#define EHCI_INSNREG08_HSIC_EN			BIT(2)
+
 struct atmel_ehci_priv {
 	struct ehci_host *ehci;
 	struct device *dev;
@@ -94,6 +98,9 @@ static int atmel_ehci_probe(struct device *dev)
 
 	atehci->ehci = ehci;
 
+	if (of_usb_get_phy_mode(dev->of_node, NULL) == USBPHY_INTERFACE_MODE_HSIC)
+		writel(EHCI_INSNREG08_HSIC_EN, data.hccr + EHCI_INSNREG(8));
+
 	return 0;
 }
 
-- 
2.39.1





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux