linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] arm64: dts: ti: k3-am625: Enable Type-C dual-role
@ 2023-03-30  8:49 Roger Quadros
  2023-03-30  8:49 ` [PATCH v3 1/3] arm64: dts: ti: k3-am625-sk: Add ti,vbus-divider property to usbss1 Roger Quadros
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Roger Quadros @ 2023-03-30  8:49 UTC (permalink / raw)
  To: nm, vigneshr
  Cc: kristo, srk, r-gunasekaran, linux-arm-kernel, linux-usb,
	linux-kernel, devicetree, Roger Quadros

Hi,

This series enables Type-C port on USB0 for both am625-sk and am62-lp-sk.
Series is based on [1]

cheers,
-roger

Changelog:
v3:
- include Type-C support for am62-lp-sk
- split interrupts properties for Type-C chip into am625-sk

v2:
- rebase off [1]
- add fixes tag to patch 1

[1] - https://lore.kernel.org/all/20230321-am62-lp-sk-v2-0-0a56e1694804@ti.com/

cheers,
-roger

Dhruva Gole (1):
  arm64: dts: ti: k3-am625-sk: Add ti,vbus-divider property to usbss1

Roger Quadros (2):
  arm64: dts: ti: k3-am625: Enable Type-C port for USB0
  arm64: dts: ti: k3-am625: Use interrupt line for Type-C chip

 arch/arm64/boot/dts/ti/k3-am625-sk.dts        |  8 ++++-
 .../arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 36 ++++++++++++++++++-
 2 files changed, 42 insertions(+), 2 deletions(-)

-- 
2.34.1


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

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

* [PATCH v3 1/3] arm64: dts: ti: k3-am625-sk: Add ti,vbus-divider property to usbss1
  2023-03-30  8:49 [PATCH v3 0/3] arm64: dts: ti: k3-am625: Enable Type-C dual-role Roger Quadros
@ 2023-03-30  8:49 ` Roger Quadros
  2023-03-30  8:49 ` [PATCH v3 2/3] arm64: dts: ti: k3-am625: Enable Type-C port for USB0 Roger Quadros
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Roger Quadros @ 2023-03-30  8:49 UTC (permalink / raw)
  To: nm, vigneshr
  Cc: kristo, srk, r-gunasekaran, linux-arm-kernel, linux-usb,
	linux-kernel, devicetree, Dhruva Gole, Roger Quadros

From: Dhruva Gole <d-gole@ti.com>

The property "ti,vbus-divider" is needed for both usbss0 and usbss1 as
both USB0 and USB1 have the same external voltage divider circuit.

Fixes: 2d94dfc43885 ("arm64: dts: ti: k3-am625-sk: Add support for USB")
Signed-off-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Roger Quadros <rogerq@kernel.org>
---
 arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
index 54318a07d50c..80e8b9b9a5f5 100644
--- a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
@@ -261,6 +261,7 @@ &usbss0 {
 
 &usbss1 {
 	status = "okay";
+	ti,vbus-divider;
 };
 
 &usb0 {
-- 
2.34.1


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

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

* [PATCH v3 2/3] arm64: dts: ti: k3-am625: Enable Type-C port for USB0
  2023-03-30  8:49 [PATCH v3 0/3] arm64: dts: ti: k3-am625: Enable Type-C dual-role Roger Quadros
  2023-03-30  8:49 ` [PATCH v3 1/3] arm64: dts: ti: k3-am625-sk: Add ti,vbus-divider property to usbss1 Roger Quadros
