From patchwork Tue Feb 20 05:29:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 13563406 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 59EBEC48BC3 for ; Tue, 20 Feb 2024 05:30:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=RRr5k7ojZZ7879FYK3jfptNy4VZCrQlQmGqRP2lWaVo=; b=Fk0+quCq2pcyUz hyfoDQqm0KIfRn45/Ouh1Y8aORzwo7oL2lxN9tmpZ4iM9/38BRru4ujZ4xlW+QXcY7gFAOXGYnn1S A1gwZGt4s9hXKpuOqz4BwYnYI9qawX6c27WSkjBIk/hP0/NnVowFQ2BgHsstBrZalZ+8A9lJMKAlt dzwosvCUOVKbNUcAZKDugnHC4XwxBdeIKQ7N0mUwwJBqFLpiEcFkthWcw9ik5bfhcfOkt72p7hU5K MwLkGc1aK7Rj/xxTP4jSNTyD50fmF19SJWndcBgJgUGYKKJ93puVjS0YV6dvN2yVYMA4UqrflSNXF TMACjxKzckIsplXjMAkA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcIhc-0000000DDU0-0xVS; Tue, 20 Feb 2024 05:30:00 +0000 Received: from pi.codeconstruct.com.au ([203.29.241.158] helo=codeconstruct.com.au) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcIhY-0000000DDTA-2bmA for linux-arm-kernel@lists.infradead.org; Tue, 20 Feb 2024 05:29:58 +0000 Received: from localhost.localdomain (203-57-212-238.dyn.iinet.net.au [203.57.212.238]) by mail.codeconstruct.com.au (Postfix) with ESMTPSA id 742FA20016; Tue, 20 Feb 2024 13:29:43 +0800 (AWST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeconstruct.com.au; s=2022a; t=1708406987; bh=RC+oSMc6iDLJYtt5j6GYdiwaUC7wlQ9/FczjAjFGTtg=; h=From:To:Cc:Subject:Date; b=DOAq8eUOhVDC3JkA/XECAtxXT0bve2h4h7mwzy+tyYDIGJ8DBd6hTv1vZ8Moj8Ezi kQKsB4NClwz4XCG2/Wv/jkaT1JEMOdfi91VZBNB8jb7/g8hYe1HFpBb/vPhFum2y+B aAZl2fmdEzpGH8X2F/eOIDaK1QquMaFXWfQ1D1lqXRogtZtEbApemW4R6f8wkD/mCa KIpbgj8LfZUZz5ZctXeeYQGj7BQAtsMcl4DvJj5eQrlaIQPZQSbzAdbju++7h2nSs9 I1X5rRY5vuKyyRYhcenrQJXUI/IpfofMtMbawRvSAYViNNyFVMcAc5zDhMfQT9C37T nk8ealb94C4Tg== From: Andrew Jeffery To: linus.walleij@linaro.org, brgl@bgdev.pl Cc: Andrew Jeffery , robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, joel@jms.id.au, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH] dt-bindings: gpio: Convert Aspeed binding to YAML schema Date: Tue, 20 Feb 2024 15:59:18 +1030 Message-Id: <20240220052918.742793-1-andrew@codeconstruct.com.au> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240219_212956_884520_99A533FC X-CRM114-Status: GOOD ( 15.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Squash warnings such as: ``` arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-galaxy100.dtb: /ahb/apb@1e600000/gpio@1e780000: failed to match any schema with compatible: ['aspeed,ast2400-gpio'] ``` Signed-off-by: Andrew Jeffery --- .../bindings/gpio/aspeed,ast2400-gpio.yaml | 64 +++++++++++++++++++ .../devicetree/bindings/gpio/gpio-aspeed.txt | 39 ----------- 2 files changed, 64 insertions(+), 39 deletions(-) create mode 100644 Documentation/devicetree/bindings/gpio/aspeed,ast2400-gpio.yaml delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-aspeed.txt base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d diff --git a/Documentation/devicetree/bindings/gpio/aspeed,ast2400-gpio.yaml b/Documentation/devicetree/bindings/gpio/aspeed,ast2400-gpio.yaml new file mode 100644 index 000000000000..353c7620013f --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/aspeed,ast2400-gpio.yaml @@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/gpio/aspeed,ast2400-gpio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Aspeed GPIO controller + +maintainers: + - Andrew Jeffery + +allOf: + - $ref: /schemas/gpio/gpio.yaml# + - if: + properties: + compatible: + contains: + const: aspeed,ast2600-gpio + then: + required: + - ngpios + +properties: + compatible: + enum: + - aspeed,ast2400-gpio + - aspeed,ast2500-gpio + - aspeed,ast2600-gpio + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + description: The clock to use for debounce timings + + interrupts: + maxItems: 1 + + interrupt-controller: true + + "#interrupt-cells": + const: 2 + +required: + - compatible + - reg + - interrupts + - interrupt-controller + - "#gpio-cells" + - gpio-controller + +unevaluatedProperties: false + +examples: + - | + gpio@1e780000 { + compatible = "aspeed,ast2400-gpio"; + reg = <0x1e780000 0x1000>; + interrupts = <20>; + interrupt-controller; + #gpio-cells = <2>; + gpio-controller; + }; diff --git a/Documentation/devicetree/bindings/gpio/gpio-aspeed.txt b/Documentation/devicetree/bindings/gpio/gpio-aspeed.txt deleted file mode 100644 index b2033fc3a71a..000000000000 --- a/Documentation/devicetree/bindings/gpio/gpio-aspeed.txt +++ /dev/null @@ -1,39 +0,0 @@ -Aspeed GPIO controller Device Tree Bindings -------------------------------------------- - -Required properties: -- compatible : Either "aspeed,ast2400-gpio", "aspeed,ast2500-gpio", - or "aspeed,ast2600-gpio". - -- #gpio-cells : Should be two - - First cell is the GPIO line number - - Second cell is used to specify optional - parameters (unused) - -- reg : Address and length of the register set for the device -- gpio-controller : Marks the device node as a GPIO controller. -- interrupts : Interrupt specifier (see interrupt bindings for - details) -- interrupt-controller : Mark the GPIO controller as an interrupt-controller - -Optional properties: - -- clocks : A phandle to the clock to use for debounce timings -- ngpios : Number of GPIOs controlled by this controller. Should be set - when there are multiple GPIO controllers on a SoC (ast2600). - -The gpio and interrupt properties are further described in their respective -bindings documentation: - -- Documentation/devicetree/bindings/gpio/gpio.txt -- Documentation/devicetree/bindings/interrupt-controller/interrupts.txt - - Example: - gpio@1e780000 { - #gpio-cells = <2>; - compatible = "aspeed,ast2400-gpio"; - gpio-controller; - interrupts = <20>; - reg = <0x1e780000 0x1000>; - interrupt-controller; - };