Skip to content

Commit c2a954b

Browse files
Loic Poulainkas User
authored andcommitted
BACKPORT: arm64: dts: qcom: monaco-evk: Enable primary USB controller in host mode
Enable primary USB controller in host mode on monaco EVK Platform. Primary USB controller is connected to a Genesys Logic USB HUB GL3590 having 4 ports. The ports of hub that are present on lemans EVK standalone board are used as follows:- 1) port-1 is connected to HD3SS3220 Type-C port controller. 2) port-4 is used for the M.2 E key on corekit. Standard core kit uses UART for Bluetooth. This port is to be used only if user optionally replaces the WiFi card with the NFA765 chip which uses USB for Bluetooth. Remaining 2 ports will become functional when the interface plus mezzanine board is stacked on top of corekit: 3) port-2 is connected to another hub which is present on the mezz through which 4 type-A ports are connected. 4) port-3 is used for the M.2 B key for a 5G card when the mezz is connected. Mark the second USB controller as host only capable and add the HD3SS3220 Type-C port controller along with Type-c connector for controlling vbus supply. In hardware, there are dip switches provided to operate between USB port 0 and port 1 for primary Type-C USB controller. By default, switches will be off operating at USB0 port. After bootup to HLOS, it will be operated in USB1 port. Added support in the software for both HS and SS switches as usb1-hs-high-gpio14 and usb1-ss-high-gpio5. Also, added bootup-high-gpio7 pin for USB1 hub reset to get detected after bootup. Link: https://lore.kernel.org/all/20260210152548.769951-1-loic.poulain@oss.qualcomm.com/ Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Signed-off-by: Swati Agarwal <swati.agarwal@oss.qualcomm.com>
1 parent 1178681 commit c2a954b

1 file changed

Lines changed: 201 additions & 2 deletions

File tree

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

Lines changed: 201 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,45 @@
2828
stdout-path = "serial0:115200n8";
2929
};
3030

31+
connector-1 {
32+
compatible = "usb-c-connector";
33+
label = "USB1-Type-C";
34+
data-role = "host";
35+
power-role = "source";
36+
37+
vbus-supply = <&vbus_supply_regulator_1>;
38+
39+
ports {
40+
#address-cells = <1>;
41+
#size-cells = <0>;
42+
43+
port@0 {
44+
reg = <0>;
45+
46+
usb1_con_ss_ep: endpoint {
47+
remote-endpoint = <&hd3ss3220_1_in_ep>;
48+
};
49+
};
50+
51+
port@1 {
52+
reg = <1>;
53+
54+
usb1_hs_in: endpoint {
55+
remote-endpoint = <&usb_hub_2_1>;
56+
};
57+
58+
};
59+
60+
port@2 {
61+
reg = <2>;
62+
63+
usb1_ss_in: endpoint {
64+
remote-endpoint = <&usb_hub_3_1>;
65+
};
66+
};
67+
};
68+
};
69+
3170
connector-2 {
3271
compatible = "gpio-usb-b-connector", "usb-b-connector";
3372
label = "micro-USB";
@@ -122,7 +161,16 @@
122161
};
123162
};
124163

125-
vbus_supply_regulator_2: vbus-supply-regulator-2 {
164+
vbus_supply_regulator_1: regulator-vbus-supply-1 {
165+
compatible = "regulator-fixed";
166+
regulator-name = "vbus_supply_1";
167+
gpio = <&expander1 3 GPIO_ACTIVE_HIGH>;
168+
regulator-min-microvolt = <5000000>;
169+
regulator-max-microvolt = <5000000>;
170+
enable-active-high;
171+
};
172+
173+
vbus_supply_regulator_2: regulator-vbus-supply-2 {
126174
compatible = "regulator-fixed";
127175
regulator-name = "vbus_supply_2";
128176
gpio = <&pmm8650au_1_gpios 7 GPIO_ACTIVE_HIGH>;
@@ -428,6 +476,38 @@
428476
};
429477
};
430478
};
479+
480+
usb-typec@47 {
481+
compatible = "ti,hd3ss3220";
482+
reg = <0x47>;
483+
484+
interrupts = <45 IRQ_TYPE_EDGE_FALLING>;
485+
486+
id-gpios = <&tlmm 13 GPIO_ACTIVE_HIGH>;
487+
488+
pinctrl-0 = <&usb1_id>;
489+
pinctrl-names = "default";
490+
491+
ports {
492+
#address-cells = <1>;
493+
#size-cells = <0>;
494+
495+
port@0 {
496+
reg = <0>;
497+
498+
hd3ss3220_1_in_ep: endpoint {
499+
remote-endpoint = <&usb1_con_ss_ep>;
500+
};
501+
};
502+
503+
port@1 {
504+
reg = <1>;
505+
506+
hd3ss3220_1_out_ep: endpoint {
507+
};
508+
};
509+
};
510+
};
431511
};
432512

