From: Alexander Shiyan <eagle.alexander923@gmail.com>
To: barebox@lists.infradead.org
Cc: Alexander Shiyan <eagle.alexander923@gmail.com>
Subject: [PATCH] usb: host: ehci-atmel: Add HSIC mode support
Date: Fri, 10 Jan 2025 09:41:50 +0300 [thread overview]
Message-ID: <20250110064150.18408-1-eagle.alexander923@gmail.com> (raw)
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
next reply other threads:[~2025-01-10 6:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-10 6:41 Alexander Shiyan [this message]
2025-01-10 8:29 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250110064150.18408-1-eagle.alexander923@gmail.com \
--to=eagle.alexander923@gmail.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox