devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] arm64: dts: ti: k3-am625-sk: Enable Type-C dual-role
@ 2023-03-24 13:31 Roger Quadros
  2023-03-24 13:31 ` [PATCH 1/2] arm64: dts: ti: k3-am625-sk: Add ti,vbus-divider property to usbss1 Roger Quadros
  2023-03-24 13:31 ` [PATCH 2/2] arm64: dts: ti: k3-am625-sk: Enable Type-C port for USB0 Roger Quadros
  0 siblings, 2 replies; 7+ messages in thread
From: Roger Quadros @ 2023-03-24 13:31 UTC (permalink / raw)
  To: nm, vigneshr
  Cc: kristo, srk, r-gunasekaran, linux-usb, linux-kernel, devicetree,
	Roger Quadros

Hi,

This series enables Type-C port on USB0.

cheers,
-roger

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

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

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

-- 
2.34.1


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

* [PATCH 1/2] arm64: dts: ti: k3-am625-sk: Add ti,vbus-divider property to usbss1
  2023-03-24 13:31 [PATCH 0/2] arm64: dts: ti: k3-am625-sk: Enable Type-C dual-role Roger Quadros
@ 2023-03-24 13:31 ` Roger Quadros
  2023-03-24 18:14   ` Nishanth Menon
  2023-03-24 13:31 ` [PATCH 2/2] arm64: dts: ti: k3-am625-sk: Enable Type-C port for USB0 Roger Quadros
  1 sibling, 1 reply; 7+ messages in thread
From: Roger Quadros @ 2023-03-24 13:31 UTC (permalink / raw)
  To: nm, vigneshr
  Cc: kristo, srk, r-gunasekaran, 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.

Signed-off-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Roger Quadros <rogerq@kernel.org>
---
 arch/arm64/boot/dts/ti/k3-am625-sk.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
index 67dc26fc23e4..be027fad5f61 100644
--- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
@@ -482,6 +482,7 @@ &usbss0 {
 
 &usbss1 {
 	status = "okay";
+	ti,vbus-divider;
 };
 
 &usb0 {
-- 
2.34.1


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

* [PATCH 2/2] arm64: dts: ti: k3-am625-sk: Enable Type-C port for USB0
  2023-03-24 13:31 [PATCH 0/2] arm64: dts: ti: k3-am625-sk: Enable Type-C dual-role Roger Quadros
  2023-03-24 13:31 ` [PATCH 1/2] arm64: dts: ti: k3-am625-sk: Add ti,vbus-divider property to usbss1 Roger Quadros
@ 2023-03-24 13:31 ` Roger Quadros
  2023-03-24 18:15   ` Nishanth Menon
  1 sibling, 1 reply; 7+ messages in thread
From: Roger Quadros @ 2023-03-24 13:31 UTC (permalink / raw)
  To: nm, vigneshr
  Cc: kristo, srk, r-gunasekaran, 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 | 40 ++++++++++++++++++++++++--
 1 file changed, 38 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 be027fad5f61..c80b12943881 100644
--- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
@@ -315,6 +315,33 @@ &main_i2c0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&main_i2c0_pins_default>;
 	clock-frequency = <400000>;
