mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sjoerd Simons <sjoerd@collabora.com>
To: Nishanth Menon <nm@ti.com>
Cc: martyn.welch@collabora.com, Nitin Yadav <n-yadav@ti.com>,
	Aswath Govindraju <a-govindraju@ti.com>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Rob Herring <robh+dt@kernel.org>, Tero Kristo <kristo@kernel.org>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] arm64: dts: ti: k3-am625-sk: Add support for USB
Date: Fri, 16 Dec 2022 15:36:23 +0100	[thread overview]
Message-ID: <20221216143624.23708-4-sjoerd@collabora.com> (raw)
In-Reply-To: <20221216143624.23708-1-sjoerd@collabora.com>

From: Aswath Govindraju <a-govindraju@ti.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@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
[merge from vendor bsp, drop TPS6598 support, reword commit message]
Signed-off-by: Sjoerd Simons <sjoerd@collabora.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


  parent reply	other threads:[~2022-12-16 14:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-16 14:36 [PATCH 0/3] Improve K3-am625-sk support (USB, MMC) Sjoerd Simons
2022-12-16 14:36 ` [PATCH 1/3] arm64: dts: ti: k3-am62-main: Update OTAP and ITAP delay select Sjoerd Simons
2022-12-20 11:19   ` Vignesh Raghavendra
2022-12-20 13:07     ` Sjoerd Simons
2022-12-21 14:50       ` Raghavendra, Vignesh
2022-12-16 14:36 ` [PATCH 2/3] arm64: dts: ti: k3-am62-main: Add support for USB Sjoerd Simons
2022-12-16 14:36 ` Sjoerd Simons [this message]
2022-12-19 13:09 ` [PATCH 0/3] Improve K3-am625-sk support (USB, MMC) Martyn Welch
2022-12-20 11:32 ` Vignesh Raghavendra
2022-12-20 12:41   ` Sjoerd Simons
2022-12-21 14:49     ` Raghavendra, Vignesh

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=20221216143624.23708-4-sjoerd@collabora.com \
    --to=sjoerd@collabora.com \
    --cc=a-govindraju@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kristo@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martyn.welch@collabora.com \
    --cc=n-yadav@ti.com \
    --cc=nm@ti.com \
    --cc=robh+dt@kernel.org \
    --cc=vigneshr@ti.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

all inboxes | Powered by JetHome®