From: Lucas Stach <l.stach@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 2/2] usb: imx: get power pin polarity from DT
Date: Mon, 23 Nov 2020 16:29:31 +0100 [thread overview]
Message-ID: <20201123152931.4480-2-l.stach@pengutronix.de> (raw)
In-Reply-To: <20201123152931.4480-1-l.stach@pengutronix.de>
There is a documented DT property to set the power pin polarity,
parse it.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
drivers/usb/imx/chipidea-imx.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/imx/chipidea-imx.c b/drivers/usb/imx/chipidea-imx.c
index b1a77a163798..b144f41437a9 100644
--- a/drivers/usb/imx/chipidea-imx.c
+++ b/drivers/usb/imx/chipidea-imx.c
@@ -168,6 +168,9 @@ static int imx_chipidea_probe_dt(struct imx_chipidea *ci)
"over-current-active-high", NULL))
ci->flags |= MXC_EHCI_OC_PIN_ACTIVE_LOW;
+ if (of_find_property(ci->dev->device_node, "power-active-high", NULL))
+ ci->flags |= MXC_EHCI_PWR_PIN_ACTIVE_HIGH;
+
if (of_usb_get_maximum_speed(ci->dev->device_node, NULL) ==
USB_SPEED_FULL)
ci->flags |= MXC_EHCI_PFSC;
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2020-11-23 15:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-23 15:29 [PATCH 1/2] usb: imx: add support for setting power pin polarity on i.MX6/7 Lucas Stach
2020-11-23 15:29 ` Lucas Stach [this message]
2020-11-24 8:36 ` 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=20201123152931.4480-2-l.stach@pengutronix.de \
--to=l.stach@pengutronix.de \
--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