[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250908162052.355341-3-richard.genoud@bootlin.com>
Date: Mon, 8 Sep 2025 18:20:52 +0200
From: Richard Genoud <richard.genoud@...tlin.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Thinh Nguyen <Thinh.Nguyen@...opsys.com>
Cc: Aswath Govindraju <a-govindraju@...com>,
linux-usb@...r.kernel.org,
devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Richard Genoud <richard.genoud@...tlin.com>
Subject: [PATCH 2/2] usb: dwc3-am62: support ti,lane-reverse property
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@...tlin.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)
Powered by blists - more mailing lists