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: 203421 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp205273dyc; Mon, 19 Feb 2024 21:32:22 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWtPTTo7oEWBkFucl+/W8+M3OdDnvvxvbf7zlGfT/GmfI/NBXPIpymtzfAqhiz2YW7hBpv2gcSjyamXs+9RlankxFZPHA== X-Google-Smtp-Source: AGHT+IFqF+xUqIYPWckupqUIFWgLieyAYod0595sIQsWGdydtrRPZb/WX6l4pxoUI3ZY7br9oifM X-Received: by 2002:a05:6a00:a14:b0:6e4:660f:b0a9 with SMTP id p20-20020a056a000a1400b006e4660fb0a9mr4083671pfh.15.1708407142747; Mon, 19 Feb 2024 21:32:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708407142; cv=pass; d=google.com; s=arc-20160816; b=Z/uCdrDb3ian7pZOiT9aN8zalW1avglakfclLcESRNjWkrLSeTtiRqj6HCJXxrg3I8 Fo9aL2nJbA1wbIeCCJC7A8QI0y9x7Fr8/otlMJbRxivpo2OG2WKisaaFianyIQn0sjj6 UQqXz+QShoXPQThjYsh1hRrBJlTkwUdmYaQn+g/GJ5VQ1VMxafUpCFUPMOPKyXOHBSFo O7yRRCzNkw4IOm3iyHuQjzjIXrsBaIlsSR1NhirvvfyBGIJCLHy+oOuIVrs0jbs6gprZ p6BR2WLlY0BNwi2LgNZa4gtLtpeQhx0c7vHi+bdpSOwdPi3+vTRkCDL5wSZ/eV7ML1Ae /+fw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=RC+oSMc6iDLJYtt5j6GYdiwaUC7wlQ9/FczjAjFGTtg=; fh=5ZX2TjE5w7A9Jy/zLbQp9yZpyG4gO1rGu8nV8y2toZU=; b=ZYCoZCXE9w2qKKHVCSwh9aCJuELi5u9rQ++qPwu2g+8hDbjPCA0epGAnQoKvw00wfj 5tNgDG/P9tpYBk/YWzdyAMLtmIhz2X6c2FaMz6M1wBarXR+TSPHFnnaokC4WBO+O/XsH nApJIcE1XjRrAw3CJC/avMJghQplOXx9fVhIDgoGwjUCH4Z7lyL3e4KFwl0hoZmmjzmN XENcROi95Q4ZmYoE5Ppya8xP5bsuavWMLp3k+9yzz5+rhrE9CfPrx1Edg13yMoKNDp4u D5j8u0Et7Ywl34zlDI5DKmHhQ35EIxQbD6MmJ4ZQbP8kyAE4rvYQgiBq/0Ld8pzU2S9z HdFg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@codeconstruct.com.au header.s=2022a header.b=DOAq8eUO; arc=pass (i=1 spf=pass spfdomain=codeconstruct.com.au dkim=pass dkdomain=codeconstruct.com.au dmarc=pass fromdomain=codeconstruct.com.au); spf=pass (google.com: domain of linux-kernel+bounces-72345-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72345-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=codeconstruct.com.au Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id x7-20020a656aa7000000b005e0b2413677si4872237pgu.552.2024.02.19.21.32.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 21:32:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-72345-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@codeconstruct.com.au header.s=2022a header.b=DOAq8eUO; arc=pass (i=1 spf=pass spfdomain=codeconstruct.com.au dkim=pass dkdomain=codeconstruct.com.au dmarc=pass fromdomain=codeconstruct.com.au); spf=pass (google.com: domain of linux-kernel+bounces-72345-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72345-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=codeconstruct.com.au Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id D9174B21BB2 for ; Tue, 20 Feb 2024 05:30:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1ABD857333; Tue, 20 Feb 2024 05:29:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=codeconstruct.com.au header.i=@codeconstruct.com.au header.b="DOAq8eUO" Received: from codeconstruct.com.au (pi.codeconstruct.com.au [203.29.241.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A837845942; Tue, 20 Feb 2024 05:29:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.29.241.158 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708406992; cv=none; b=r5uRJ8FDWXBKG3gUGhGlyM49k4smmLa9ZkVyo+QaxZQMj6DiV7etaAXUTjBteHLOh2yIUMEqTYgkgPfViO/O40oaU23Z8+kX1CVDaFhQ44QAoKnjM1mQpkh5/951Vo4190lQGrnBPo1moiUxxVrWJLJyO+3iMHOBVDFy25khEHU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708406992; c=relaxed/simple; bh=QR0gzyGs5YxERaIsCIv49dWaMmIr1bZHcHw0GqqHo9s=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=pVjJhtoN5AStqycQKAH9LY8pwVfuQ7wMvOGlgUHrPns+uTZjFD3bw4Vrfeotsl2C5t5zlcyK6ch4sTdzes7Kd8sR7Vrk4B9E67h9DbuRlO4+p233QGZJtPcMAXfLN2sLAMhMhZhbZQRqktjHPe70aNkiIAZhnATSTQgoieNQIik= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=codeconstruct.com.au; spf=pass smtp.mailfrom=codeconstruct.com.au; dkim=pass (2048-bit key) header.d=codeconstruct.com.au header.i=@codeconstruct.com.au header.b=DOAq8eUO; arc=none smtp.client-ip=203.29.241.158 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=codeconstruct.com.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=codeconstruct.com.au 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791394727788446857 X-GMAIL-MSGID: 1791394727788446857 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; - };