Skip to content

Commit 5c03e4e

Browse files
Kriskura176767swatagar
authored andcommitted
UPSTREAM: arm64: dts: qcom: lemans-evk: Add OTG support for primary USB controller
Enable OTG support for primary USB controller on EVK Platform. Add HD3SS3220 Type-C port controller present between Type-C port and SoC that provides role switch notifications to controller. Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com> Link: https://lore.kernel.org/r/20251128102507.3206169-1-krishna.kurapati@oss.qualcomm.com
1 parent dc3b070 commit 5c03e4e

2 files changed

Lines changed: 126 additions & 2 deletions

File tree

arch/arm64/boot/dts/qcom/lemans-evk.dts

Lines changed: 106 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,35 @@
3939
stdout-path = "serial0:115200n8";
4040
};
4141

42+
connector-0 {
43+
compatible = "usb-c-connector";
44+
label = "USB0-Type-C";
45+
data-role = "dual";
46+
power-role = "dual";
47+
48+
vbus-supply = <&vbus_supply_regulator_0>;
49+
50+
ports {
51+
#address-cells = <1>;
52+
#size-cells = <0>;
53+
54+
port@0 {
55+
reg = <0>;
56+
57+
usb0_con_hs_ep: endpoint {
58+
remote-endpoint = <&usb_0_dwc3_hs>;
59+
};
60+
};
61+
port@1 {
62+
reg = <1>;
63+
64+
usb0_con_ss_ep: endpoint {
65+
remote-endpoint = <&hd3ss3220_in_ep>;
66+
};
67+
};
68+
};
69+
};
70+
4271
edp0-connector {
4372
compatible = "dp-connector";
4473
label = "EDP0";
@@ -103,6 +132,15 @@
103132
};
104133
};
105134

135+
vbus_supply_regulator_0: regulator-vbus-supply-0 {
136+
compatible = "regulator-fixed";
137+
regulator-name = "vbus_supply_0";
138+
gpio = <&expander1 2 GPIO_ACTIVE_HIGH>;
139+
regulator-min-microvolt = <5000000>;
140+
regulator-max-microvolt = <5000000>;
141+
enable-active-high;
142+
};
143+
106144
vmmc_sdc: regulator-vmmc-sdc {
107145
compatible = "regulator-fixed";
108146

@@ -486,6 +524,43 @@
486524
firmware-name = "qcom/sa8775p/a663_zap.mbn";
487525
};
488526

527+
&i2c11 {
528+
status = "okay";
529+
530+
usb-typec@67 {
531+
compatible = "ti,hd3ss3220";
532+
reg = <0x67>;
533+
534+
interrupts-extended = <&pmm8654au_2_gpios 5 IRQ_TYPE_EDGE_FALLING>;
535+
536+
id-gpios = <&tlmm 50 GPIO_ACTIVE_HIGH>;
537+
538+
pinctrl-0 = <&usb_id>, <&usb0_intr_state>;
539+
pinctrl-names = "default";
540+
541+
ports {
542+
#address-cells = <1>;
543+
#size-cells = <0>;
544+
545+
port@0 {
546+
reg = <0>;
547+
548+
hd3ss3220_in_ep: endpoint {
549+
remote-endpoint = <&usb0_con_ss_ep>;
550+
};
551+
};
552+
553+
port@1 {
554+
reg = <1>;
555+
556+
hd3ss3220_out_ep: endpoint {
557+
remote-endpoint = <&usb_0_dwc3_ss>;
558+
};
559+
};
560+
};
561+
};
562+
};
563+
489564
&i2c18 {
490565
status = "okay";
491566

@@ -641,6 +716,16 @@
641716
};
642717
};
643718

719+
&pmm8654au_2_gpios {
720+
usb0_intr_state: usb0-intr-state {
721+
pins = "gpio5";
722+
function = "normal";
723+
input-enable;
724+
bias-pull-up;
725+
power-source = <0>;
726+
};
727+
};
728+
644729
&qup_i2c19_default {
645730
drive-strength = <2>;
646731
bias-pull-up;
@@ -791,11 +876,24 @@
791876
};
792877
};
793878

879+
qup_i2c11_default: qup-i2c11-state {
880+
pins = "gpio48", "gpio49";
881+
function = "qup1_se4";
882+
drive-strength = <2>;
883+
bias-pull-up;
884+
};
885+
794886
sd_cd: sd-cd-state {
795887
pins = "gpio36";
796888
function = "gpio";
797889
bias-pull-up;
798890
};
891+
892+
usb_id: usb-id-state {
893+
pins = "gpio50";
894+
function = "gpio";
895+
bias-pull-up;
896+
};
799897
};
800898

801899
&uart10 {
@@ -842,11 +940,17 @@
842940
};
843941

844942
&usb_0 {
845-
dr_mode = "peripheral";
846-
847943
status = "okay";
848944
};
849945

946+
&usb_0_dwc3_hs {
947+
remote-endpoint = <&usb0_con_hs_ep>;
948+
};
949+
950+
&usb_0_dwc3_ss {
951+
remote-endpoint = <&hd3ss3220_out_ep>;
952+
};
953+
850954
&usb_0_hsphy {
851955
vdda-pll-supply = <&vreg_l7a>;
852956
vdda18-supply = <&vreg_l6c>;

arch/arm64/boot/dts/qcom/lemans.dtsi

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4003,7 +4003,27 @@
40034003
snps,dis-u1-entry-quirk;
40044004
snps,dis-u2-entry-quirk;
40054005

4006+
usb-role-switch;
40064007
status = "disabled";
4008+
4009+
ports {
4010+
#address-cells = <1>;
4011+
#size-cells = <0>;
4012+
4013+
port@0 {
4014+
reg = <0>;
4015+
4016+
usb_0_dwc3_hs: endpoint {
4017+
};
4018+
};
4019+
4020+
port@1 {
4021+
reg = <1>;
4022+
4023+
usb_0_dwc3_ss: endpoint {
4024+
};
4025+
};
4026+
};
40074027
};
40084028

40094029
usb_1_hsphy: phy@88e6000 {

0 commit comments

Comments
 (0)