arm64: dts: qcom: qcs404-evb: Define VBUS pins
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Wed, 11 Mar 2020 19:15:13 +0000 (19:15 +0000)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 14 Apr 2020 05:04:41 +0000 (22:04 -0700)
Defines VBUS detect and VBUS boost for the QCS404 EVB.

Detect:
VBUS present/absent is presented to the SoC via a GPIO on the EVB. Define
the pin mapping for later use by gpio-usb-conn.

Boost:
An external regulator is used to trigger VBUS on/off via GPIO. This patch
defines the relevant GPIO in the EVB dts.

Cc: Andy Gross <agross@kernel.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: linux-arm-msm@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Link: https://lore.kernel.org/r/20200311191517.8221-3-bryan.odonoghue@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
arch/arm64/boot/dts/qcom/qcs404-evb.dtsi

index afe69e8..f878028 100644 (file)
@@ -4,6 +4,8 @@
 #include <dt-bindings/gpio/gpio.h>
 #include "qcs404.dtsi"
 #include "pms405.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
 
 / {
        aliases {
        };
 };
 
+&pms405_gpios {
+       usb_vbus_boost_pin: usb-vbus-boost-pin {
+               pinconf {
+                       pins = "gpio3";
+                       function = PMIC_GPIO_FUNC_NORMAL;
+                       output-low;
+                       power-source = <1>;
+               };
+       };
+       usb3_vbus_pin: usb3-vbus-pin {
+               pinconf {
+                       pins = "gpio12";
+                       function = PMIC_GPIO_FUNC_NORMAL;
+                       input-enable;
+                       bias-pull-down;
+                       power-source = <1>;
+               };
+       };
+};
+
 &wifi {
        status = "okay";
        vdd-0.8-cx-mx-supply = <&vreg_l2_1p275>;