Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp280732ybg; Thu, 17 Oct 2019 23:00:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVOT8XHUZm0Mt0RNeD188Ibh3FlBTP7l4K6ct26cx2QVWcUci+enEuc6ebrZUm6ZMv94gT X-Received: by 2002:a17:906:c49:: with SMTP id t9mr7062122ejf.267.1571378443273; Thu, 17 Oct 2019 23:00:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571378443; cv=none; d=google.com; s=arc-20160816; b=SczmANK0FITvxgxVXgvAO6yB793ueQ526i9lrCQ5HTn8dFoDv3qlRvkVNwPlqt0q5L oH6UvEGEts85n7q5iKYvwepzmMdzSiyChpnfgpD3db2KFwUMk2tTUdQKoF9UfdDoWbQF dedJsFZ+X+vkE3hnKISiSkyIkqFzUhUlTUOstSu2rGQc/aIn/xkIpRUe4y6mGjtm9LpO 2OFwZ+e5AIPHZ9rU9yOyzb3wu8mXNUNVZTpB57r/XiS3t7VGFE+ls8VNCX0mwwa1pDQg C2t+h9eDFCaoAvLYfQmD7i8f8UART+w5XyqDrKp8WW1YcDkUAp1xXa7Ekm1s7SOoDvNn yJnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RSNYgN3xa7Wn9y39HNKCBoTixs9Vyw+6lp44Vh1/gxU=; b=yEftrRX8/7ly2/OBzwaykEvYc7lZgPizit9imxue3EMy1Jw4OjvNRr6YtztO9r0qRg aYLXyjQAjromOTxsnhMId26UY5nH7gX/37Pm8Y9LK9aT/Ox+vefMr7u6z113vPci18Sc rOHz9lLmoTPwxY/p43CxKLIrCtwV7F7WFen9j55DmBOyIgqbWSP63vsphsvWk2jKclGZ 362nt9US+XSQfvX8oJGin4WzKMkenRcEm3YUcj9Ddol4XEmk0+SV27V8gvYfhTikRP3N aJXQrXUFavBl/gu9k+TVKQKz+gL/UuyFmHxRu/yfo2kJqLY9GYGmaCxxwQAITp/L1p0W SZZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=m7MNOAAR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alliedtelesis.co.nz Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x19si2770191eju.15.2019.10.17.23.00.19; Thu, 17 Oct 2019 23:00:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=m7MNOAAR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alliedtelesis.co.nz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407476AbfJQDLB (ORCPT + 99 others); Wed, 16 Oct 2019 23:11:01 -0400 Received: from gate2.alliedtelesis.co.nz ([202.36.163.20]:48892 "EHLO gate2.alliedtelesis.co.nz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404445AbfJQDLA (ORCPT ); Wed, 16 Oct 2019 23:11:00 -0400 Received: from mmarshal3.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id 2DC4C891AB; Thu, 17 Oct 2019 16:10:58 +1300 (NZDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1571281858; bh=RSNYgN3xa7Wn9y39HNKCBoTixs9Vyw+6lp44Vh1/gxU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=m7MNOAARevCrchHDWRurTIPyJPZa82fuDTngXhggE7Lis79i0qwy1kVwTRTYFpOaB kMQgjLKd37/93Ys2iI5BmZ7SpmI20DYGD2W55nFh9dGhK1z1CsZQD+VFbsSm30JLNO hYQj8TRt7dFefXQEQxSxhx893/dmQCkpLFQWgME+Bf5GmO91SAZ1JIP90GYQjbEXqC 64CQzEgFLH3c6jdf4lsXH7oDGEB801k1CMKWh/DZdw2k8wW07CRRXNPkk6mvlo4x6Q mIn7d6XK1fjlMhvyZRlhIdEAOk5rHwhEO0RbGLiK4ToWU57vuS6OKBkEcIBoQJsssT yWdOGw7qSHkOQ== Received: from smtp (Not Verified[10.32.16.33]) by mmarshal3.atlnz.lc with Trustwave SEG (v7,5,8,10121) id ; Thu, 17 Oct 2019 16:10:58 +1300 Received: from chrisp-dl.ws.atlnz.lc (chrisp-dl.ws.atlnz.lc [10.33.22.20]) by smtp (Postfix) with ESMTP id 1BC8D13EEB6; Thu, 17 Oct 2019 16:11:02 +1300 (NZDT) Received: by chrisp-dl.ws.atlnz.lc (Postfix, from userid 1030) id 08B05280059; Thu, 17 Oct 2019 16:10:58 +1300 (NZDT) From: Chris Packham To: linus.walleij@linaro.org, bgolaszewski@baylibre.com, robh+dt@kernel.org, mark.rutland@arm.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Chris Packham Subject: [PATCH v2 1/2] dt-bindings: gpio: brcm: Add bindings for xgs-iproc Date: Thu, 17 Oct 2019 16:10:50 +1300 Message-Id: <20191017031051.20366-2-chris.packham@alliedtelesis.co.nz> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191017031051.20366-1-chris.packham@alliedtelesis.co.nz> References: <20191017031051.20366-1-chris.packham@alliedtelesis.co.nz> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable x-atlnz-ls: pat Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This GPIO controller is present on a number of Broadcom switch ASICs with integrated SoCs. It is similar to the nsp-gpio and iproc-gpio blocks but different enough to require a separate driver. Signed-off-by: Chris Packham --- Notes: Changes in v2: - Document as DT schema - Include ngpios, #gpio-cells and gpio-controller properties .../bindings/gpio/brcm,xgs-iproc.yaml | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/brcm,xgs-iproc= .yaml diff --git a/Documentation/devicetree/bindings/gpio/brcm,xgs-iproc.yaml b= /Documentation/devicetree/bindings/gpio/brcm,xgs-iproc.yaml new file mode 100644 index 000000000000..71998551209e --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/brcm,xgs-iproc.yaml @@ -0,0 +1,83 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/gpio/brcm,xgs-iproc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Broadcom XGS iProc GPIO controller + +maintainers: + - Chris Packham + +description: | + This controller is the Chip Common A GPIO present on a number of Broad= com + switch ASICs with integrated SoCs. + +properties: + compatible: + enum: + - brcm,iproc-gpio-cca + + reg: + minItems: 2 + maxItems: 2 + description: + The first region defines the base I/O address containing + the GPIO controller registers. The second region defines + the I/O address containing the Chip Common A interrupt + registers. + + gpio-controller: true + + '#gpio-cells': + const: 2 + + ngpios: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 32 + + interrupt-controller: + type: boolean + + '#interrupt-cells': + const: 2 + + interrupts: + maxItems: 1 + +required: + - compatible + - reg + - "#gpio-cells" + - gpio-controller + +allOf: + - if: + properties: + interrupt-controller: + contains: + const: true + then: + required: + - interrupts + - '#interrupt-cells' + +examples: + - | + #include + #include + gpio@18000060 { + compatible =3D "brcm,iproc-gpio-cca"; + #gpio-cells =3D <2>; + reg =3D <0x18000060 0x50>, + <0x18000000 0x50>; + ngpios =3D <12>; + gpio-controller; + interrupt-controller; + #interrupt-cells =3D <2>; + interrupts =3D ; + }; + + +... --=20 2.23.0