Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: usb: add binding for USB GPIO based connection detection driver

It's used to support dual role switch via GPIO when use Type-B
receptacle, typically the USB ID pin is connected to an input
GPIO, and also used to enable/disable device when the USB Vbus
pin is connected to an input GPIO.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/1567070558-29417-4-git-send-email-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Chunfeng Yun and committed by
Greg Kroah-Hartman
f651c73e 6b68240d

+30
+30
Documentation/devicetree/bindings/usb/usb-conn-gpio.txt
··· 1 + USB GPIO Based Connection Detection 2 + 3 + This is typically used to switch dual role mode from the USB ID pin connected 4 + to an input GPIO, and also used to enable/disable device mode from the USB 5 + Vbus pin connected to an input GPIO. 6 + 7 + Required properties: 8 + - compatible : should include "gpio-usb-b-connector" and "usb-b-connector". 9 + - id-gpios, vbus-gpios : input gpios, either one of them must be present, 10 + and both can be present as well. 11 + see connector/usb-connector.txt 12 + 13 + Optional properties: 14 + - vbus-supply : can be present if needed when supports dual role mode. 15 + see connector/usb-connector.txt 16 + 17 + - Sub-nodes: 18 + - port : can be present. 19 + see graph.txt 20 + 21 + Example: 22 + 23 + &mtu3 { 24 + connector { 25 + compatible = "gpio-usb-b-connector", "usb-b-connector"; 26 + type = "micro"; 27 + id-gpios = <&pio 12 GPIO_ACTIVE_HIGH>; 28 + vbus-supply = <&usb_p0_vbus>; 29 + }; 30 + };