@ 2023-03-30  8:49 ` Roger Quadros
  2023-03-30  8:49 ` [PATCH v3 3/3] arm64: dts: ti: k3-am625: Use interrupt line for Type-C chip Roger Quadros
  2023-04-05 11:11 ` [PATCH v3 0/3] arm64: dts: ti: k3-am625: Enable Type-C dual-role Roger Quadros
  3 siblings, 0 replies; 5+ messages in thread
From: Roger Quadros @ 2023-03-30  8:49 UTC (permalink / raw)
  To: nm, vigneshr
  Cc: kristo, srk, r-gunasekaran, linux-arm-kernel, linux-usb,
	linux-kernel, devicetree, Roger Quadros

USB0 is a Type-C port with dual data role and power sink.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
---
 arch/arm64/boot/dts/ti/k3-am625-sk.dts        |  2 +-
 .../arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 35 ++++++++++++++++++-
 2 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
index cdc0858dd1b2..467e17e28916 100644
--- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
@@ -150,7 +150,7 @@ exp1: gpio@22 {
 				   "UART1_FET_BUF_EN", "WL_LT_EN",
 				   "GPIO_HDMI_RSTn", "CSI_GPIO1",
 				   "CSI_GPIO2", "PRU_3V3_EN",
-				   "HDMI_INTn", "TEST_GPIO2",
+				   "HDMI_INTn", "PD_I2C_IRQ",
 				   "MCASP1_FET_EN", "MCASP1_BUF_BT_EN",
 				   "MCASP1_FET_SEL", "UART1_FET_SEL",
 				   "TSINT#", "IO_EXP_TEST_LED";
diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
index 80e8b9b9a5f5..db7fa20e8fe2 100644
--- a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi
@@ -198,6 +198,30 @@ &main_i2c0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&main_i2c0_pins_default>;
 	clock-frequency = <400000>;
+
+	typec_pd0: tps6598x@3f {
+		compatible = "ti,tps6598x";
+		reg = <0x3f>;
+
+		connector {
+			compatible = "usb-c-connector";
+			label = "USB-C";
+			self-powered;
+			data-role = "dual";
+			power-role = "sink";
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@0 {
+					reg = <0>;
+					usb_con_hs: endpoint {
+						remote-endpoint = <&usb0_hs_ep>;
+					};
+				};
+			};
+		};
+	};
 };
 
 &main_i2c1 {
@@ -265,7 +289,16 @@ &usbss1 {
 };
 
 &usb0 {
-	dr_mode = "peripheral";
+	#address-cells = <1>;
+	#size-cells = <0>;
+	usb-role-switch;
+
+	port@0 {
+		reg = <0>;
+		usb0_hs_ep: endpoint {
+		    remote-endpoint = <&usb_con_hs>;
+	       };
+	};
 };
 
 &usb1 {
-- 
2.34.1


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

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

* [PATCH v3 3/3] arm64: dts: ti: k3-am625: Use interrupt line for Type-C chip
  2023-03-30  8:49 [PATCH v3 0/3] arm64: dts: ti: k3-am625: Enable Type-C dual-role Roger Quadros
  2023-03-30  8:49 ` [PATCH v3 1/3] arm64: dts: ti: k3-am625-sk: Add ti,vbus-divider property to usbss1 Roger Quadros
  2023-03-30  8:49 ` [PATCH v3 2/3] arm64: dts: ti: k3-am625: Enable Type-C port for USB0 Roger Quadros
@ 2023-03-30  8:49 ` Roger Quadros
  2023-04-05 11:11 ` [PATCH v3 0/3] arm64: dts: ti: k3-am625: Enable Type-C dual-role Roger Quadros
  3 siblings, 0 replies; 5+ messages in thread
From: Roger Quadros @ 2023-03-30  8:49 UTC (permalink / raw)
  To: nm, vigneshr
  Cc: kristo, srk, r-gunasekaran, linux-arm-kernel, linux-usb,
	linux-kernel, devicetree, Roger Quadros

Since revision 1.3 the Type-C chip's interrupt line
is available. This will break Type-C role swap on
older boards, and it will remain in Peripheral mode.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
---
 arch/arm64/boot/dts/ti/k3-am625-sk.dts | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
index 467e17e28916..5d899b56aed6 100644
--- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
@@ -256,3 +256,9 @@ partition@3fc0000 {
 		};
 	};
 };
+
+&typec_pd0 {
+	interrupt-parent = <&exp1>;
+	interrupts = <17 IRQ_TYPE_EDGE_FALLING>;
+	interrupt-names = "irq";
+};
-- 
2.34.1


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

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

* Re: [PATCH v3 0/3] arm64: dts: ti: k3-am625: Enable Type-C dual-role
  2023-03-30  8:49 [PATCH v3 0/3] arm64: dts: ti: k3-am625: Enable Type-C dual-role Roger Quadros
                   ` (2 preceding siblings ...)
  2023-03-30  8:49 ` [PATCH v3 3/3] arm64: dts: ti: k3-am625: Use interrupt line for Type-C chip Roger Quadros
@ 2023-04-05 11:11 ` Roger Quadros
  3 siblings, 0 replies; 5+ messages in thread
From: Roger Quadros @ 2023-04-05 11:11 UTC (permalink / raw)
  To: nm, vigneshr
  Cc: kristo, srk, r-gunasekaran, linux-arm-kernel, linux-usb,
	linux-kernel, devicetree

Hi Nishanth,

On 30/03/2023 11:49, Roger Quadros wrote:
> Hi,
> 
> This series enables Type-C port on USB0 for both am625-sk and am62-lp-sk.
> Series is based on [1]
> 
> cheers,
> -roger
> 
> Changelog:
> v3:
> - include Type-C support for am62-lp-sk
> - split interrupts properties for Type-C chip into am625-sk
> 
> v2:
> - rebase off [1]
> - add fixes tag to patch 1
> 
> [1] - https://lore.kernel.org/all/20230321-am62-lp-sk-v2-0-0a56e1694804@ti.com/
> 
> cheers,
> -roger
> 
> Dhruva Gole (1):
>   arm64: dts: ti: k3-am625-sk: Add ti,vbus-divider property to usbss1

This one was picked from v2 series, so please ignore.

> 
> Roger Quadros (2):
>   arm64: dts: ti: k3-am625: Enable Type-C port for USB0

Could you please queue the above patch? Thanks!

>   arm64: dts: ti: k3-am625: Use interrupt line for Type-C chip

This one is up to you/TI if you want to maintain support of
1.2 Boards or not. Feel free to drop this if Rev1.2 boards
need to be supported.

> 
>  arch/arm64/boot/dts/ti/k3-am625-sk.dts        |  8 ++++-
>  .../arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 36 ++++++++++++++++++-
>  2 files changed, 42 insertions(+), 2 deletions(-)
> 

cheers,
-roger

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

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

end of thread, other threads:[~2023-04-05 11:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-30  8:49 [PATCH v3 0/3] arm64: dts: ti: k3-am625: Enable Type-C dual-role Roger Quadros
2023-03-30  8:49 ` [PATCH v3 1/3] arm64: dts: ti: k3-am625-sk: Add ti,vbus-divider property to usbss1 Roger Quadros
2023-03-30  8:49 ` [PATCH v3 2/3] arm64: dts: ti: k3-am625: Enable Type-C port for USB0 Roger Quadros
2023-03-30  8:49 ` [PATCH v3 3/3] arm64: dts: ti: k3-am625: Use interrupt line for Type-C chip Roger Quadros
2023-04-05 11:11 ` [PATCH v3 0/3] arm64: dts: ti: k3-am625: Enable Type-C dual-role Roger Quadros

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).