Commit 4868f573 authored by Loic Poulain's avatar Loic Poulain Committed by Bjorn Andersson

arm: dts: qcom: db410c: Enable USB OTG support

The Dragonboard-410c is able to act either as USB Host or Device.
The role can be determined at runtime via the USB_HS_ID pin which is
derived from the micro-usb port VBUS pin.

In Host role, SoC USB D+/D- are routed to the onboard USB 2.0 HUB.
In Device role, SoC USB D+/D- are routed to the USB 2.0 micro B port.
Routing is selected via USB_SW_SEL_PM gpio.

In device role USB HUB can be held in reset.

chipidea driver expects two extcon device pointers, one for the
EXTCON_USB event and one for the EXTCON_USB_HOST event. Since
the extcon-usb-gpio device is capable of generating both these
events, point two times to this extcon device.
Signed-off-by: default avatarLoic Poulain <loic.poulain@linaro.org>
Link: https://lore.kernel.org/r/1576083014-5842-1-git-send-email-loic.poulain@linaro.orgSigned-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent 741a5ea7
...@@ -5,6 +5,15 @@ ...@@ -5,6 +5,15 @@
&pm8916_gpios { &pm8916_gpios {
usb_hub_reset_pm: usb_hub_reset_pm { usb_hub_reset_pm: usb_hub_reset_pm {
pinconf {
pins = "gpio3";
function = PMIC_GPIO_FUNC_NORMAL;
input-disable;
output-high;
};
};
usb_hub_reset_pm_device: usb_hub_reset_pm_device {
pinconf { pinconf {
pins = "gpio3"; pins = "gpio3";
function = PMIC_GPIO_FUNC_NORMAL; function = PMIC_GPIO_FUNC_NORMAL;
...@@ -22,6 +31,16 @@ pinconf { ...@@ -22,6 +31,16 @@ pinconf {
}; };
}; };
usb_sw_sel_pm_device: usb_sw_sel_pm_device {
pinconf {
pins = "gpio4";
function = PMIC_GPIO_FUNC_NORMAL;
power-source = <PM8916_GPIO_VPH>;
input-disable;
output-low;
};
};
pm8916_gpios_leds: pm8916_gpios_leds { pm8916_gpios_leds: pm8916_gpios_leds {
pinconf { pinconf {
pins = "gpio1", "gpio2"; pins = "gpio1", "gpio2";
......
...@@ -358,14 +358,15 @@ sdhci@7864000 { ...@@ -358,14 +358,15 @@ sdhci@7864000 {
}; };
usb@78d9000 { usb@78d9000 {
extcon = <&usb_id>; extcon = <&usb_id>, <&usb_id>;
status = "okay"; status = "okay";
adp-disable; adp-disable;
hnp-disable; hnp-disable;
srp-disable; srp-disable;
dr_mode = "host"; dr_mode = "otg";
pinctrl-names = "default"; pinctrl-names = "default", "device";
pinctrl-0 = <&usb_sw_sel_pm>; pinctrl-0 = <&usb_sw_sel_pm &usb_hub_reset_pm>;
pinctrl-1 = <&usb_sw_sel_pm_device &usb_hub_reset_pm_device>;
ulpi { ulpi {
phy { phy {
v1p8-supply = <&pm8916_l7>; v1p8-supply = <&pm8916_l7>;
...@@ -504,7 +505,7 @@ usb2513 { ...@@ -504,7 +505,7 @@ usb2513 {
usb_id: usb-id { usb_id: usb-id {
compatible = "linux,extcon-usb-gpio"; compatible = "linux,extcon-usb-gpio";
vbus-gpio = <&msmgpio 121 GPIO_ACTIVE_HIGH>; id-gpio = <&msmgpio 121 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&usb_id_default>; pinctrl-0 = <&usb_id_default>;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment