[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191016033340.1288-11-john.stultz@linaro.org>
Date: Wed, 16 Oct 2019 03:33:39 +0000
From: John Stultz <john.stultz@...aro.org>
To: lkml <linux-kernel@...r.kernel.org>
Cc: Yu Chen <chenyu56@...wei.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
ShuFan Lee <shufan_lee@...htek.com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Suzuki K Poulose <suzuki.poulose@....com>,
Chunfeng Yun <chunfeng.yun@...iatek.com>,
Felipe Balbi <balbi@...nel.org>,
Hans de Goede <hdegoede@...hat.com>,
Andy Shevchenko <andy.shevchenko@...il.com>,
Jun Li <lijun.kernel@...il.com>,
Valentin Schneider <valentin.schneider@....com>,
Jack Pham <jackp@...eaurora.org>, linux-usb@...r.kernel.org,
devicetree@...r.kernel.org, John Stultz <john.stultz@...aro.org>
Subject: [RFC][PATCH v3 10/11] dt-bindings: misc: Add bindings for HiSilicon usb hub and data role switch functionality on HiKey960
From: Yu Chen <chenyu56@...wei.com>
This patch adds binding documentation to support usb hub and usb
data role switch of Hisilicon HiKey960 Board.
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Rob Herring <robh+dt@...nel.org>
Cc: Mark Rutland <mark.rutland@....com>
CC: ShuFan Lee <shufan_lee@...htek.com>
Cc: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Cc: Suzuki K Poulose <suzuki.poulose@....com>
Cc: Chunfeng Yun <chunfeng.yun@...iatek.com>
Cc: Yu Chen <chenyu56@...wei.com>
Cc: Felipe Balbi <balbi@...nel.org>
Cc: Hans de Goede <hdegoede@...hat.com>
Cc: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Jun Li <lijun.kernel@...il.com>
Cc: Valentin Schneider <valentin.schneider@....com>
Cc: Jack Pham <jackp@...eaurora.org>
Cc: linux-usb@...r.kernel.org
Cc: devicetree@...r.kernel.org
Signed-off-by: Yu Chen <chenyu56@...wei.com>
Signed-off-by: John Stultz <john.stultz@...aro.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
Powered by blists - more mailing lists