[PATCH v2 0/2] AM64: Add USB support

STALE1967d

Revision v2 of 3 in this series.

5 messages, 3 authors, 2021-03-16 · open the first message on its own page

[PATCH v2 0/2] AM64: Add USB support

From: Aswath Govindraju <hidden>
Date: 2021-03-10 11:30:05

The following series of patches, add USB support for AM642 evm.

USB test logs,
https://pastebin.ubuntu.com/p/Qrbb7SGv8N/

Changes since v1:
- Rebased the patches on top of ti-k3-dts-next
- Added test logs

Aswath Govindraju (2):
  arm64: dts: ti: k3-am64-main: Add DT node for USB subsystem
  arm64: dts: ti: k3-am642-evm: Add USB support

 arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 30 ++++++++++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am642-evm.dts  | 18 ++++++++++++++
 2 files changed, 48 insertions(+)

-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

[PATCH v2 1/2] arm64: dts: ti: k3-am64-main: Add DT node for USB subsystem

From: Aswath Govindraju <hidden>
Date: 2021-03-10 11:30:05

Add DT node for the single USB subsystem in main dtsi file.

Signed-off-by: Aswath Govindraju <redacted>
Acked-by: Roger Quadros <redacted>
---
 arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 30 ++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
diff --git a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
index 0cf727e3d1e2..5979eb163dd1 100644
--- a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi
@@ -491,4 +491,34 @@
 		ti,cpts-periodic-outputs = <6>;
 		ti,cpts-ext-ts-inputs = <8>;
 	};
+
+	usbss0: cdns-usb@f900000{
+		compatible = "ti,am64-usb", "ti,j721e-usb";
+		reg = <0x00 0xf900000 0x00 0x100>;
+		power-domains = <&k3_pds 161 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 161 9>, <&k3_clks 161 1>;
+		clock-names = "ref", "lpm";
+		assigned-clocks = <&k3_clks 161 9>; /* USB2_REFCLK */
+		assigned-clock-parents = <&k3_clks 161 10>; /* HF0SC0 */
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+		usb0: usb@f400000{
+			compatible = "cdns,usb3";
+			reg = <0x00 0xf400000 0x00 0x10000>,
+			      <0x00 0xf410000 0x00 0x10000>,
+			      <0x00 0xf420000 0x00 0x10000>;
+			reg-names = "otg",
+				    "xhci",
+				    "dev";
+			interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>, /* irq.0 */
+				     <GIC_SPI 194 IRQ_TYPE_LEVEL_HIGH>, /* irq.6 */
+				     <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>; /* otgirq */
+			interrupt-names = "host",
+					  "peripheral",
+					  "otg";
+			maximum-speed = "super-speed";
+			dr_mode = "otg";
+		};
+	};
 };
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

[PATCH v2 2/2] arm64: dts: ti: k3-am642-evm: Add USB support

From: Aswath Govindraju <hidden>
Date: 2021-03-10 11:30:05

AM64 EVM board has a micro USB 2.0 AB connector and the USB0_VBUS is
connected with a resistor divider in between. USB0_DRVVBUS pin is muxed
between USB0_DRVVBUS and GPIO1_79 signals.

Add the corresponding properties and set the pinmux mode for USB subsystem
in the evm dts file.

Signed-off-by: Aswath Govindraju <redacted>
Acked-by: Roger Quadros <redacted>
---
 arch/arm64/boot/dts/ti/k3-am642-evm.dts | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
diff --git a/arch/arm64/boot/dts/ti/k3-am642-evm.dts b/arch/arm64/boot/dts/ti/k3-am642-evm.dts
index 962ef807e286..45fdcf3220a8 100644
--- a/arch/arm64/boot/dts/ti/k3-am642-evm.dts
+++ b/arch/arm64/boot/dts/ti/k3-am642-evm.dts
@@ -201,6 +201,12 @@
 			AM64X_IOPAD(0x0144, PIN_OUTPUT, 4) /* (Y11) PRG1_PRU1_GPO15.RGMII2_TX_CTL */
 		>;
 	};
+
+	main_usb0_pins_default: main-usb0-pins-default {
+		pinctrl-single,pins = <
+			AM64X_IOPAD(0x02a8, PIN_OUTPUT, 0) /* (E19) USB0_DRVVBUS */
+		>;
+	};
 };
 
 &main_uart0 {
@@ -313,6 +319,18 @@
 	disable-wp;
 };
 
+&usbss0 {
+	ti,vbus-divider;
+	ti,usb2-only;
+};
+
+&usb0 {
+	dr_mode = "otg";
+	maximum-speed = "high-speed";
+	pinctrl-names = "default";
+	pinctrl-0 = <&main_usb0_pins_default>;
+};
+
 &cpsw3g {
 	pinctrl-names = "default";
 	pinctrl-0 = <&mdio1_pins_default
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Re: [PATCH v2 0/2] AM64: Add USB support

From: Kishon Vijay Abraham I <hidden>
Date: 2021-03-15 05:55:25


On 10/03/21 4:57 pm, Aswath Govindraju wrote:
The following series of patches, add USB support for AM642 evm.

USB test logs,
https://pastebin.ubuntu.com/p/Qrbb7SGv8N/

Changes since v1:
- Rebased the patches on top of ti-k3-dts-next
- Added test logs
Would prefer simple data transfer tests in the log but other than that
for the patches itself

Reviewed-by: Kishon Vijay Abraham I <redacted>
Aswath Govindraju (2):
  arm64: dts: ti: k3-am64-main: Add DT node for USB subsystem
  arm64: dts: ti: k3-am642-evm: Add USB support

 arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 30 ++++++++++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am642-evm.dts  | 18 ++++++++++++++
 2 files changed, 48 insertions(+)
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Re: [PATCH v2 0/2] AM64: Add USB support

From: Nishanth Menon <nm@ti.com>
Date: 2021-03-16 12:22:42

On 16:57-20210310, Aswath Govindraju wrote:
The following series of patches, add USB support for AM642 evm.

USB test logs,
https://pastebin.ubuntu.com/p/Qrbb7SGv8N/

Changes since v1:
- Rebased the patches on top of ti-k3-dts-next
- Added test logs

Aswath Govindraju (2):
  arm64: dts: ti: k3-am64-main: Add DT node for USB subsystem
  arm64: dts: ti: k3-am642-evm: Add USB support

 arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 30 ++++++++++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am642-evm.dts  | 18 ++++++++++++++
 2 files changed, 48 insertions(+)

-- 
2.17.1
	I see:
	/workdir/arch/arm64/boot/dts/ti/k3-am642-evm.dt.yaml: cdns-usb@f900000: compatible: 'oneOf' conditional failed, one must be fixed:

I assume there is a reason for this? Can you capture that in the commit
message?

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D)/Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help