arm64: dts: ti: k3-am625-sk: Enable Type-C dual-role
Subsystems (3)
v2 cover arm64: dts: ti: k3-am625-sk: Enable Type-C dual-role
Hi,
This series enables Type-C port on USB0.
Series is based on [1]
Although k3-am625-lp-sk USB is exactly the same as on k3-am625-sk, it is missing the IRQ line from Type-C chip which is currently required as per chip's DT binding. So we don't add Type-C support for k3-am625-lp-sk till h/w is fixed or polling mode support for Type-C chip is accepted [2]
Changelog:
v2:
- rebase off [1]
- add fixes tag to patch 1
[1] - https://lore.kernel.org/all/[email protected]/
[2] - https://lore.kernel.org/lkml/[email protected]/T/
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-am62-lp-sk.dts | 4 ++ arch/arm64/boot/dts/ti/k3-am625-sk.dts | 44 ++++++++++++++++++- .../arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 5 +-- 3 files changed, 48 insertions(+), 5 deletions(-)
Signature · 1 line
2.34.1
PATCH v2 1/2 arm64: dts: ti: k3-am625-sk: Add ti,vbus-divider property to usbss1
From: Dhruva Gole <[email protected]>
The property "ti,vbus-divider" is needed for both usbss0 and usbss1 as both USB0 and USB1 have the same external voltage divider circuit.
--- arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi +1 -0
@@ -261,6 +261,7 @@ &usbss0 { &usbss1 { status = "okay"; + ti,vbus-divider; }; &usb0 {
Signature · 1 line
2.34.1
PATCH v2 2/2 arm64: dts: ti: k3-am625-sk: Enable Type-C port for USB0
In reply to Roger QuadrosUSB0 is a Type-C port with dual data role and power sink.
--- arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts | 4 ++ arch/arm64/boot/dts/ti/k3-am625-sk.dts | 44 ++++++++++++++++++- .../arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 4 -- 3 files changed, 47 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts +4 -0
@@ -225,3 +225,7 @@ ldo4_reg: ldo4 { }; }; }; + +&usb0 { + dr_mode = "peripheral"; +};
arch/arm64/boot/dts/ti/k3-am625-sk.dts +43 -1
59 lines not on this page · raw message
arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi +0 -4
@@ -264,10 +264,6 @@ &usbss1 { ti,vbus-divider; }; -&usb0 { - dr_mode = "peripheral"; -}; - &usb1 { dr_mode = "host"; pinctrl-names = "default";
Signature · 1 line
2.34.1
Nishanth Menon
maintainerRe: [PATCH v2 2/2] arm64: dts: ti: k3-am625-sk: Enable Type-C port for USB0
Quoted 92 lines · Roger Quadros
USB0 is a Type-C port with dual data role and power sink.
Signed-off-by Roger Quadros <[email protected]>--- arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts | 4 ++ arch/arm64/boot/dts/ti/k3-am625-sk.dts | 44 ++++++++++++++++++- .../arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 4 -- 3 files changed, 47 insertions(+), 5 deletions(-)arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts +4
-0@@ -225,3 +225,7 @@ ldo4_reg: ldo4 { }; }; }; + +&usb0 { + dr_mode = "peripheral"; +};arch/arm64/boot/dts/ti/k3-am625-sk.dts +43
-1@@ -136,6 +136,35 @@ AM62X_IOPAD(0x01d4, PIN_INPUT, 7) /* (B15) UART0_RTSn.GPIO1_23 */ }; }; +&main_i2c0 { + typec_pd: 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 { exp1: gpio@22 { compatible = "ti,tca6424";@@ -150,7 +179,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";@@ -256,3 +285,16 @@ partition@3fc0000 { }; }; }; + +&usb0 { + #address-cells = <1>; + #size-cells = <0>; + usb-role-switch; + + port@0 { + reg = <0>; + usb0_hs_ep: endpoint { + remote-endpoint = <&usb_con_hs>; + }; + }; +};arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi +0
-0
arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi &usbss1 { · line 270
Quoted 7 lines
arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi +0
-4@@ -264,10 +264,6 @@ &usbss1 { ti,vbus-divider; }; -&usb0 { - dr_mode = "peripheral"; -}; -
How about sk-lp ?
Quoted 6 lines
arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi +0
-0&usb1 { dr_mode = "host"; pinctrl-names = "default";Signature · 1 line
2.34.1
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
Re: [PATCH v2 2/2] arm64: dts: ti: k3-am625-sk: Enable Type-C port for USB0
Quoted 96 lines · Nishanth Menon
Quoted 95 lines · Roger Quadros
USB0 is a Type-C port with dual data role and power sink.
Signed-off-by Roger Quadros <[email protected]>--- arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts | 4 ++ arch/arm64/boot/dts/ti/k3-am625-sk.dts | 44 ++++++++++++++++++- .../arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 4 -- 3 files changed, 47 insertions(+), 5 deletions(-)arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts +4
-0@@ -225,3 +225,7 @@ ldo4_reg: ldo4 { }; }; }; + +&usb0 { + dr_mode = "peripheral"; +};arch/arm64/boot/dts/ti/k3-am625-sk.dts +43
-1@@ -136,6 +136,35 @@ AM62X_IOPAD(0x01d4, PIN_INPUT, 7) /* (B15) UART0_RTSn.GPIO1_23 */ }; }; +&main_i2c0 { + typec_pd: 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 { exp1: gpio@22 { compatible = "ti,tca6424";@@ -150,7 +179,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";@@ -256,3 +285,16 @@ partition@3fc0000 { }; }; }; + +&usb0 { + #address-cells = <1>; + #size-cells = <0>; + usb-role-switch; + + port@0 { + reg = <0>; + usb0_hs_ep: endpoint { + remote-endpoint = <&usb_con_hs>; + }; + }; +};arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi +0
-0@@ -264,10 +264,6 @@ &usbss1 { ti,vbus-divider; };
Quoted 6 lines
arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi &usbss1 { · line 270
Quoted 4 lines
arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi +0
-4-&usb0 { - dr_mode = "peripheral"; -}; -How about sk-lp ?
moved it to sk-lp. see above in this patch.
Quoted 8 lines
Quoted 7 lines
arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi +0
-0&usb1 { dr_mode = "host"; pinctrl-names = "default";Signature · 1 line
2.34.1
cheers,
-roger
Nishanth Menon
maintainerRe: [PATCH v2 2/2] arm64: dts: ti: k3-am625-sk: Enable Type-C port for USB0
Quoted 99 lines · Roger Quadros
Quoted 96 lines · Nishanth Menon
Quoted 95 lines · Roger Quadros
USB0 is a Type-C port with dual data role and power sink.
Signed-off-by Roger Quadros <[email protected]>--- arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts | 4 ++ arch/arm64/boot/dts/ti/k3-am625-sk.dts | 44 ++++++++++++++++++- .../arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 4 -- 3 files changed, 47 insertions(+), 5 deletions(-)arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts +4
-0@@ -225,3 +225,7 @@ ldo4_reg: ldo4 { }; }; }; + +&usb0 { + dr_mode = "peripheral"; +};arch/arm64/boot/dts/ti/k3-am625-sk.dts +43
-1@@ -136,6 +136,35 @@ AM62X_IOPAD(0x01d4, PIN_INPUT, 7) /* (B15) UART0_RTSn.GPIO1_23 */ }; }; +&main_i2c0 { + typec_pd: 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 { exp1: gpio@22 { compatible = "ti,tca6424";@@ -150,7 +179,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";@@ -256,3 +285,16 @@ partition@3fc0000 { }; }; }; + +&usb0 { + #address-cells = <1>; + #size-cells = <0>; + usb-role-switch; + + port@0 { + reg = <0>; + usb0_hs_ep: endpoint { + remote-endpoint = <&usb_con_hs>; + }; + }; +};arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi +0
-0@@ -264,10 +264,6 @@ &usbss1 { ti,vbus-divider; };
Quoted 9 lines
Quoted 6 lines
arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi &usbss1 { · line 270
Quoted 4 lines
arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi +0
-4-&usb0 { - dr_mode = "peripheral"; -}; -How about sk-lp ?
moved it to sk-lp. see above in this patch.
A bit confused. Looking at [1] vs [2], it seems to indicate pd controller at 0x3f as well? Am I misreading the schematics?
[1] https://www.ti.com/tool/SK-AM62-LP#design-files
[2] https://www.ti.com/tool/SK-AM62#design-files
Signature · 8 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH v2 2/2] arm64: dts: ti: k3-am625-sk: Enable Type-C port for USB0
Quoted 107 lines · Nishanth Menon
Quoted 106 lines · Roger Quadros
Quoted 102 lines · Nishanth Menon
Quoted 92 lines · Roger Quadros
USB0 is a Type-C port with dual data role and power sink.
Signed-off-by Roger Quadros <[email protected]>--- arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts | 4 ++ arch/arm64/boot/dts/ti/k3-am625-sk.dts | 44 ++++++++++++++++++- .../arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 4 -- 3 files changed, 47 insertions(+), 5 deletions(-)arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts +4
-0@@ -225,3 +225,7 @@ ldo4_reg: ldo4 { }; }; }; + +&usb0 { + dr_mode = "peripheral"; +};arch/arm64/boot/dts/ti/k3-am625-sk.dts +43
-1@@ -136,6 +136,35 @@ AM62X_IOPAD(0x01d4, PIN_INPUT, 7) /* (B15) UART0_RTSn.GPIO1_23 */ }; }; +&main_i2c0 { + typec_pd: 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 { exp1: gpio@22 { compatible = "ti,tca6424";@@ -150,7 +179,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";@@ -256,3 +285,16 @@ partition@3fc0000 { }; }; }; + +&usb0 { + #address-cells = <1>; + #size-cells = <0>; + usb-role-switch; + + port@0 { + reg = <0>; + usb0_hs_ep: endpoint { + remote-endpoint = <&usb_con_hs>; + }; + }; +};arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi +0
-0arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi &usbss1 { · line 270
Quoted 7 lines
arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi +0
-4@@ -264,10 +264,6 @@ &usbss1 { ti,vbus-divider; }; -&usb0 { - dr_mode = "peripheral"; -}; -How about sk-lp ?
Quoted 8 lines
Quoted 2 lines
moved it to sk-lp. see above in this patch.
A bit confused. Looking at [1] vs [2], it seems to indicate pd controller at
0x3fas well? Am I misreading the schematics?[1] https://www.ti.com/tool/SK-AM62-LP#design-files
[2] https://www.ti.com/tool/SK-AM62#design-files
Yes PD controller is at 0x3f for both boards but IRQ is not routed on AM62-LP. I tried to explain this the cover letter. ;)
Pasting here for convenience.
Quoted 7 lines
Although k3-am625-lp-sk USB is exactly the same as on k3-am625-sk, it is missing the IRQ line from Type-C chip which is currently required as per chip's DT binding. So we don't add Type-C support for k3-am625-lp-sk till h/w is fixed or polling mode support for Type-C chip is accepted [2]
cheers,
-roger
Nishanth Menon
maintainerRe: [PATCH v2 2/2] arm64: dts: ti: k3-am625-sk: Enable Type-C port for USB0
On 22:46-20230328, Roger Quadros wrote:
[...]
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
How about sk-lp ?
moved it to sk-lp. see above in this patch.
A bit confused. Looking at [1] vs [2], it seems to indicate pd controller at
0x3fas well? Am I misreading the schematics?
Quoted 15 lines
Quoted 2 lines
[1] https://www.ti.com/tool/SK-AM62-LP#design-files
[2] https://www.ti.com/tool/SK-AM62#design-filesYes PD controller is at
0x3ffor both boards but IRQ is not routed on AM62-LP. I tried to explain this the cover letter. ;)Pasting here for convenience.
Quoted 7 lines
Although k3-am625-lp-sk USB is exactly the same as on k3-am625-sk, it is missing the IRQ line from Type-C chip which is currently required as per chip's DT binding. So we don't add Type-C support for k3-am625-lp-sk till h/w is fixed or polling mode support for Type-C chip is accepted [2]
Thanks, This thread does seem to be progressing? Since LP-SK is already in production, it might do good to hold on to this series a little longer instead of shuttling dts nodes back and forth.
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
Re: [PATCH v2 2/2] arm64: dts: ti: k3-am625-sk: Enable Type-C port for USB0
Quoted 24 lines · Nishanth Menon
On 22:46-20230328, Roger Quadros wrote:
[...]Quoted 22 lines
Quoted 10 lines
Quoted 4 lines
Quoted 1 line
How about sk-lp ?
moved it to sk-lp. see above in this patch.
A bit confused. Looking at [1] vs [2], it seems to indicate pd controller at
0x3fas well? Am I misreading the schematics?[1] https://www.ti.com/tool/SK-AM62-LP#design-files
[2] https://www.ti.com/tool/SK-AM62#design-filesYes PD controller is at
0x3ffor both boards but IRQ is not routed on AM62-LP. I tried to explain this the cover letter. ;)Pasting here for convenience.
Quoted 6 lines
Although k3-am625-lp-sk USB is exactly the same as on k3-am625-sk, it is missing the IRQ line from Type-C chip which is currently required as per chip's DT binding. So we don't add Type-C support for k3-am625-lp-sk till h/w is fixed or polling mode support for Type-C chip is accepted [2]
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Thanks, This thread does seem to be progressing? Since LP-SK is already in production, it might do good to hold on to this series a little longer instead of shuttling dts nodes back and forth.
I agree. This will need a re-spin.
cheers,
-roger
Nishanth Menon
maintainerRe: (subset) [PATCH v2 0/2] arm64: dts: ti: k3-am625-sk: Enable Type-C dual-role
In reply to Roger QuadrosHi Roger Quadros,
Quoted 10 lines · Roger Quadros
This series enables Type-C port on USB0.
Series is based on [1]Although k3-am625-lp-sk USB is exactly the same as on k3-am625-sk, it is missing the IRQ line from Type-C chip which is currently required as per chip's DT binding. So we don't add Type-C support for k3-am625-lp-sk till h/w is fixed or polling mode support for Type-C chip is accepted [2]
[...]
I have applied the following to branch ti-k3-dts-next on [1]. I picked v1 version with v2 updates in commit message to help stable, while at it, I had to rewrite history a bit so that cherry-pick to stable won't be a problem.
Thank you!
[1/2] arm64: dts: ti: k3-am625-sk: Add ti,vbus-divider property to usbss1
commit: 49af4ecdd8ad2a964dbb9f2e7e50082433b37f98
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent up the chain during the next merge window (or sooner if it is a relevant bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
[1] git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D