mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: imx8mn-var-som-symphony: fix USB OTG
@ 2023-07-04 15:02 Hugo Villeneuve
  2023-07-04 15:08 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 25+ messages in thread
From: Hugo Villeneuve @ 2023-07-04 15:02 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team
  Cc: hugo, Hugo Villeneuve, Krzysztof Kozlowski, devicetree,
	linux-arm-kernel, linux-kernel

From: Hugo Villeneuve <hvilleneuve@dimonoff.com>

USB OTG is currently broken on the Variscite Symphony EVK and imx8mn
nano SOM.

Import changes from linux-5.15 branch of varigit repos to fix it.

Link: https://github.com/varigit/linux-imx.git
Fixes: 7358e05bddca ("arm64: dts: imx8mn-var-som-symphony: Add Variscite Symphony board with VAR-SOM-MX8MN")
Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
---
 .../dts/freescale/imx8mn-var-som-symphony.dts | 37 ++++++++++++++++++-
 1 file changed, 35 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mn-var-som-symphony.dts b/arch/arm64/boot/dts/freescale/imx8mn-var-som-symphony.dts
index 406a711486da..aef89198f24c 100644
--- a/arch/arm64/boot/dts/freescale/imx8mn-var-som-symphony.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mn-var-som-symphony.dts
@@ -6,6 +6,7 @@
 
 /dts-v1/;
 
+#include <dt-bindings/usb/pd.h>
 #include "imx8mn-var-som.dtsi"
 
 / {
@@ -104,10 +105,29 @@ extcon_usbotg1: typec@3d {
 		compatible = "nxp,ptn5150";
 		reg = <0x3d>;
 		interrupt-parent = <&gpio1>;
-		interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
+		interrupts = <11 IRQ_TYPE_NONE>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_ptn5150>;
 		status = "okay";
+
+		port {
+			typec1_dr_sw: endpoint {
+				remote-endpoint = <&usb1_drd_sw>;
+			};
+		};
+
+		typec1_con: connector {
+			compatible = "usb-c-connector";
+			label = "USB-C";
+			power-role = "dual";
+			data-role = "dual";
+			try-power-role = "sink";
+			source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
+			sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
+				     PDO_VAR(5000, 20000, 3000)>;
+			op-sink-microwatt = <15000000>;
+			self-powered;
+		};
 	};
 };
 
@@ -148,8 +168,21 @@ &uart3 {
 };
 
 &usbotg1 {
+	dr_mode = "otg";
+	hnp-disable;
+	srp-disable;
+	adp-disable;
+	usb-role-switch;
 	disable-over-current;
-	extcon = <&extcon_usbotg1>, <&extcon_usbotg1>;
+	samsung,picophy-pre-emp-curr-control = <3>;
+	samsung,picophy-dc-vol-level-adjust = <7>;
+	status = "okay";
+
+	port {
+		usb1_drd_sw: endpoint {
+			remote-endpoint = <&typec1_dr_sw>;
+		};
+	};
 };
 
 &iomuxc {
-- 
2.30.2


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2023-07-05 15:57 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-04 15:02 [PATCH] arm64: dts: imx8mn-var-som-symphony: fix USB OTG Hugo Villeneuve
2023-07-04 15:08 ` Krzysztof Kozlowski
2023-07-04 15:31   ` Hugo Villeneuve
2023-07-04 16:20     ` Krzysztof Kozlowski
2023-07-04 16:33       ` Fabio Estevam
2023-07-04 16:55         ` Hugo Villeneuve
2023-07-04 17:02           ` Hugo Villeneuve
2023-07-04 18:04             ` Fabio Estevam
2023-07-04 20:41               ` Hugo Villeneuve
2023-07-04 21:02                 ` Fabio Estevam
2023-07-04 21:28                   ` Hugo Villeneuve
2023-07-04 21:50                     ` Fabio Estevam
2023-07-04 23:00                       ` Fabio Estevam
2023-07-05 13:35                         ` Hugo Villeneuve
2023-07-05 13:42                           ` Nate Drude
2023-07-05 13:49                             ` Fabio Estevam
2023-07-05 14:25                               ` Hugo Villeneuve
2023-07-05 14:31                                 ` Nate Drude
2023-07-05 14:48                                   ` Hugo Villeneuve
2023-07-05 15:22                                     ` Fabio Estevam
2023-07-05 15:34                                       ` Hugo Villeneuve
2023-07-05 15:44                                         ` Krzysztof Kozlowski
2023-07-05 15:51                                           ` Hugo Villeneuve
2023-07-05 15:54                                             ` Krzysztof Kozlowski
2023-07-05 15:57                                               ` Hugo Villeneuve

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®