433513
&i2c1 {
@@ -539,6 +619,13 @@
539619
interrupts-extended = <&tlmm 3 IRQ_TYPE_LEVEL_LOW>;
540620
pinctrl-0 = <&expander5_int>;
541621
pinctrl-names = "default";
622+
623+
gpio5-hog {
624+
gpio-hog;
625+
gpios = <5 GPIO_ACTIVE_HIGH>;
626+
output-high;
627+
line-name = "usb1-ss-high-gpio5";
628+
};
542629
};
543630

544631
expander6: gpio@3e {
@@ -551,6 +638,7 @@
551638
interrupts-extended = <&tlmm 52 IRQ_TYPE_LEVEL_LOW>;
552639
pinctrl-0 = <&expander6_int>;
553640
pinctrl-names = "default";
641+
wakeup-source;
554642
};
555643
};
556644

@@ -748,6 +836,20 @@
748836
bias-pull-up;
749837
};
750838

839+
gpio7_hog: gpio7-hog {
840+
gpio-hog;
841+
gpios = <7 GPIO_ACTIVE_HIGH>;
842+
output-high;
843+
line-name = "bootup-high-gpio7";
844+
};
845+
846+
gpio14_hog: gpio14-hog {
847+
gpio-hog;
848+
gpios = <14 GPIO_ACTIVE_HIGH>;
849+
output-high;
850+
line-name = "usb1-hs-high-gpio14";
851+
};
852+
751853
pcie0_default_state: pcie0-default-state {
752854
wake-pins {
753855
pins = "gpio0";
@@ -807,6 +909,12 @@
807909
drive-strength = <2>;
808910
bias-pull-up;
809911
};
912+
913+
usb1_id: usb1-id-state {
914+
pins = "gpio13";
915+
function = "gpio";
916+
bias-pull-up;
917+
};
810918
};
811919

812920
&uart2 {
@@ -849,9 +957,100 @@
849957
};
850958

851959
&usb_1 {
852-
dr_mode = "peripheral";
960+
dr_mode = "host";
961+
962+
#address-cells = <1>;
963+
#size-cells = <0>;
853964

854965
status = "okay";
966+
967+
usb_hub_2_x: hub@1 {
968+
compatible = "usb5e3,610";
969+
reg = <1>;
970+
971+
peer-hub = <&usb_hub_3_x>;
972+
973+
ports {
974+
#address-cells = <1>;
975+
#size-cells = <0>;
976+
977+
port@1 {
978+
reg = <1>;
979+
980+
usb_hub_2_1: endpoint {
981+
remote-endpoint = <&usb1_hs_in>;
982+
};
983+
};
984+
985+
/*
986+
* Port-2 and port-3 are not connected to anything on corekit.
987+
*/
988+
port@2 {
989+
reg = <2>;
990+
991+
usb_hub_2_2: endpoint {
992+
};
993+
};
994+
995+
port@3 {
996+
reg = <3>;
997+
998+
usb_hub_2_3: endpoint {
999+
};
1000+
};
1001+
1002+
/*
1003+
* Port-4 is connected to M.2 E key connector on corekit.
1004+
*/
1005+
port@4 {
1006+
reg = <4>;
1007+
1008+
usb_hub_2_4: endpoint {
1009+
};
1010+
};
1011+
};
1012+
};
1013+
1014+
usb_hub_3_x: hub@2 {
1015+
compatible = "usb5e3,625";
1016+
reg = <2>;
1017+
1018+
peer-hub = <&usb_hub_2_x>;
1019+
1020+
ports {
1021+
#address-cells = <1>;
1022+
#size-cells = <0>;
1023+
1024+
port@1 {
1025+
reg = <1>;
1026+
1027+
usb_hub_3_1: endpoint {
1028+
remote-endpoint = <&usb1_ss_in>;
1029+
};
1030+
};
1031+
1032+
port@2 {
1033+
reg = <2>;
1034+
1035+
usb_hub_3_2: endpoint {
1036+
};
1037+
};
1038+
1039+
port@3 {
1040+
reg = <3>;
1041+
1042+
usb_hub_3_3: endpoint {
1043+
};
1044+
};
1045+
1046+
port@4 {
1047+
reg = <4>;
1048+
1049+
usb_hub_3_4: endpoint {
1050+
};
1051+
};
1052+
};
1053+
};
8551054
};
8561055

8571056
&usb_1_hsphy {

0 commit comments

Comments
 (0)