From: Richard Genoud <richard.genoud@bootlin.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Cc: Aswath Govindraju <a-govindraju@ti.com>,
linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Richard Genoud <richard.genoud@bootlin.com>
Subject: [PATCH 2/2] usb: dwc3-am62: support ti,lane-reverse property
Date: Mon, 8 Sep 2025 18:20:52 +0200 [thread overview]
Message-ID: <20250908162052.355341-3-richard.genoud@bootlin.com> (raw)
In-Reply-To: <20250908162052.355341-1-richard.genoud@bootlin.com>
Support the ti,lane-reverse property by setting the
USBSS_PHY_LANE_REVERSE bit.
This way, D+ line become D- and vice and versa.
Tested on am625 SoC.
Signed-off-by: Richard Genoud <richard.genoud@bootlin.com>
---
drivers/usb/dwc3/dwc3-am62.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/usb/dwc3/dwc3-am62.c b/drivers/usb/dwc3/dwc3-am62.c
index 9db8f3ca493d..9437d2246ee9 100644
--- a/drivers/usb/dwc3/dwc3-am62.c
+++ b/drivers/usb/dwc3/dwc3-am62.c
@@ -119,6 +119,7 @@ struct dwc3_am62 {
struct regmap *syscon;
unsigned int offset;
unsigned int vbus_divider;
+ unsigned int lane_reverse;
u32 wakeup_stat;
void __iomem *phy_regs;
};
@@ -203,6 +204,9 @@ static int dwc3_ti_init(struct dwc3_am62 *am62)
if (am62->vbus_divider)
reg |= 1 << USBSS_PHY_VBUS_SEL_SHIFT;
+ if (am62->lane_reverse)
+ reg |= USBSS_PHY_LANE_REVERSE;
+
dwc3_ti_writel(am62, USBSS_PHY_CONFIG, reg);
clk_prepare_enable(am62->usb2_refclk);
@@ -264,6 +268,7 @@ static int dwc3_ti_probe(struct platform_device *pdev)
}
am62->vbus_divider = device_property_read_bool(dev, "ti,vbus-divider");
+ am62->lane_reverse = device_property_read_bool(dev, "ti,lane-reverse");
ret = dwc3_ti_init(am62);
if (ret)
prev parent reply other threads:[~2025-09-08 16:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-08 16:20 [PATCH 0/2] ti,am62-usb: introduce ti,lane-reverse property Richard Genoud
2025-09-08 16:20 ` [PATCH 1/2] dt-bindings: usb/ti,am62-usb.yaml: Add " Richard Genoud
2025-09-09 7:32 ` Krzysztof Kozlowski
2025-09-09 9:11 ` Richard GENOUD
2025-09-14 14:55 ` Krzysztof Kozlowski
2025-09-18 15:41 ` Richard GENOUD
2025-09-19 4:31 ` Krzysztof Kozlowski
2025-09-08 16:20 ` Richard Genoud [this message]
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=20250908162052.355341-3-richard.genoud@bootlin.com \
--to=richard.genoud@bootlin.com \
--cc=Thinh.Nguyen@synopsys.com \
--cc=a-govindraju@ti.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=robh@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
/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