From patchwork Mon Oct 12 20:00:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Cooper X-Patchwork-Id: 11833677 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6476292C for ; Mon, 12 Oct 2020 20:02:21 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1EFF9206D4 for ; Mon, 12 Oct 2020 20:02:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="zrVNLLfg"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qyTLhIW0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1EFF9206D4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=k2S3gTBh7NePvS/sF/hwK3s3ghPMMK7hyIF0zc9I5uk=; b=zrVNLLfgj/UlIDPSF35vert1QU xRJUvezDnlxlbVI+oXXtIziFRlKNKRS8htQrVH6ylmggCzXzwJNKYyigFFTj9VVJNGhozt8ASgwHb qP7p808z3mX7/71EVh8+Bjbk2asC0fPByUVgsE4ndEDDLu01X5TVmSGGqDjxNZ3MzhPJ6uoBN2MbP DtIZuRJAK+1lpwmuUZhHEao+3iD+elbi56Le6m7Dnzsm1swaFuWGZCRsbmmvgnpTB8KfTeDxtWscU B/VWTri3N6ikIghJzXWyX8xnAB+jSZe1uZ0JQ+4/3mJhRUgEdofy9nBjs3bjB+v1iCOM5Wy4JQrXy p2Q4ZEWA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kS3zo-0006J8-WD; Mon, 12 Oct 2020 20:00:37 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kS3zi-0006Hj-NF for linux-arm-kernel@lists.infradead.org; Mon, 12 Oct 2020 20:00:31 +0000 Received: by mail-pf1-x444.google.com with SMTP id w21so14565990pfc.7 for ; Mon, 12 Oct 2020 13:00:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WZMccl/fSc9Ch0A1iiQRgWO5Br2L8QOy57a18abEHXk=; b=qyTLhIW0Map0DCfGuRs4bETqgPA1ukwaCuvRfW5Ti1KvZK4EwY0CIzb6kxljvlZyvE AFOPmyx9Iscxf+sh8SKUWwlmbdkHujkv/f1o7PTKDLqjSR6/ETDY2Y0hj0OmSuZCXxM2 PLOXH6cVvuN7EzXnl+6dCN4p2V75dPC+h46JXoCkD6vQ7HeHs9c5LK8kX8I2/qSCEmKo vc8+tPPYB8dqZEUnI1geKxy6guBHJJf41y44PlU7a/pJYFMX9rB2ckPFbfhwZ5ioqszg BVN/i7anf69yUS6QA0gRpUZ0Hp4KbRTOM/vCw0vW17qBrIcAB9NKR5jEZ6U1lz7EaBsu hY3w== 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=WZMccl/fSc9Ch0A1iiQRgWO5Br2L8QOy57a18abEHXk=; b=SGk1kDjrjbiE/9IzbvTCei6b815WVv8quvKrkaazOLDcQcRBUXv2fAd3/AIxthdy0Y xK/brydtBu8VJpXPCk1fB2VgBEQc1Fswz7lcqt66aQRiRSXOrJqvIyO/fQliPnpFX1QJ QVavURcYFMucGgXten60e73vxmOxcZ4t/OioVAyiRfAP7sdiTCW89QZiKr4jECc2FPpx fkiTzH+YBYdUsvnmlUago7FVHGXiehf15tcsebPJsfnwI5WEaKl0Q+RoC9mJlrkQhjed WSMBisi6O7ozmqC/1XibU2/hXGU5FMaWjK6OYrm6lpuYIGP44EY5HmiWggLohqZJNGYl xMbw== X-Gm-Message-State: AOAM530s48FOWdJrGuSeHoNAzfJcPxDLwhDJq5mTHmLQROMFk7uNMs0Z 9pNxURyBFleY2f68q/mF9jA= X-Google-Smtp-Source: ABdhPJx/5WHy1S4sRhK4n9EJ832Bt19hQhlIxvtPVQv2tamP/45LxKgoloK4Ijwu75E2oTNDM65gdA== X-Received: by 2002:a17:90a:ff06:: with SMTP id ce6mr21152224pjb.38.1602532826844; Mon, 12 Oct 2020 13:00:26 -0700 (PDT) Received: from stbsrv-and-01.and.broadcom.net ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id y124sm13556909pfy.28.2020.10.12.13.00.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Oct 2020 13:00:26 -0700 (PDT) From: Al Cooper To: linux-kernel@vger.kernel.org Subject: [PATCH v3 1/2] dt-bindings: Add support for Broadcom USB pin map driver Date: Mon, 12 Oct 2020 16:00:06 -0400 Message-Id: <20201012200007.8862-2-alcooperx@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201012200007.8862-1-alcooperx@gmail.com> References: <20201012200007.8862-1-alcooperx@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201012_160030_802075_758B4F69 X-CRM114-Status: GOOD ( 18.29 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:444 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [alcooperx[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Florian Fainelli , Greg Kroah-Hartman , Al Cooper , Krzysztof Kozlowski , Rob Herring , linux-usb@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add DT bindings for the Broadcom USB pin map driver. This driver allows some USB input and output signals to be mapped to any GPIO instead of the normal dedicated pins to/from the XHCI controller. Signed-off-by: Al Cooper Reviewed-by: Rob Herring --- .../bindings/usb/brcm,usb-pinmap.yaml | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/brcm,usb-pinmap.yaml diff --git a/Documentation/devicetree/bindings/usb/brcm,usb-pinmap.yaml b/Documentation/devicetree/bindings/usb/brcm,usb-pinmap.yaml new file mode 100644 index 000000000000..ffa148b9eaa8 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/brcm,usb-pinmap.yaml @@ -0,0 +1,70 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/brcm,usb-pinmap.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Broadcom USB pin map Controller Device Tree Bindings + +maintainers: + - Al Cooper + +properties: + compatible: + items: + - const: brcm,usb-pinmap + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + description: Interrupt for signals mirrored to out-gpios. + + in-gpios: + description: Array of one or two GPIO pins used for input signals. + + brcm,in-functions: + $ref: /schemas/types.yaml#/definitions/string-array + description: Array of input signal names, one per gpio in in-gpios. + + brcm,in-masks: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: Array of enable and mask pairs, one per gpio in-gpios. + + out-gpios: + description: Array of one GPIO pin used for output signals. + + brcm,out-functions: + $ref: /schemas/types.yaml#/definitions/string-array + description: Array of output signal names, one per gpio in out-gpios. + + brcm,out-masks: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: Array of enable, value, changed and clear masks, one + per gpio in out-gpios. + +required: + - compatible + - reg + +additionalProperties: false + +dependencies: + in-gpios: [ interrupts ] + +examples: + - | + usb_pinmap: usb-pinmap@22000d0 { + compatible = "brcm,usb-pinmap"; + reg = <0x22000d0 0x4>; + in-gpios = <&gpio 18 0>, <&gpio 19 0>; + brcm,in-functions = "VBUS", "PWRFLT"; + brcm,in-masks = <0x8000 0x40000 0x10000 0x80000>; + out-gpios = <&gpio 20 0>; + brcm,out-functions = "PWRON"; + brcm,out-masks = <0x20000 0x800000 0x400000 0x200000>; + interrupts = <0x0 0xb2 0x4>; + }; + +...