GPIO USB VBUS Detection Discrete USB VBUS detection circuitry can be connected to the AP or PMICs. Such circuits can be used to detect the when a USB cable is connected to an upstream port such as a standard host or a wall charger by detecting the presence of VBUS voltage. The GPIO can be configured to trigger an interrupt, and allow the software driver to in turn notify the USB subsytem using the power_supply framework. Required Properties: - compatible: must be "qcom,gpio-usbdetect" - interrupts: an interrupt triggered by the output of the detection circuit - interrupt-names: must be "vbus_det_irq" Optional Properties: - vin-supply: phandle to a regulator that powers this circuit, if needed - vdd33-supply: phandle to a regulator that supplies 3.3v to external circuit - vdd12-supply: phandle to a regulator that supplies 1.2v to external circuit - qcom,notify-host-mode: to notify host mode if GPIO is low otherwise notify disconnect. - qcom,gpio-mode-sel: If present, specifies a gpio to switch to host mode if value is 0 or device mode if 1. - qcom,disable-device-mode: If present then don't treat GPIO high as Vbus high. And only notify host mode similar to ID line. -qcom,id-det-gpio: If present, specifies a gpio that is tied to ID, switch to host mode if value is 0. -qcom,dpdm_switch_gpio: If present, specifies a gpio that drives a switch which routes DPDM lines to different ports. Example: usb_detect { compatible = "qcom,gpio-usbdetect"; interrupt-parent = <&spmi_bus>; interrupts = <0x0 0xCA 0x0>; /* PMA8084 GPIO 11 */ interrupt-names = "vbus_det_irq"; vin-supply = <&vbus_det_reg>; };