* [PATCH] usb: host: ehci-atmel: Add HSIC mode support
@ 2025-01-10 6:41 Alexander Shiyan
2025-01-10 8:29 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Shiyan @ 2025-01-10 6:41 UTC (permalink / raw)
To: barebox; +Cc: Alexander Shiyan
This adds support for USB HSIC-mode for the controllers found on the SAMA5D2 SOCs.
Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
---
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] usb: host: ehci-atmel: Add HSIC mode support
2025-01-10 6:41 [PATCH] usb: host: ehci-atmel: Add HSIC mode support Alexander Shiyan
@ 2025-01-10 8:29 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2025-01-10 8:29 UTC (permalink / raw)
To: barebox, Alexander Shiyan
On Fri, 10 Jan 2025 09:41:50 +0300, Alexander Shiyan wrote:
> This adds support for USB HSIC-mode for the controllers found on the SAMA5D2 SOCs.
>
>
Applied, thanks!
[1/1] usb: host: ehci-atmel: Add HSIC mode support
https://git.pengutronix.de/cgit/barebox/commit/?id=bd0e5986c72d (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-10 8:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-10 6:41 [PATCH] usb: host: ehci-atmel: Add HSIC mode support Alexander Shiyan
2025-01-10 8:29 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox