From patchwork Wed Feb 1 17:54:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13124818 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 B6240C38142 for ; Wed, 1 Feb 2023 17:54:25 +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:Subject:From:Cc:To:MIME-Version:Date: Message-ID: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=81HlQrRNxHjW8YGLjVi+sxjacLrr5MghnOAmbKLCGco=; b=wF9dptr6NBq6ma L/L+TByydDl2Ws1wzycjycVO3RuMnq7J7lM10p2pS8ww7E1Oln/bvU/s0Q4PDO49FVskfuPVAkgmy 0ywUpWvkra79v8SQqRHlFmZuLWa13275UOWwi4x/ZdFrZDUKigk+tev2joT19PizvdEPTqiX4jCMK 4ASO9XA3Gy6QDQveOWieGuLboU8JKVjUKj0IRDNt46cTQfd4+mhUdlvltWELlXJh7Lno0Z6naLR5m fq6xxX1OS0+ob9Hv7IMybHy8s6mm7ZJK0ghR8Sw1m6zLSi1+emQZsbnrMo6zsSVRnzNtzn03Wolgh ZYICMorpqMzBXPDaR9iQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNHJG-00D5OW-Sf; Wed, 01 Feb 2023 17:54:14 +0000 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNHJD-00D5N7-40; Wed, 01 Feb 2023 17:54:12 +0000 Received: by mail-ej1-x62e.google.com with SMTP id qw12so37838392ejc.2; Wed, 01 Feb 2023 09:54:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:subject:from:cc:to:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=n8ap3SgLgteZF/8WdEckswPZaYBHI0YNKX/dzmMwZiQ=; b=CeiRkE4HZ91nkhnqKXD89CkqJ+lJgmfpk7ipEdCIAvKLK6rxg6J/szMbRWg4It9eu8 1tz8QzcErkbtajk8L8AaFL4nbYJ00zc9cdBTx5+EobQ3+UNt6spKEOkZVo0omQFHhLNi 2ujaw/7sofsFyTE5s+z4fmYH3OjIuHXuKNDmHSmlPHnKIQYBzTZTZlTtpe9WWwqitZ2P e1oUL8VL2CvGtGAokymB1sOAz0W112rOS6dWhRPHxk/0H0oz8XvtFJuXkIYc3BKYq4gl 4AkkyhjbZ4Qpj2v5OABcPnePSekhEklomExURazP5wg14+8qn60xC7HMbPj0f0kRedjd iKlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:subject:from:cc:to:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=n8ap3SgLgteZF/8WdEckswPZaYBHI0YNKX/dzmMwZiQ=; b=A9vZtM0djl/IEy8cLklo7pXXgMk1rMBKr2AA3RVgB97K4wuTsE6ft5/bEybmBrmn7+ zctkV2LePW7vmTFNAFEhIx3lbCa2/nC+fQs/8ReK7KQpg+A5+gHN27fLbRYbGqncuTQT +eLwiQvarYzoXGNFUKUvmtsf4dCRDoFKkvyQIehwssffIaZ5SntRX8qBfw+0KRj2geAb l9Hl4rrpJtgQMa7nqrW/fF7AtX9cAweKY9NrmADeRiXEl5O4HCFutDW7qGaGaclVmWGT d2zkhueDfSS/niR9fOVpa6MlAD8S+VnI5bF84rKtPzvBmdXoKxuWXC80wEHqeL14drtl g2Gg== X-Gm-Message-State: AO0yUKWHtYlqFQ0pXYhgp02vcALeQwEmj1/qZSUHE0ktODFdYFx/kboa KehWQd3SRE3VX2k75CG5pSE= X-Google-Smtp-Source: AK7set/akvpcX1Y5UxRRrNHlE4CtK2yiOvZxBvaVxy7VwrPT6j1I8Z/9UUmULW/eHoD2wKDndHMS9w== X-Received: by 2002:a17:906:bcf6:b0:84d:4493:c83f with SMTP id op22-20020a170906bcf600b0084d4493c83fmr3355489ejb.6.1675274048622; Wed, 01 Feb 2023 09:54:08 -0800 (PST) Received: from ?IPV6:2a01:c23:b912:d400:3963:7bc4:12b:ddb3? (dynamic-2a01-0c23-b912-d400-3963-7bc4-012b-ddb3.c23.pool.telefonica.de. [2a01:c23:b912:d400:3963:7bc4:12b:ddb3]) by smtp.googlemail.com with ESMTPSA id es12-20020a056402380c00b00488117821ffsm10088037edb.31.2023.02.01.09.54.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Feb 2023 09:54:08 -0800 (PST) Message-ID: Date: Wed, 1 Feb 2023 18:54:02 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Content-Language: en-US To: Rob Herring , Krzysztof Kozlowski , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Thomas Gleixner , Marc Zyngier Cc: "open list:ARM/Amlogic Meson..." , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" From: Heiner Kallweit Subject: [PATCH v4] dt-bindings: interrupt-controller: Convert Amlogic Meson GPIO interrupt controller binding X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230201_095411_192923_9E2EC460 X-CRM114-Status: GOOD ( 19.15 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Convert Amlogic Meson GPIO interrupt controller binding to yaml. Signed-off-by: Heiner Kallweit --- v2: - consider that more than one compatible may be set - remove bus part from example v3: - remove minItem/maxItem properties for compatible v4: - sent separate patch to fix order of some compatibles in dts. - this reduces compatible fallbacks complexity --- .../amlogic,meson-gpio-intc.txt | 38 ---------- .../amlogic,meson-gpio-intc.yaml | 72 +++++++++++++++++++ 2 files changed, 72 insertions(+), 38 deletions(-) delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/amlogic,meson-gpio-intc.txt create mode 100644 Documentation/devicetree/bindings/interrupt-controller/amlogic,meson-gpio-intc.yaml diff --git a/Documentation/devicetree/bindings/interrupt-controller/amlogic,meson-gpio-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/amlogic,meson-gpio-intc.txt deleted file mode 100644 index bde63f8f0..000000000 --- a/Documentation/devicetree/bindings/interrupt-controller/amlogic,meson-gpio-intc.txt +++ /dev/null @@ -1,38 +0,0 @@ -Amlogic meson GPIO interrupt controller - -Meson SoCs contains an interrupt controller which is able to watch the SoC -pads and generate an interrupt on edge or level. The controller is essentially -a 256 pads to 8 GIC interrupt multiplexer, with a filter block to select edge -or level and polarity. It does not expose all 256 mux inputs because the -documentation shows that the upper part is not mapped to any pad. The actual -number of interrupt exposed depends on the SoC. - -Required properties: - -- compatible : must have "amlogic,meson8-gpio-intc" and either - "amlogic,meson8-gpio-intc" for meson8 SoCs (S802) or - "amlogic,meson8b-gpio-intc" for meson8b SoCs (S805) or - "amlogic,meson-gxbb-gpio-intc" for GXBB SoCs (S905) or - "amlogic,meson-gxl-gpio-intc" for GXL SoCs (S905X, S912) - "amlogic,meson-axg-gpio-intc" for AXG SoCs (A113D, A113X) - "amlogic,meson-g12a-gpio-intc" for G12A SoCs (S905D2, S905X2, S905Y2) - "amlogic,meson-sm1-gpio-intc" for SM1 SoCs (S905D3, S905X3, S905Y3) - "amlogic,meson-a1-gpio-intc" for A1 SoCs (A113L) - "amlogic,meson-s4-gpio-intc" for S4 SoCs (S802X2, S905Y4, S805X2G, S905W2) -- reg : Specifies base physical address and size of the registers. -- interrupt-controller : Identifies the node as an interrupt controller. -- #interrupt-cells : Specifies the number of cells needed to encode an - interrupt source. The value must be 2. -- meson,channel-interrupts: Array with the 8 upstream hwirq numbers. These - are the hwirqs used on the parent interrupt controller. - -Example: - -gpio_interrupt: interrupt-controller@9880 { - compatible = "amlogic,meson-gxbb-gpio-intc", - "amlogic,meson-gpio-intc"; - reg = <0x0 0x9880 0x0 0x10>; - interrupt-controller; - #interrupt-cells = <2>; - meson,channel-interrupts = <64 65 66 67 68 69 70 71>; -}; diff --git a/Documentation/devicetree/bindings/interrupt-controller/amlogic,meson-gpio-intc.yaml b/Documentation/devicetree/bindings/interrupt-controller/amlogic,meson-gpio-intc.yaml new file mode 100644 index 000000000..fe7ef1916 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/amlogic,meson-gpio-intc.yaml @@ -0,0 +1,72 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/interrupt-controller/amlogic,meson-gpio-intc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic Meson GPIO interrupt controller + +maintainers: + - Heiner Kallweit + +description: | + Meson SoCs contains an interrupt controller which is able to watch the SoC + pads and generate an interrupt on edge or level. The controller is essentially + a 256 pads to 8 GIC interrupt multiplexer, with a filter block to select edge + or level and polarity. It does not expose all 256 mux inputs because the + documentation shows that the upper part is not mapped to any pad. The actual + number of interrupt exposed depends on the SoC. + +allOf: + - $ref: /schemas/interrupt-controller.yaml# + +properties: + compatible: + oneOf: + - const: amlogic,meson-gpio-intc + - items: + - enum: + - amlogic,meson8-gpio-intc + - amlogic,meson8b-gpio-intc + - amlogic,meson-gxbb-gpio-intc + - amlogic,meson-gxl-gpio-intc + - amlogic,meson-axg-gpio-intc + - amlogic,meson-g12a-gpio-intc + - amlogic,meson-sm1-gpio-intc + - amlogic,meson-a1-gpio-intc + - amlogic,meson-s4-gpio-intc + - const: amlogic,meson-gpio-intc + + reg: + maxItems: 1 + + interrupt-controller: true + + "#interrupt-cells": + const: 2 + + amlogic,channel-interrupts: + description: Array with the upstream hwirq numbers + minItems: 8 + maxItems: 12 + $ref: /schemas/types.yaml#/definitions/uint32-array + +required: + - compatible + - reg + - interrupt-controller + - "#interrupt-cells" + - amlogic,channel-interrupts + +additionalProperties: false + +examples: + - | + interrupt-controller@9880 { + compatible = "amlogic,meson-gxbb-gpio-intc", + "amlogic,meson-gpio-intc"; + reg = <0x9880 0x10>; + interrupt-controller; + #interrupt-cells = <2>; + amlogic,channel-interrupts = <64 65 66 67 68 69 70 71>; + };