From: Yu Chen <cheny...@huawei.com>

This patch adds binding documentation to support usb hub and usb
data role switch of Hisilicon HiKey960 Board.

Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org>
Cc: Rob Herring <robh...@kernel.org>
Cc: Mark Rutland <mark.rutl...@arm.com>
CC: ShuFan Lee <shufan_...@richtek.com>
Cc: Heikki Krogerus <heikki.kroge...@linux.intel.com>
Cc: Suzuki K Poulose <suzuki.poul...@arm.com>
Cc: Chunfeng Yun <chunfeng....@mediatek.com>
Cc: Yu Chen <cheny...@huawei.com>
Cc: Felipe Balbi <ba...@kernel.org>
Cc: Hans de Goede <hdego...@redhat.com>
Cc: Andy Shevchenko <andy.shevche...@gmail.com>
Cc: Jun Li <lijun.ker...@gmail.com>
Cc: Valentin Schneider <valentin.schnei...@arm.com>
Cc: Jack Pham <ja...@codeaurora.org>
Cc: linux-...@vger.kernel.org
Cc: devicet...@vger.kernel.org
Signed-off-by: Yu Chen <cheny...@huawei.com>
Signed-off-by: John Stultz <john.stu...@linaro.org>
---
v3: Reworked as usb-role-switch intermediary
---
 .../bindings/misc/hisilicon-hikey-usb.txt     | 40 +++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 
Documentation/devicetree/bindings/misc/hisilicon-hikey-usb.txt

diff --git a/Documentation/devicetree/bindings/misc/hisilicon-hikey-usb.txt 
b/Documentation/devicetree/bindings/misc/hisilicon-hikey-usb.txt
new file mode 100644
index 000000000000..1e131b38230d
--- /dev/null
+++ b/Documentation/devicetree/bindings/misc/hisilicon-hikey-usb.txt
@@ -0,0 +1,40 @@
+Support usb hub and usb data role switch of Hisilicon HiKey960 Board.
+
+-----------------------------
+
+Required properties:
+- compatible: "hisilicon,gpio_hubv1"
+- typec-vbus-gpios: gpio to control the vbus of typeC port
+- otg-switch-gpios: gpio to switch DP & DM between the hub and typeC port
+- hub-vdd33-en-gpios: gpio to enable the power of hub
+- pinctrl-names: pin configuration state name ("default")
+- pinctrl-0: pinctrl config
+- usb-role-switch: flags the driver as a role switch provider
+- ports: two endpoints to connect the usb core role switch provider
+        to the usb-c tcpm driver.
+
+Example
+-----
+       hisi_hikey_usb: hisi_hikey_usb {
+               compatible = "hisilicon,gpio_hubv1";
+               typec-vbus-gpios = <&gpio25 2 GPIO_ACTIVE_HIGH>;
+               otg-switch-gpios = <&gpio25 6 GPIO_ACTIVE_HIGH>;
+               hub-vdd33-en-gpios = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&usbhub5734_pmx_func>;
+               usb-role-switch;
+
+               port {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       hikey_usb_ep0: endpoint@0 {
+                               reg = <0>;
+                               remote-endpoint = <&dwc3_role_switch>;
+                       };
+                       hikey_usb_ep1: endpoint@1 {
+                               reg = <1>;
+                               remote-endpoint = <&rt1711h_ep>;
+                       };
+               };
+       };
-- 
2.17.1

Reply via email to