From patchwork Fri Oct 9 19:08:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Cooper X-Patchwork-Id: 11827117 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 B6BA514D5 for ; Fri, 9 Oct 2020 19:10:57 +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 7D6402222C for ; Fri, 9 Oct 2020 19:10:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZXGxK0ry"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iiikoazA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7D6402222C 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=ZXGxK0ryLQj6UEiDyMphAFRCYd 0hOf16ww6DhCQ9A3djWrzLPvHyY0ePTsLd+PIzxNnFopgSYram9iCfpBSQgHoxUjMZTAM6qr0DdOT B2bRYbXAyk6dv2cVowkAV47Mzbcka+jqK9cZMt3LUPhPmbcw19bCujvcUlCpZv5+4+2ul4eiGDWOB H3oxlFgHsjbwJCcn+a+t5q56mxcnk7DZBtcbgZ23hEhQszhRfwK2lEW/g62lLAvdO1KS+Os1KUOJs 1zD0zKSf1PUEbqZvwbYOjvNjCjKirPDUkfhUo2nvaZoccR6/3sR9FYLoDFsFj9WM6j/HrK5Mhzu8A 9WR7bGxA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQxlC-0005E1-Sj; Fri, 09 Oct 2020 19:08:58 +0000 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQxl8-0005C7-Ah for linux-arm-kernel@lists.infradead.org; Fri, 09 Oct 2020 19:08:55 +0000 Received: by mail-pg1-x541.google.com with SMTP id 34so7923016pgo.13 for ; Fri, 09 Oct 2020 12:08:52 -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=iiikoazAc/u+rJgyAMFx1ZzeTIYrdnmm+A9b0iRz2qK7EW6uwB2yvn8AyfuFBGU487 LQO0zIyp1zIBlGlG+6NliPZvMYVjA4aDlPQdz4JHpdHtD39y9SE8Kokuh7yJS6nKVL4h S5ypTpPqH8C9JhOTPVb6tAuYRLtzCIDWFmZB1vpgTK9tI7BHasrldONSd3vUfyjm1YtR XPIJExZXYZJFaTjjexM0UiXPlkiO73dgwaDeThP7dHT3IIq/dK6FZlK7jnqwWZ0547Wh 6im9ia5vRnHPyRz+klHTGfqpWLd+M+QpHSSp6OnBIx8sAacGgdxxJRVWli5xkSSldJIV I5fQ== 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=PdWmYpenGuI634C3YMLmNhZncJXBYRffh9FJTuDKusfJuVv9Rl4/U1c+HWXGkR4fRc UPpU9/0UttfqXUaG1aclq1fAFJPGfY0xvp7g3iXH0OMkPt9U2dkjhg6bEZ3u/10z8FfN g1XcZWD+f8qfTDdfjRcubIGbJqfT1PfE/cVm8y04aMKQ6ohQTdtm7OXxLdnBcYckVUyx NvtfSw09V/zP4XU10v4f0ilrlFFnEQZdTU3tDquXFseECwxYueLd6tatvZcsHfMij1qB F02l8eAv95WuJz4+393XX8+JzZ6J/WRnzPfuPkBIfci9VMob4mONnU8fBn6iGJLNFWvs K+7w== X-Gm-Message-State: AOAM533k8qzQHOqQwh1au/ucyOYORNzf3mdqvqeCija4rbA/itWV5iBi JJ3lOzoTlKqJlWT9qHZndeQ= X-Google-Smtp-Source: ABdhPJzB9ySBJEB0vlB1pTiKMs2oUy6kzpC1nvyR/7MYCgt8iU9SelrbyWSXmxTtZHgZH1yO6RuXYg== X-Received: by 2002:a17:90b:3716:: with SMTP id mg22mr6388508pjb.83.1602270530852; Fri, 09 Oct 2020 12:08:50 -0700 (PDT) Received: from stbsrv-and-01.and.broadcom.net ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id o20sm12281043pgh.63.2020.10.09.12.08.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Oct 2020 12:08:50 -0700 (PDT) From: Al Cooper To: linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] dt-bindings: Add support for Broadcom USB pin map driver Date: Fri, 9 Oct 2020 15:08:38 -0400 Message-Id: <20201009190839.12612-2-alcooperx@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201009190839.12612-1-alcooperx@gmail.com> References: <20201009190839.12612-1-alcooperx@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201009_150854_390230_C775404F X-CRM114-Status: GOOD ( 17.94 ) 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:541 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [alcooperx[at]gmail.com] -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 --- .../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>; + }; + +...