ARM: dts: msm: Add usb-conn-gpio & pinctrl nodes for Cinder

Cinder has no PMI, so we are using usb-conn-gpio driver to detect the
USB role based on the states of Vbus & Vid GPIO pins. Also added nodes
for Vbus, Vid, Vbus-out pins. Added usb-role-switch property usb0,
so that dwc3-msm driver can register for role switch. Port nodes
were added to latch usb-conn-gpio and dwc3-msm drivers together.

Change-Id: If16931dfdc183f31cacf383ef56a0cd76222088e
This commit is contained in:
Prashanth K
2022-04-29 16:28:56 +05:30
committed by Gerrit - the friendly Code Review server
parent da34e9f50f
commit 99ce7131a5
3 changed files with 63 additions and 0 deletions

View File

@@ -1,6 +1,31 @@
#include "cinder-pmic-overlay.dtsi"
#include <dt-bindings/gpio/gpio.h>
&soc {
usb_conn_gpio: usb_conn_gpio {
compatible = "gpio-usb-b-connector";
vbus-gpio = <&pm8150_gpios 7 GPIO_ACTIVE_HIGH>;
id-gpio = <&tlmm 42 GPIO_ACTIVE_HIGH>;
vbus-out-gpio = <&tlmm 43 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&usb_vbus_det_default
&usb_id_det_default
&usb_vbus_boost_default>;
port {
usb_port0_connector: endpoint {
remote-endpoint = <&usb_port0>;
};
};
};
};
&usb0 {
usb-role-switch;
port {
usb_port0: endpoint {
remote-endpoint = <&usb_port0_connector>;
};
};
};

View File

@@ -1773,4 +1773,30 @@
};
};
};
usb_id_det_default: usb_id_det_default {
mux {
pins = "gpio42";
function = "gpio";
};
config {
pins = "gpio42";
input-enable;
bias-pull-up;
};
};
usb_vbus_boost_default: usb_vbus_boost_default {
mux {
pins = "gpio43";
function = "gpio";
};
config {
pins = "gpio43";
output-low;
bias-pull-down;
};
};
};

View File

@@ -81,3 +81,15 @@
nvmem-cell-names = "restart_reason";
};
};
&pm8150_gpios {
usb_vbus_det {
usb_vbus_det_default: usb_vbus_det_default {
pins = "gpio7";
function = "normal";
input-enable;
bias-disable;
power-source = <0>;
};
};
};