arm64: dts: msm8996: Add device node for qcom,dwc3
authorVivek Gautam <vivek.gautam@codeaurora.org>
Mon, 31 Jul 2017 06:44:44 +0000 (12:14 +0530)
committerAndy Gross <andy.gross@linaro.org>
Tue, 8 Aug 2017 21:29:52 +0000 (16:29 -0500)
Adding required device node for couple of DWC3 controllers
present on msm8996 chipset to enable High speed and Super
speed USB support.

Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
arch/arm64/boot/dts/qcom/apq8096-db820c-pmic-pins.dtsi
arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi
arch/arm64/boot/dts/qcom/msm8996.dtsi

index b1142c45fdc983151e24fa2ff084dec82852a0d5..8e379782597a258f84d934ef19a54ab6e6176e26 100644 (file)
                        power-source = <PM8994_GPIO_S4>; // 1.8V
                };
        };
+
+       usb3_vbus_det_gpio: pm8996_gpio22 {
+               pinconf {
+                       pins = "gpio22";
+                       function = PMIC_GPIO_FUNC_NORMAL;
+                       input-enable;
+                       bias-pull-down;
+                       qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
+                       power-source = <PM8994_GPIO_S4>; // 1.8V
+               };
+       };
+};
+
+&pmi8994_gpios {
+       usb2_vbus_det_gpio: pmi8996_gpio6 {
+               pinconf {
+                       pins = "gpio6";
+                       function = PMIC_GPIO_FUNC_NORMAL;
+                       input-enable;
+                       bias-pull-down;
+                       qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
+                       power-source = <PM8994_GPIO_S4>; // 1.8V
+               };
+       };
 };
index f05a64bad7ff90f2766c24b07422be8d31969dea..bbdc106effca2627f4619d297a3620342ab8a0aa 100644 (file)
@@ -13,6 +13,7 @@
 
 #include "msm8996.dtsi"
 #include "pm8994.dtsi"
+#include "pmi8994.dtsi"
 #include "apq8096-db820c-pins.dtsi"
 #include "apq8096-db820c-pmic-pins.dtsi"
 #include <dt-bindings/input/input.h>
                phy@7412000 {
                        status = "okay";
                };
+
+               usb@6a00000 {
+                       status = "okay";
+
+                       dwc3@6a00000 {
+                               extcon = <&usb3_id>;
+                               dr_mode = "otg";
+                       };
+               };
+
+               usb3_id: usb3-id {
+                       compatible = "linux,extcon-usb-gpio";
+                       id-gpio = <&pm8994_gpios 22 GPIO_ACTIVE_HIGH>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&usb3_vbus_det_gpio>;
+               };
+
+               usb@7600000 {
+                       status = "okay";
+
+                       dwc3@7600000 {
+                               extcon = <&usb2_id>;
+                               dr_mode = "otg";
+                               maximum-speed = "high-speed";
+                       };
+               };
+
+               usb2_id: usb2-id {
+                       compatible = "linux,extcon-usb-gpio";
+                       id-gpio = <&pmi8994_gpios 6 GPIO_ACTIVE_HIGH>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&usb2_vbus_det_gpio>;
+               };
        };
 
 
index 27e16762aacaf9fa1cdc1f6fd83035f4293aaf4d..ca4191d24fd34c6aa55cc2ceaffa363c52a39e0b 100644 (file)
                        nvmem-cells = <&qusb2s_hstx_trim>;
                        status = "disabled";
                };
+
+               usb2: usb@7600000 {
+                       compatible = "qcom,dwc3";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+
+                       clocks = <&gcc GCC_PERIPH_NOC_USB20_AHB_CLK>,
+                               <&gcc GCC_USB20_MASTER_CLK>,
+                               <&gcc GCC_USB20_MOCK_UTMI_CLK>,
+                               <&gcc GCC_USB20_SLEEP_CLK>,
+                               <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>;
+
+                       assigned-clocks = <&gcc GCC_USB20_MOCK_UTMI_CLK>,
+                                         <&gcc GCC_USB20_MASTER_CLK>;
+                       assigned-clock-rates = <19200000>, <60000000>;
+
+                       power-domains = <&gcc USB30_GDSC>;
+                       status = "disabled";
+
+                       dwc3@7600000 {
+                               compatible = "snps,dwc3";
+                               reg = <0x7600000 0xcc00>;
+                               interrupts = <0 138 0>;
+                               phys = <&hsusb_phy2>;
+                               phy-names = "usb2-phy";
+                       };
+               };
+
+               usb3: usb@6a00000 {
+                       compatible = "qcom,dwc3";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+
+                       clocks = <&gcc GCC_SYS_NOC_USB3_AXI_CLK>,
+                               <&gcc GCC_USB30_MASTER_CLK>,
+                               <&gcc GCC_AGGRE2_USB3_AXI_CLK>,
+                               <&gcc GCC_USB30_MOCK_UTMI_CLK>,
+                               <&gcc GCC_USB30_SLEEP_CLK>,
+                               <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>;
+
+                       assigned-clocks = <&gcc GCC_USB30_MOCK_UTMI_CLK>,
+                                         <&gcc GCC_USB30_MASTER_CLK>;
+                       assigned-clock-rates = <19200000>, <120000000>;
+
+                       power-domains = <&gcc USB30_GDSC>;
+                       status = "disabled";
+
+                       dwc3@6a00000 {
+                               compatible = "snps,dwc3";
+                               reg = <0x6a00000 0xcc00>;
+                               interrupts = <0 131 0>;
+                               phys = <&hsusb_phy1>, <&ssusb_phy_0>;
+                               phy-names = "usb2-phy", "usb3-phy";
+                       };
+               };
        };
 
        adsp-pil {