ARM: dts: qcom: msm8974-hammerhead: add USB OTG support
authorBrian Masney <masneyb@onstation.org>
Thu, 1 Nov 2018 00:11:49 +0000 (20:11 -0400)
committerAndy Gross <andy.gross@linaro.org>
Tue, 22 Jan 2019 21:04:50 +0000 (15:04 -0600)
Add the device tree bindings for USB OTG support. Driver was tested
using on a LG Nexus 5 (hammerhead) phone. This patch is based on work
from Jonathan Marek and from the other msm8974 devices.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts
arch/arm/boot/dts/qcom-msm8974.dtsi

index 5cf9c7e20f2e365a72e80acc89aac4b22ffc5db9..b3b04736a15991a12952fdee98c71123cc8c2198 100644 (file)
                        };
                };
 
+               i2c1_pins: i2c1 {
+                       mux {
+                               pins = "gpio2", "gpio3";
+                               function = "blsp_i2c1";
+
+                               drive-strength = <2>;
+                               bias-disable;
+                       };
+               };
+
                i2c3_pins: i2c3 {
                        mux {
                                pins = "gpio10", "gpio11";
                };
        };
 
+       i2c@f9923000 {
+               status = "ok";
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2c1_pins>;
+               clock-frequency = <100000>;
+               qcom,src-freq = <50000000>;
+
+               charger: bq24192@6b {
+                       compatible = "ti,bq24192";
+                       reg = <0x6b>;
+                       interrupts-extended = <&spmi_bus 0 0xd5 0 IRQ_TYPE_EDGE_FALLING>;
+
+                       omit-battery-class;
+
+                       usb_otg_vbus: usb-otg-vbus { };
+               };
+       };
+
        i2c@f9925000 {
                status = "ok";
                pinctrl-names = "default";
                        amstaos,proximity-diodes = <0>;
                };
        };
+
+       usb@f9a55000 {
+               status = "ok";
+
+               phys = <&usb_hs1_phy>;
+               phy-select = <&tcsr 0xb000 0>;
+
+               extcon = <&charger>, <&usb_id>;
+               vbus-supply = <&usb_otg_vbus>;
+
+               hnp-disable;
+               srp-disable;
+               adp-disable;
+
+               ulpi {
+                       phy@a {
+                               status = "ok";
+
+                               v1p8-supply = <&pm8941_l6>;
+                               v3p3-supply = <&pm8941_l24>;
+
+                               qcom,init-seq = /bits/ 8 <0x1 0x64>;
+                       };
+               };
+       };
 };
 
 &spmi_bus {
                                bias-disable;
                                power-source = <PM8941_GPIO_S3>;
                        };
+
+                       otg {
+                               gpio-hog;
+                               gpios = <35 GPIO_ACTIVE_HIGH>;
+                               output-high;
+                               line-name = "otg-gpio";
+                       };
                };
        };
 };
index ca266a5f021d55dc99ec78a9a9e32304b73bd806..05b86f21d41b77366f6af276acfc4720c25164e7 100644 (file)
                        interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
                };
 
+               i2c@f9923000 {
+                       status = "disabled";
+                       compatible = "qcom,i2c-qup-v2.1.1";
+                       reg = <0xf9923000 0x1000>;
+                       interrupts = <0 95 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&gcc GCC_BLSP1_QUP1_I2C_APPS_CLK>, <&gcc GCC_BLSP1_AHB_CLK>;
+                       clock-names = "core", "iface";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
                i2c@f9924000 {
                        status = "disabled";
                        compatible = "qcom,i2c-qup-v2.1.1";