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: 1201881 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) 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=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="D/EdEpZq"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 47Nm1D332Gz9sPn for ; Thu, 28 Nov 2019 16:10:24 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727318AbfK1FKQ (ORCPT ); Thu, 28 Nov 2019 00:10:16 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:34678 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727218AbfK1FKO (ORCPT ); Thu, 28 Nov 2019 00:10:14 -0500 Received: by mail-pl1-f193.google.com with SMTP id h13so11077067plr.1 for ; Wed, 27 Nov 2019 21:10:12 -0800 (PST) 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=AJ10kPb904uz6VZz/UaEhmkRZQ6DglqiIbEGrvIf8c3jJn/aiNKnACusu9kth65RZG Okrler/ShzpTAl8uZRs1zFWu+medMYf82skcIzjJZO48jyiusPpGE97PR+raGwao5RF+ wPtVRN7Ph0UYr4f7ey+PE1e+ZZ4z+odw8MvwOFCwZp+0kmSyGUS9pguXAgYu5Acty7nW GXTZYkhUTJwkmEOs/EsPYCwdjUkxwq2vBcByzZQMORugS0ytZpq5FWVWc/y4OuKY9zoo a5yRY8wG3p0jI0z9R8g/T+RLGU4I2t2gXmSU1cyYfyGpk5otPDXf2C9H80/nvYI60fsA JPqw== X-Gm-Message-State: APjAAAVeS8cIF3jGnBem/1KH/s6r/8ZUNwIAYrNPQkVTK4efsT9wWwmZ wx7YHdeknApE1PzeWrP9KoV8zw== 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) 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> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.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 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>; + }; + }; + };