lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221216143624.23708-4-sjoerd@collabora.com>
Date:   Fri, 16 Dec 2022 15:36:23 +0100
From:   Sjoerd Simons <sjoerd@...labora.com>
To:     Nishanth Menon <nm@...com>
Cc:     martyn.welch@...labora.com, Nitin Yadav <n-yadav@...com>,
        Aswath Govindraju <a-govindraju@...com>,
        Vignesh Raghavendra <vigneshr@...com>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Tero Kristo <kristo@...nel.org>, devicetree@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH 3/3] arm64: dts: ti: k3-am625-sk: Add support for USB

From: Aswath Govindraju <a-govindraju@...com>

AM62 SoC has two instances of USB and they are brought on to the board
in the following way,

-> USB0 instance
 - This is brought out to a USB TypeC connector on board through TPS6598 PD
   controller. The PD controller should decide the role based on CC pin in
   the connector. Unfortunately the irq line for the TPS isn't hooked up
   which is a mode not yet support by the driver (some patches were
   submitted earlier this year[0]). So for now the PD controller is left
   out and periphal mode chosen.

-> USB1 instance
 - This is brought out to a USB TypeA connector on board.

Therefore, add the required device tree support for the above in the board
dts file.

0: https://lore.kernel.org/lkml/f714ee55-ef47-317d-81b9-57020dda064b@ti.com/T/

Signed-off-by: Aswath Govindraju <a-govindraju@...com>
Signed-off-by: Vignesh Raghavendra <vigneshr@...com>
[merge from vendor bsp, drop TPS6598 support, reword commit message]
Signed-off-by: Sjoerd Simons <sjoerd@...labora.com>

---

 arch/arm64/boot/dts/ti/k3-am625-sk.dts | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
index 93a5f0817efc..c165fa0a4109 100644
--- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
@@ -24,6 +24,8 @@ aliases {
 		spi0 = &ospi0;
 		ethernet0 = &cpsw_port1;
 		ethernet1 = &cpsw_port2;
+		usb0 = &usb0;
+		usb1 = &usb1;
 	};
 
 	chosen {
@@ -275,6 +277,12 @@ main_gpio1_ioexp_intr_pins_default: main-gpio1-ioexp-intr-pins-default {
 			AM62X_IOPAD(0x01d4, PIN_INPUT, 7) /* (B15) UART0_RTSn.GPIO1_23 */
 		>;
 	};
+
+	main_usb1_pins_default: main-usb1-pins-default {
+		pinctrl-single,pins = <
+			AM62X_IOPAD(0x0258, PIN_OUTPUT, 0) /* (F18) USB1_DRVVBUS */
+		>;
+	};
 };
 
 &wkup_uart0 {
@@ -514,3 +522,17 @@ &epwm1 {
 &epwm2 {
 	status = "disabled";
 };
+
+&usbss0 {
+	ti,vbus-divider;
+};
+
+&usb0 {
+	dr_mode = "peripheral";
+};
+
+&usb1 {
+	dr_mode = "host";
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_usb1_pins_default>;
+};
-- 
2.39.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