From patchwork Thu Nov 28 05:10:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 180372 Delivered-To: patches@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp7063003ilf; Wed, 27 Nov 2019 21:10:12 -0800 (PST) X-Received: by 2002:a62:1447:: with SMTP id 68mr5172018pfu.53.1574917812300; Wed, 27 Nov 2019 21:10:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574917812; cv=none; d=google.com; s=arc-20160816; b=ZpV9P4oIz20SpHbfVR70YEBlKw/Pnro8CyuW2EW+8lyP8FpDmqVVQnoBmO1KXYlwBC KiwTFRqivVaK8oGdRruu4DeFCHjjF16A22wSPCLns2YMH2rfv5ztZvQEHHe0qLV/Ac2x CSMZqMIlfCFmSuTJTJ3a27N7v4gNGvq7Owh9u2hR90gi/quWyTWXz4jglHFvNbLhIyzy 4YsT89LnTdpZpMvaQadjx/WrxDzX2daLHWqC6y3t35YoKgMxI+sjfMhoGajW8FhmAgSR D/bBjm0U0fY5U1LaVCuNTDi2K8X9vppSoUdUq1aLIJ2oTIUMm8aD+SiMk38kJza78vvE iylw== 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=VUmL4qLsieRvwPq6R62FHNU4t8q1oQ82Y1SNhYOmg5k=; b=DQJsXwJ4PWToYeD07f3Au9e7Z3sIX2rpX46vYZ6CWm8ETm5POUjsgdkvsx2iN+T4eS Ge98nnZSYnhlOnQ1189LzFHEgoSlTtlVln+F5grmItbj2GpwZppQdgHDRFaAKxIIhJ6+ UpIuDXCY6oLwjH7DsQ/OP29Wmpynd9o+dKAGLyOZu5LAyRDVobRB607JJSSWk6goCYdc QbzOFNmq+3j9g4Oopv7gZH92mQ5nhaer1kbGZcWaUQz5+tSvmn7awfztY/C/0vKYbXVP pW+BxsXbcD1v/j0udeR1kShTOOJoO3xmW/YYbg7uJv7XZBb/R7I7emija2DJl+/9c4BM jp3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="D/EdEpZq"; 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 fa22sor10932159pjb.0.2019.11.27.21.10.12 for (Google Transport Security); Wed, 27 Nov 2019 21:10:12 -0800 (PST) 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="D/EdEpZq"; 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=VUmL4qLsieRvwPq6R62FHNU4t8q1oQ82Y1SNhYOmg5k=; b=D/EdEpZqCCtTGiwmEC6gq+PCA/Y+yTDJREnWu59+lBpHibMPIellRcG6NR3zwBZ/xx OLmVSLIv3eX7q3wLN9j+c2n0JjO5XplIw9WMd8uSDYe9OF95xpsuAd8rk29X/Hd+01Tj W77VEvKvNu60Xa6aMADiIWzQknKzchQvsD3dVqfzNqGHNe3VmiYARrwxWMJ4D1w0fl0K YRo62TEYKYB4WuHdY/Xeige/XvQ222CnRfEmh67QgYKqArYKhs+IjP/Xf4D9lvoyCumN HsH+6Y+XfFdBvJGolCgcSWJYxQkhAOebHTwJaN77THPerQMMc+RHJoa0BAYcxkRiZkBZ XZ7w== 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=VUmL4qLsieRvwPq6R62FHNU4t8q1oQ82Y1SNhYOmg5k=; b=gYkESfDNxBjliu0oVycNFmUADyFngLlR+d1XuohbsER36hJC2T3Lqy+xcmr25xe+Il uzEmVGytFj8995XzwuGVKJWVr39tV8Xr2RW+uy7dg0jW50zzkcn7Q1Xw3EXavkqE1sIa T3rWwIIiv1pP3/Tb9OwWp3d3HnV6DapM0u1HVD6cin2z/iHv+ebJ4xv8nGx1h3nNNIKp Ulp14u7A/1HK/UMduRaGcWq/PmteTS7EYi/YE05VIYySydTn1aGcPHXanCExQRgRJRX+ 1yqEXyXENRwfM3zFqWgi2KD1Pa2s230u1jvYXWBHmkwmbnp7AuYNqmS8RmxbRlSS5Fo3 LYmg== X-Gm-Message-State: APjAAAUbMAcpgLeOrIS7c9DyKk3OO0Gekx8eTIweEj8yzZFteqeT16wJ HY4/V8dibwsrsv0qdK1Ccy2aQUPG X-Google-Smtp-Source: APXvYqw1Rx241aQ1QD+PueNp8aW3lcCk1ns7N57sTu49O5IMq1I9NZ4kt+Nn94dM2CeRSzBJKvW8ow== X-Received: by 2002:a17:90a:65cb:: with SMTP id i11mr10354421pjs.23.1574917811857; Wed, 27 Nov 2019 21:10:11 -0800 (PST) Return-Path: Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id j20sm17799838pff.182.2019.11.27.21.10.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Nov 2019 21:10:11 -0800 (PST) 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: [PATCH v6 7/8] dt-bindings: misc: Add bindings for HiSilicon usb hub and data role switch functionality on HiKey960 Date: Thu, 28 Nov 2019 05:10:00 +0000 Message-Id: <20191128051001.18995-8-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191128051001.18995-1-john.stultz@linaro.org> References: <20191128051001.18995-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 Change-Id: I3f111b39b7a982b3489549076412a2f7c3c3d008 --- 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>; + }; + }; + };