+
+	tps6598x@3f {
+		compatible = "ti,tps6598x";
+		reg = <0x3f>;
+		interrupt-parent = <&exp1>;
+		interrupts = <17 IRQ_TYPE_EDGE_FALLING>;
+		interrupt-names = "irq";
+
+		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 {
@@ -336,7 +363,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";
@@ -486,7 +513,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


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

* Re: [PATCH 1/2] arm64: dts: ti: k3-am625-sk: Add ti,vbus-divider property to usbss1
  2023-03-24 13:31 ` [PATCH 1/2] arm64: dts: ti: k3-am625-sk: Add ti,vbus-divider property to usbss1 Roger Quadros
@ 2023-03-24 18:14   ` Nishanth Menon
  2023-03-25 13:03     ` Roger Quadros
  0 siblings, 1 reply; 7+ messages in thread
From: Nishanth Menon @ 2023-03-24 18:14 UTC (permalink / raw)
  To: Roger Quadros
  Cc: vigneshr, kristo, srk, r-gunasekaran, linux-usb, linux-kernel,
	devicetree, Dhruva Gole

On 15:31-20230324, Roger Quadros wrote:
> 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.
> 
> Signed-off-by: Dhruva Gole <d-gole@ti.com>
> Signed-off-by: Roger Quadros <rogerq@kernel.org>
> ---
>  arch/arm64/boot/dts/ti/k3-am625-sk.dts | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
> index 67dc26fc23e4..be027fad5f61 100644
> --- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts
> +++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
> @@ -482,6 +482,7 @@ &usbss0 {
>  
>  &usbss1 {
>  	status = "okay";
> +	ti,vbus-divider;
>  };
>  

1. Does'nt this need a fixes tag?
2. lakml is missing in CC

>  &usb0 {
> -- 
> 2.34.1
> 

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

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

* Re: [PATCH 2/2] arm64: dts: ti: k3-am625-sk: Enable Type-C port for USB0
  2023-03-24 13:31 ` [PATCH 2/2] arm64: dts: ti: k3-am625-sk: Enable Type-C port for USB0 Roger Quadros
@ 2023-03-24 18:15   ` Nishanth Menon
  2023-03-25 13:03     ` Roger Quadros
  0 siblings, 1 reply; 7+ messages in thread
From: Nishanth Menon @ 2023-03-24 18:15 UTC (permalink / raw)
  To: Roger Quadros
  Cc: vigneshr, kristo, srk, r-gunasekaran, linux-usb, linux-kernel,
	devicetree

On 15:31-20230324, Roger Quadros wrote:
> 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 | 40 ++++++++++++++++++++++++--
>  1 file changed, 38 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 be027fad5f61..c80b12943881 100644
> --- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts
> +++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
> @@ -315,6 +315,33 @@ &main_i2c0 {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&main_i2c0_pins_default>;
>  	clock-frequency = <400000>;
> +
> +	tps6598x@3f {
> +		compatible = "ti,tps6598x";
> +		reg = <0x3f>;
> +		interrupt-parent = <&exp1>;
> +		interrupts = <17 IRQ_TYPE_EDGE_FALLING>;
> +		interrupt-names = "irq";
> +
> +		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 {
> @@ -336,7 +363,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";
> @@ -486,7 +513,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
> 

Please see thread: 
https://lore.kernel.org/all/20230321-am62-lp-sk-v2-0-0a56e1694804@ti.com/
you might need to rebase off that.

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

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

* Re: [PATCH 1/2] arm64: dts: ti: k3-am625-sk: Add ti,vbus-divider property to usbss1
  2023-03-24 18:14   ` Nishanth Menon
@ 2023-03-25 13:03     ` Roger Quadros
  0 siblings, 0 replies; 7+ messages in thread
From: Roger Quadros @ 2023-03-25 13:03 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: vigneshr, kristo, srk, r-gunasekaran, linux-usb, linux-kernel,
	devicetree, Dhruva Gole



On 24/03/2023 20:14, Nishanth Menon wrote:
> On 15:31-20230324, Roger Quadros wrote:
>> 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.
>>
>> Signed-off-by: Dhruva Gole <d-gole@ti.com>
>> Signed-off-by: Roger Quadros <rogerq@kernel.org>
>> ---
>>  arch/arm64/boot/dts/ti/k3-am625-sk.dts | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
>> index 67dc26fc23e4..be027fad5f61 100644
>> --- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts
>> +++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
>> @@ -482,6 +482,7 @@ &usbss0 {
>>  
>>  &usbss1 {
>>  	status = "okay";
>> +	ti,vbus-divider;
>>  };
>>  
> 
> 1. Does'nt this need a fixes tag?
> 2. lakml is missing in CC

Will fix both issues.

> 
>>  &usb0 {
>> -- 
>> 2.34.1
>>
> 

cheers,
-roger

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

* Re: [PATCH 2/2] arm64: dts: ti: k3-am625-sk: Enable Type-C port for USB0
  2023-03-24 18:15   ` Nishanth Menon
@ 2023-03-25 13:03     ` Roger Quadros
  0 siblings, 0 replies; 7+ messages in thread
From: Roger Quadros @ 2023-03-25 13:03 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: vigneshr, kristo, srk, r-gunasekaran, linux-usb, linux-kernel,
	devicetree



On 24/03/2023 20:15, Nishanth Menon wrote:
> On 15:31-20230324, Roger Quadros wrote:
>> 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 | 40 ++++++++++++++++++++++++--
>>  1 file changed, 38 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 be027fad5f61..c80b12943881 100644
>> --- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts
>> +++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
>> @@ -315,6 +315,33 @@ &main_i2c0 {
>>  	pinctrl-names = "default";
>>  	pinctrl-0 = <&main_i2c0_pins_default>;
>>  	clock-frequency = <400000>;
>> +
>> +	tps6598x@3f {
>> +		compatible = "ti,tps6598x";
>> +		reg = <0x3f>;
>> +		interrupt-parent = <&exp1>;
>> +		interrupts = <17 IRQ_TYPE_EDGE_FALLING>;
>> +		interrupt-names = "irq";
>> +
>> +		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 {
>> @@ -336,7 +363,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";
>> @@ -486,7 +513,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
>>
> 
> Please see thread: 
> https://lore.kernel.org/all/20230321-am62-lp-sk-v2-0-0a56e1694804@ti.com/
> you might need to rebase off that.
> 

OK.

cheers,
-roger

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

end of thread, other threads:[~2023-03-25 13:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-24 13:31 [PATCH 0/2] arm64: dts: ti: k3-am625-sk: Enable Type-C dual-role Roger Quadros
2023-03-24 13:31 ` [PATCH 1/2] arm64: dts: ti: k3-am625-sk: Add ti,vbus-divider property to usbss1 Roger Quadros
2023-03-24 18:14   ` Nishanth Menon
2023-03-25 13:03     ` Roger Quadros
2023-03-24 13:31 ` [PATCH 2/2] arm64: dts: ti: k3-am625-sk: Enable Type-C port for USB0 Roger Quadros
2023-03-24 18:15   ` Nishanth Menon
2023-03-25 13:03     ` 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).