From patchwork Wed Oct 16 03:33:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 176411 Delivered-To: patches@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp6783793ill; Tue, 15 Oct 2019 20:33:59 -0700 (PDT) X-Received: by 2002:a63:4654:: with SMTP id v20mr43002939pgk.11.1571196839649; Tue, 15 Oct 2019 20:33:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571196839; cv=none; d=google.com; s=arc-20160816; b=IBN884X0Coe7uBi7h1j832ehl7opSiS5czEy7bAsrmOyjz8Iu55i9A94NJvMYa8Cr6 CGr/AvHK9sDvpTMBOQ/7eJi1yyyI7rbvEwyV2uFkmKKj76YxU4zGTAY/QqxyBgczIaQF 2fwuJ9LE3YPP5g48OvlM6LPxKG1ng9Wzoe3yC0Aem4rAyxSxT3IjB+vOECUU4tqwY47X CO5G0zjMu+p30+0EgtY7eqllxhH3C3ROsk6PaZkSy3LUXOe9QCYbi7fRNntdVkYYRVif NmoO8t3+jE8F3e0VxKmlPuITG0GPc2ZNThJHSgqVVE8G/o1QvIGJx2ag12F9PGHbCIoN OUqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=g5sQMXSMdWuSqvmdQD58X3h1zk5SjaH8Y+Tanu+qv7s=; b=Wke+NjEz8FoOTsPwoXt2AzFynu2b741mv0CZXfJmML91HGV3GRwlDRMXOUHiAHL861 hkfFvJHW6w3tAroLYtovmlB3L10jt92+zf8AiD7JxjkZufGxaETjLzE14iknEvE0Y8A9 AiWx/uwmiAUOf/V811pe/0Vlq8Zm611QyxG5tmk8uDYNxxH+r0rGY3qLPC0+hwR6Sugq OCwYTta7w0xgpEarTwNFIKZDBT06RVEv5nE9FK0571D3YeThKCtjnipabJyqyz2de3J0 g7gwZiXoebsx4z2FT/bkeCq+mmXuZ3jyooXpA3G/DM6LGwJpnuuTpKczqYF/b4WHYtTu IZfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xYd2AltO; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id i2sor25974567pfd.16.2019.10.15.20.33.59 for (Google Transport Security); Tue, 15 Oct 2019 20:33:59 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xYd2AltO; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=g5sQMXSMdWuSqvmdQD58X3h1zk5SjaH8Y+Tanu+qv7s=; b=xYd2AltOxj3y/Ve5vEQPkHNfpCqVzUI4h1Hkf4GwUtrRjBAR3I8+P5vvRXlAMF+VIj lOAoFNsMsXMtTUfsDZmToG3ETzPD4KKFUT+JgO5tIITA5efcDQc7e5ADqNqyf7OnBFo7 8Trebi8naNe9Hrv3Wf8lzKTYnqJv/rBY0PwLAhpC6iOmx5HUgiovPLa/tEUg7wBG1iiu Q4aJv6u02XbtnyN0bEGS6bXVcn/wWy9ewpbWtyWcud7BrGvhVM2CKEdrJqo9/fTpDlwd D7Bhmm6SQvPwc6Wi0UibcLOg/tqbRtIh9CqaWfWS63sbVEk2I4v0MryE86bkFYVz1Ud6 CcrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=g5sQMXSMdWuSqvmdQD58X3h1zk5SjaH8Y+Tanu+qv7s=; b=VWpB8DnBl2msSZ7AwD1U93HxOboVRu+BhrwAscg6pPKfOxAGwDKI2/KKOWjVS29Gvd zUzo8NcJHF1Qt+MH4TtyQa3BxuYCm2Jex9LxL/ufJy8uxt/1kqOrCWKBju7zajVaAcGg 8BfSxdn0Crd46Udkh5Ormly8mhiKIVOaN4MZn7UspOrxWDMkZXyB82TfsLZELCOtQl/J bDpXhDwegTTSAxxosEC6ecTm/EFKfTGHd/kY0nsaY3QLJQLqseboLG+FwS49F9/5yAC/ zbOj9+ZwvWk17/ByJJmKgZBcRuCxBsB3UfYXxTR5MC46ki6RdoNKnU7PnlmVqYMBeLgw vbsQ== X-Gm-Message-State: APjAAAWPxf0PV1c3zKJ7GPTWfoj+2qaym8N88qJrMhb5qsgh8GO1Vu9D wZDFnWp5Io2kUcGZtmqYyohafBd/ X-Google-Smtp-Source: APXvYqxdFeMofjrhcmy13r5JUspDNYDwqOMXH2WgRGuNbN+bj9FrOOgg9uXV3EB0TMfrXMdil541Aw== X-Received: by 2002:aa7:908b:: with SMTP id i11mr42817988pfa.186.1571196839121; Tue, 15 Oct 2019 20:33:59 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id l23sm748356pjy.12.2019.10.15.20.33.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2019 20:33:58 -0700 (PDT) From: John Stultz To: lkml Cc: Yu Chen , Greg Kroah-Hartman , Rob Herring , Mark Rutland , ShuFan Lee , Heikki Krogerus , Suzuki K Poulose , Chunfeng Yun , Felipe Balbi , Hans de Goede , Andy Shevchenko , Jun Li , Valentin Schneider , Jack Pham , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, John Stultz Subject: [RFC][PATCH v3 10/11] dt-bindings: misc: Add bindings for HiSilicon usb hub and data role switch functionality on HiKey960 Date: Wed, 16 Oct 2019 03:33:39 +0000 Message-Id: <20191016033340.1288-11-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191016033340.1288-1-john.stultz@linaro.org> References: <20191016033340.1288-1-john.stultz@linaro.org> From: Yu Chen This patch adds binding documentation to support usb hub and usb data role switch of Hisilicon HiKey960 Board. Cc: Greg Kroah-Hartman Cc: Rob Herring Cc: Mark Rutland CC: ShuFan Lee Cc: Heikki Krogerus Cc: Suzuki K Poulose Cc: Chunfeng Yun Cc: Yu Chen Cc: Felipe Balbi Cc: Hans de Goede Cc: Andy Shevchenko Cc: Jun Li Cc: Valentin Schneider Cc: Jack Pham Cc: linux-usb@vger.kernel.org Cc: devicetree@vger.kernel.org Signed-off-by: Yu Chen Signed-off-by: John Stultz --- 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 -- 2.17.1 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>; + }; + }; + };