Skip to content

Commit dbe21d0

Browse files
swatagarumang-chheda
authored andcommitted
FROMLIST: 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. Primary USB Controller ↓ GL3590 USB Hub (4 ports) | |-- Port 1 → HD3SS3220 Type‑C Port Controller → USB‑C Connector | |-- Port 2 → Mezzanine USB Hub (when mezz attached) | |-- Port 3 → M.2 B‑Key Slot (when mezz attached) | |-- Port 4 → M.2 E‑Key Slot (Default: BT via UART; USB only if NFA765 module is installed) Mark the primary 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, DIP switches are present to select between USB0 and USB1 ports for the primary Type‑C USB controller. By default, the switches are in the OFF state, selecting the USB0 port. Add software support for both HS and SS switches to eliminate the need for manually changing the DIP switch position for USB1 operation. Add a USB1 hub reset pin to reset and activate the hub after boot, ensuring proper detection from its pre‑boot inactive state. Link: https://lore.kernel.org/r/20260430142000.3707614-1-swati.agarwal@oss.qualcomm.com Signed-off-by: Swati Agarwal <swati.agarwal@oss.qualcomm.com>
1 parent f532bc8 commit dbe21d0

1 file changed

Lines changed: 165 additions & 1 deletion

File tree

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

Lines changed: 165 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,37 @@
2323
stdout-path = "serial0:115200n8";
2424
};
2525

26+
connector-1 {
27+
compatible = "usb-c-connector";
28+
label = "USB1-Type-C";
29+
data-role = "host";
30+
power-role = "source";
31+
32+
vbus-supply = <&usb1_vbus>;
33+
34+
ports {
35+
#address-cells = <1>;
36+
#size-cells = <0>;
37+
38+
port@0 {
39+
reg = <0>;
40+
41+
usb1_con_hs_ep: endpoint {
42+
remote-endpoint = <&usb_hub_2_1>;
43+
};
44+
};
45+
46+
port@1 {
47+
reg = <1>;
48+
49+
usb1_con_ss_ep: endpoint {
50+
remote-endpoint = <&hd3ss3220_1_in_ep>;
51+
};
52+
53+
};
54+
};
55+
};
56+
2657
connector-2 {
2758
compatible = "gpio-usb-b-connector", "usb-b-connector";
2859
label = "micro-USB";
@@ -77,6 +108,15 @@
77108
};
78109
};
79110

111+
usb1_vbus: regulator-usb1-vbus {
112+
compatible = "regulator-fixed";
113+
regulator-name = "usb1_vbus";
114+
gpio = <&expander1 3 GPIO_ACTIVE_HIGH>;
115+
regulator-min-microvolt = <5000000>;
116+
regulator-max-microvolt = <5000000>;
117+
enable-active-high;
118+
};
119+
80120
usb2_vbus: regulator-usb2-vbus {
81121
compatible = "regulator-fixed";
82122
regulator-name = "usb2_vbus";
@@ -445,6 +485,39 @@
445485
};
446486
};
447487
};
488+
489+
usb-typec@47 {
490+
compatible = "ti,hd3ss3220";
491+
reg = <0x47>;
492+
493+
interrupts-extended = <&tlmm 45 IRQ_TYPE_EDGE_FALLING>;
494+
495+
id-gpios = <&tlmm 13 GPIO_ACTIVE_HIGH>;
496+
497+
pinctrl-0 = <&usb1_id>, <&usb1_intr>;
498+
pinctrl-names = "default";
499+
500+
ports {
501+
#address-cells = <1>;
502+
#size-cells = <0>;
503+
504+
port@0 {
505+
reg = <0>;
506+
507+
hd3ss3220_1_in_ep: endpoint {
508+
remote-endpoint = <&usb1_con_ss_ep>;
509+
};
510+
};
511+
512+
port@1 {
513+
reg = <1>;
514+
515+
hd3ss3220_1_out_ep: endpoint {
516+
remote-endpoint = <&usb_hub_3_1>;
517+
};
518+
};
519+
};
520+
};
448521
};
449522

450523
&i2c1 {
@@ -556,6 +629,12 @@
556629
interrupts-extended = <&tlmm 3 IRQ_TYPE_LEVEL_LOW>;
557630
pinctrl-0 = <&expander5_int>;
558631
pinctrl-names = "default";
632+
633+
usb1_ss_sel_switch_hog: usb1-ss-sel-switch-hog {
634+
gpio-hog;
635+
gpios = <5 GPIO_ACTIVE_HIGH>;
636+
output-high;
637+
};
559638
};
560639

561640
expander6: gpio@3e {
@@ -742,6 +821,24 @@
742821
bias-pull-up;
743822
};
744823

824+
usb1_hub_reset_hog: usb1-hub-reset-hog {
825+
gpio-hog;
826+
gpios = <7 GPIO_ACTIVE_HIGH>;
827+
output-high;
828+
};
829+
830+
usb1_id: usb1-id-state {
831+
pins = "gpio13";
832+
function = "gpio";
833+
bias-pull-up;
834+
};
835+
836+
usb1_hs_sel_switch_hog: usb1-hs-sel-switch-hog {
837+
gpio-hog;
838+
gpios = <14 GPIO_ACTIVE_HIGH>;
839+
output-high;
840+
};
841+
745842
expander1_int: expander1-int-state {
746843
pins = "gpio16";
747844
function = "gpio";
@@ -784,6 +881,13 @@
784881
bias-pull-up;
785882
};
786883

884+
usb1_intr: usb1-intr-state {
885+
pins = "gpio45";
886+
function = "gpio";
887+
bias-pull-up;
888+
drive-strength = <2>;
889+
};
890+
787891
expander6_int: expander6-int-state {
788892
pins = "gpio52";
789893
function = "gpio";
@@ -863,9 +967,69 @@
863967
};
864968

865969
&usb_1 {
866-
dr_mode = "peripheral";
970+
dr_mode = "host";
971+
972+
#address-cells = <1>;
973+
#size-cells = <0>;
867974

868975
status = "okay";
976+
977+
usb_hub_2_x: hub@1 {
978+
compatible = "usb5e3,610";
979+
reg = <1>;
980+
981+
peer-hub = <&usb_hub_3_x>;
982+
983+
ports {
984+
#address-cells = <1>;
985+
#size-cells = <0>;
986+
987+
port@1 {
988+
reg = <1>;
989+
990+
usb_hub_2_1: endpoint {
991+
remote-endpoint = <&usb1_con_hs_ep>;
992+
};
993+
};
994+
995+
/*
996+
* Port-4 is connected to M.2 E key connector on corekit.
997+
*/
998+
port@4 {
999+
reg = <4>;
1000+
1001+
usb_hub_2_4: endpoint {
1002+
};
1003+
};
1004+
};
1005+
};
1006+
1007+
usb_hub_3_x: hub@2 {
1008+
compatible = "usb5e3,625";
1009+
reg = <2>;
1010+
1011+
peer-hub = <&usb_hub_2_x>;
1012+
1013+
ports {
1014+
#address-cells = <1>;
1015+
#size-cells = <0>;
1016+
1017+
port@1 {
1018+
reg = <1>;
1019+
1020+
usb_hub_3_1: endpoint {
1021+
remote-endpoint = <&hd3ss3220_1_out_ep>;
1022+
};
1023+
};
1024+
1025+
port@4 {
1026+
reg = <4>;
1027+
1028+
usb_hub_3_4: endpoint {
1029+
};
1030+
};
1031+
};
1032+
};
8691033
};
8701034

8711035
&usb_1_hsphy {

0 commit comments

Comments
 (0)