From patchwork Sat Apr 20 06:40:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Yu X-Patchwork-Id: 1088291 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=huawei.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44mNY637M0z9s3q for ; Sat, 20 Apr 2019 16:41:46 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727935AbfDTGkj (ORCPT ); Sat, 20 Apr 2019 02:40:39 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:39396 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727273AbfDTGkj (ORCPT ); Sat, 20 Apr 2019 02:40:39 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 5FF6A20016B86DFC1026; Sat, 20 Apr 2019 14:40:34 +0800 (CST) Received: from vm100-107-113-134.huawei.com (100.107.113.134) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.408.0; Sat, 20 Apr 2019 14:40:23 +0800 From: Yu Chen To: , , CC: , , , , , , , , , , , , , , Yu Chen , Rob Herring , Mark Rutland , Binghui Wang Subject: [PATCH v6 01/13] dt-bindings: phy: Add support for HiSilicon's hi3660 USB PHY Date: Sat, 20 Apr 2019 14:40:07 +0800 Message-ID: <20190420064019.57522-2-chenyu56@huawei.com> X-Mailer: git-send-email 2.15.0-rc2 In-Reply-To: <20190420064019.57522-1-chenyu56@huawei.com> References: <20190420064019.57522-1-chenyu56@huawei.com> MIME-Version: 1.0 X-Originating-IP: [100.107.113.134] X-CFilter-Loop: Reflected Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This patch adds binding documentation for supporting the hi3660 usb phy on boards like the HiKey960. Cc: Rob Herring Cc: Mark Rutland Cc: John Stultz Cc: Binghui Wang Reviewed-by: Rob Herring Signed-off-by: Yu Chen --- v1: * Fix some format error as suggested by Rob. v2: * Change hi3660 usb PHY to hi3660 USB PHY v3: * Make device node a subnode of usb3_otg_bc register. v4: * Remove "hisilicon,usb3-otg-bc-syscon" property --- --- .../devicetree/bindings/phy/phy-hi3660-usb3.txt | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/phy-hi3660-usb3.txt diff --git a/Documentation/devicetree/bindings/phy/phy-hi3660-usb3.txt b/Documentation/devicetree/bindings/phy/phy-hi3660-usb3.txt new file mode 100644 index 000000000000..e88ba7d92dcb --- /dev/null +++ b/Documentation/devicetree/bindings/phy/phy-hi3660-usb3.txt @@ -0,0 +1,26 @@ +Hisilicon hi3660 USB PHY +----------------------- + +Required properties: +- compatible: should be "hisilicon,hi3660-usb-phy" +- #phy-cells: must be 0 +- hisilicon,pericrg-syscon: phandle of syscon used to control phy. +- hisilicon,pctrl-syscon: phandle of syscon used to control phy. +- hisilicon,eye-diagram-param: parameter set for phy +Refer to phy/phy-bindings.txt for the generic PHY binding properties + +This is a subnode of usb3_otg_bc register node. + +Example: + usb3_otg_bc: usb3_otg_bc@ff200000 { + compatible = "syscon", "simple-mfd"; + reg = <0x0 0xff200000 0x0 0x1000>; + + usb-phy { + compatible = "hisilicon,hi3660-usb-phy"; + #phy-cells = <0>; + hisilicon,pericrg-syscon = <&crg_ctrl>; + hisilicon,pctrl-syscon = <&pctrl>; + hisilicon,eye-diagram-param = <0x22466e4>; + }; + }; From patchwork Sat Apr 20 06:40:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Yu X-Patchwork-Id: 1088292 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=huawei.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44mNYG5GTLz9s6w for ; Sat, 20 Apr 2019 16:41:54 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727812AbfDTGkh (ORCPT ); Sat, 20 Apr 2019 02:40:37 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:39404 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725832AbfDTGkh (ORCPT ); Sat, 20 Apr 2019 02:40:37 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 6B1019216819B50265F4; Sat, 20 Apr 2019 14:40:34 +0800 (CST) Received: from vm100-107-113-134.huawei.com (100.107.113.134) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.408.0; Sat, 20 Apr 2019 14:40:24 +0800 From: Yu Chen To: , , CC: , , , , , , , , , , , , , , Yu Chen , "Kishon Vijay Abraham I" , Sergei Shtylyov , Rob Herring , "Mark Rutland" , Binghui Wang Subject: [PATCH v6 02/13] dt-bindings: misc: Add bindings for HiSilicon usb hub and data role switch functionality on HiKey960 Date: Sat, 20 Apr 2019 14:40:08 +0800 Message-ID: <20190420064019.57522-3-chenyu56@huawei.com> X-Mailer: git-send-email 2.15.0-rc2 In-Reply-To: <20190420064019.57522-1-chenyu56@huawei.com> References: <20190420064019.57522-1-chenyu56@huawei.com> MIME-Version: 1.0 X-Originating-IP: [100.107.113.134] X-CFilter-Loop: Reflected Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This patch adds binding documentation to support usb hub and usb data role switch of Hisilicon HiKey960 Board. Cc: Kishon Vijay Abraham I Cc: Sergei Shtylyov Cc: Rob Herring Cc: Mark Rutland Cc: John Stultz Cc: Binghui Wang Signed-off-by: Yu Chen --- v1: * Fix some format errors as suggested by Sergei. * Modify gpio description to use gpiod API. v2: * Remove information about Hikey. * Fix gpio description. * Remove device_type of endpoint. v3: * Remove property typec-vbus-enable-val. * Add description of pinctrl-names. * Add example for "hisilicon,gpio-hubv1" * Add flag in gpiod properties. --- --- .../bindings/misc/hisilicon-hikey-usb.txt | 52 ++++++++++++++++++++++ 1 file changed, 52 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..422e844df719 --- /dev/null +++ b/Documentation/devicetree/bindings/misc/hisilicon-hikey-usb.txt @@ -0,0 +1,52 @@ +Support usb hub and usb data role switch of Hisilicon HiKey960 Board. + +----------------------------- + +Required properties: +- compatible: "hisilicon,gpio-hubv1","hisilicon,hikey960-usb" +- 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 + +Example +----- + + hisi_hikey_usb: hisi_hikey_usb { + compatible = "hisilicon,hikey960-usb"; + 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>; + + port { + #address-cells = <1>; + #size-cells = <0>; + + hikey_usb_ep: endpoint@0 { + reg = <0>; + remote-endpoint = <&dwc3_role_switch_notify>; + }; + }; + }; + + hisi_hikey_usb: hisi_hikey_usb { + compatible = "hisilicon,gpio-hubv1"; + typec-vbus-gpios = <&gpio25 2 GPIO_ACTIVE_LOW>; + 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>; + + port { + #address-cells = <1>; + #size-cells = <0>; + + hikey_usb_ep: endpoint@0 { + reg = <0>; + remote-endpoint = <&dwc3_role_switch_notify>; + }; + }; + };