Skip to content

Commit 8b43911

Browse files
committed
FROMLIST: arm64: dts: qcom: qcs6490-rb3gen2: Enable USB2 controller Micro-USB OTG
Enable the secondary USB controller (USB2) and its High-Speed PHY to support OTG functionality via a Micro-USB connector. Define a dedicated 'usb2-connector' node using the 'gpio-usb-b-connector' compatible to handle ID and VBUS detection. Link this connector to the DWC3 controller via OF graph ports to satisfy schema requirements and enable role switching. Specific hardware configuration: - ID pin: TLMM 61 - VBUS detection: PM7325 GPIO 9 - VBUS supply: Fixed regulator controlled by TLMM 63 - Configure &usb_2 in OTG mode with role switching enabled. - Define a gpio-usb-b-connector node for Micro-USB support, mapping the ID pin to TLMM 61 and VBUS detection to PM7325 GPIO 9. - Add the 'vdd_micro_usb_vbus' fixed regulator (controlled by TLMM 63) to supply VBUS to the connector. - Add the 'usb2_id_detect' pinctrl state to configure GPIO 61 for ID detection. - Enable &usb_2_hsphy and populate necessary voltage supplies (VDDA PLL, VDDA 1.8V, VDDA 3.3V). Link: https://lore.kernel.org/all/c3on5e56hqipudpt7uyam2cples3rhadpz324zeg7nebczsglt@bxuy5jzrxjc7/ Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Signed-off-by: Akash Kumar <akash.kumar@oss.qualcomm.com>
1 parent c424fc5 commit 8b43911

1 file changed

Lines changed: 66 additions & 0 deletions

File tree

arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,16 @@
255255
};
256256
};
257257

258+
vdd_micro_usb_vbus: regulator-micro-usb-vbus {
259+
compatible = "regulator-fixed";
260+
regulator-name = "MICRO_USB_VBUS";
261+
gpio = <&tlmm 63 GPIO_ACTIVE_HIGH>;
262+
regulator-min-microvolt = <5000000>;
263+
regulator-max-microvolt = <5000000>;
264+
regulator-boot-on;
265+
enable-active-high;
266+
};
267+
258268
vph_pwr: vph-pwr-regulator {
259269
compatible = "regulator-fixed";
260270
regulator-name = "vph_pwr";
@@ -286,6 +296,31 @@
286296
regulator-enable-ramp-delay = <10000>;
287297
};
288298

299+
usb2-connector {
300+
compatible = "gpio-usb-b-connector",
301+
"usb-b-connector";
302+
label = "micro-USB";
303+
type = "micro";
304+
id-gpios = <&tlmm 61 GPIO_ACTIVE_HIGH>;
305+
vbus-gpios = <&pm7325_gpios 9 GPIO_ACTIVE_HIGH>;
306+
vbus-supply = <&vdd_micro_usb_vbus>;
307+
pinctrl-0 = <&usb2_id_detect>;
308+
pinctrl-names = "default";
309+
310+
ports {
311+
#address-cells = <1>;
312+
#size-cells = <0>;
313+
314+
port@0 {
315+
reg = <0>;
316+
317+
usb2_connector_ep: endpoint {
318+
remote-endpoint = <&usb2_controller_ep>;
319+
};
320+
};
321+
};
322+
};
323+
289324
wcn6750-pmu {
290325
compatible = "qcom,wcn6750-pmu";
291326
pinctrl-0 = <&bt_en>;
@@ -1646,6 +1681,12 @@
16461681
*/
16471682
bias-pull-up;
16481683
};
1684+
1685+
usb2_id_detect: usb2-id-detect-state {
1686+
pins = "gpio61";
1687+
function = "gpio";
1688+
bias-pull-up;
1689+
};
16491690
};
16501691

16511692
&uart5 {
@@ -1709,6 +1750,31 @@
17091750
status = "okay";
17101751
};
17111752

1753+
&usb_2 {
1754+
status = "okay";
1755+
1756+
ports {
1757+
#address-cells = <1>;
1758+
#size-cells = <0>;
1759+
1760+
port@0 {
1761+
reg = <0>;
1762+
1763+
usb2_controller_ep: endpoint {
1764+
remote-endpoint = <&usb2_connector_ep>;
1765+
};
1766+
};
1767+
};
1768+
};
1769+
1770+
&usb_2_hsphy {
1771+
vdda-pll-supply = <&vreg_l10c_0p88>;
1772+
vdda18-supply = <&vreg_l1c_1p8>;
1773+
vdda33-supply = <&vreg_l2b_3p072>;
1774+
1775+
status = "okay";
1776+
};
1777+
17121778
&usb_dp_qmpphy_out {
17131779
remote-endpoint = <&redriver_phy_con_ss>;
17141780
};

0 commit comments

Comments
 (0)