OSDN Git Service

arm64: dts: qcom: pm8916: Add pm8941-misc extcon for USB detection
authorStephan Gerhold <stephan@gerhold.net>
Tue, 28 Sep 2021 11:29:44 +0000 (13:29 +0200)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 28 Sep 2021 15:28:05 +0000 (10:28 -0500)
commitf5d7bca55425c8611e6cfa3f236d1f56031920e8
treeb700fb7edb9f657f3000f4f797abb7c40958114f
parent483de2b44cd3a168458f8f9ff237e78a434729bc
arm64: dts: qcom: pm8916: Add pm8941-misc extcon for USB detection

At the moment, USB gadget mode on MSM8916 works only with an extcon
device that reports the correct USB mode. This might be because the
USB PHY needs to be configured appropriately.

Unfortunately there is currently no simple approach to get such an
extcon device during early bring-up. The extcon device for USB VBUS
(i.e. gadget/peripheral mode) is typically provided by the charging
driver which is almost always very complex to port.

On pretty much all devices with PM8916, the USB VBUS is also connected
to the PM8916 "USB_IN" pad, no matter if they use the linear charger
integrated into PM8916 or not. The state of this pad can be checked
with the "USBIN_VALID" interrupt of PM8916.

The "qcom,pm8941-misc" binding exists to expose an "usb_vbus" and/or
"usb_id" interrupt from the PMIC as an extcon device.

Add a &pm8916_usbin node to pm8916.dtsi which can be used as simple
extcon device for devices that are currently lacking a proper charger
driver.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20210928112945.25310-2-stephan@gerhold.net
arch/arm64/boot/dts/qcom/pm8916.dtsi