diff mbox series

[05/14] arm64: dts: qcom: msm8998-yoshino: Add USB extcon

Message ID 20220430162353.607709-5-konrad.dybcio@somainline.org
State Accepted
Commit 6dad36ebe1cb219615ead56692cea816d144c645
Headers show
Series [01/14] arm64: dts: qcom: msm8998*: Fix TLMM and pin nodes | expand

Commit Message

Konrad Dybcio April 30, 2022, 4:23 p.m. UTC
While not strictly necessary, at least on maple, configure the USB extcon,
which requires two pins on Yoshino.

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
---
 .../dts/qcom/msm8998-sony-xperia-yoshino.dtsi | 24 +++++++++++++++++++
 1 file changed, 24 insertions(+)
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/msm8998-sony-xperia-yoshino.dtsi b/arch/arm64/boot/dts/qcom/msm8998-sony-xperia-yoshino.dtsi
index fd65dee55626..170cd2df3e5e 100644
--- a/arch/arm64/boot/dts/qcom/msm8998-sony-xperia-yoshino.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8998-sony-xperia-yoshino.dtsi
@@ -91,6 +91,14 @@  vph_pwr: vph-pwr-regulator {
 		regulator-boot-on;
 	};
 
+	extcon_usb: extcon-usb {
+		compatible = "linux,extcon-usb-gpio";
+		id-gpio = <&tlmm 38 GPIO_ACTIVE_HIGH>;
+		vbus-gpio = <&tlmm 128 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&usb_extcon_active &usb_vbus_active>;
+	};
+
 	gpio-keys {
 		compatible = "gpio-keys";
 		label = "Side buttons";
@@ -644,6 +652,13 @@  cam1_vdig_default: cam1-vdig-default {
 		drive-strength = <2>;
 	};
 
+	usb_extcon_active: usb-extcon-active {
+		pins = "gpio38";
+		function = "gpio";
+		bias-disable;
+		drive-strength = <16>;
+	};
+
 	hall_sensor0_default: acc-cover-open {
 		pins = "gpio124";
 		function = "gpio";
@@ -659,6 +674,14 @@  ts_int_n: ts-int-n {
 		bias-pull-up;
 	};
 
+	usb_vbus_active: usb-vbus-active {
+		pins = "gpio128";
+		function = "gpio";
+		bias-disable;
+		drive-strength = <2>;
+		output-low;
+	};
+
 	ts_vddio_en: ts-vddio-en-default {
 		pins = "gpio133";
 		function = "gpio";
@@ -689,6 +712,7 @@  &usb3 {
 &usb3_dwc3 {
 	/* Force to peripheral until we have Type-C hooked up */
 	dr_mode = "peripheral";
+	extcon = <&extcon_usb>;
 };
 
 &usb3phy {