From patchwork Wed Feb 1 20:02: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: 649352 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C7F5C05027 for ; Wed, 1 Feb 2023 20:02:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229781AbjBAUCT (ORCPT ); Wed, 1 Feb 2023 15:02:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231996AbjBAUCS (ORCPT ); Wed, 1 Feb 2023 15:02:18 -0500 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E00CC64D; Wed, 1 Feb 2023 12:02:16 -0800 (PST) Received: by mail-ed1-x52e.google.com with SMTP id eq11so1893521edb.6; Wed, 01 Feb 2023 12:02:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=lAKhSOGbJYSH01+bqzzbEWLSFc9Fd4YDw+koc/Y6S+8=; b=SKE+ldyYpYhOFodHZXwI12i9Q0q7gUCgFvZPMGFOAzYIe38Ypl34TRuaDGF/hUaoAG igNydkmuQ1h3nL6bEMsp7kYPxEs4jMe6QP9S0aY4qWW6lAEQSEiEAcLiBPhQeAHuMhRD +92ejjdz8Yw7ioakmIunkwpPJnxPNoWxzLfN8Wr6dZzWwoO86yqEhMqvW8co5//LhEtV 0rSpysUZ19zUbXu5Ciw06T9pRuCmLxnm+3Yr12se+vpIk+/yprmmbMfHEABCeat9cVOS whZIIuLgXl1v++XT5JvbqUHSP5HzBDHQhHbl2Nk0CtH/DwdxY7EfXbYuqHV2PBAIHL2W MauQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lAKhSOGbJYSH01+bqzzbEWLSFc9Fd4YDw+koc/Y6S+8=; b=qLhfmTHxpHsfhAUkRKlWH1OU7HVx5M4c4qQjKcSBULStSmgJysCIKRh2wGzAndQ9h0 /8g5wCzgCZlvdlSlxk/pzGJyutlt6MGKhNtfw/BMNhvV6vbGvVl41d+uZVnVsnA7dvQN LKi19lCL4Vc2JWezcui1WL2s7dhpP2RYF6yI2v9afz5DXGFG09DLMjFJ53JIpj0bW5Y8 3bmvKQ40DYBA+jES4idW1JLDhF75zaVOtRRg2yB7NXVU8SyaAtX+Jx3K3kwtfMf8GSVt HFrvJWXJlhKweW4yURHtCkgJxN8Xw9Pv2xQiOLw9xoNPtvdhbahBAwkW3kkvUeSYjUVg IBvQ== X-Gm-Message-State: AO0yUKXDrLRnpxKNC5/f9CHnMLGlCyfyMIFv4bM8kcQ/ro/XFtJHxu9o MgQX9KoJKzj3v5OPZx/cQrE= X-Google-Smtp-Source: AK7set+ci+EffZUH9M9mpMZHkLAlLOcDB20fPIdVQFRY9LRyOwfG7kqmhOKa2mq6l5zOKMmEGCg7bA== X-Received: by 2002:a50:d491:0:b0:4a2:1263:bbab with SMTP id s17-20020a50d491000000b004a21263bbabmr3911848edi.17.1675281734647; Wed, 01 Feb 2023 12:02:14 -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 k6-20020aa7d8c6000000b00487fc51c532sm10399813eds.33.2023.02.01.12.02.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Feb 2023 12:02:14 -0800 (PST) Message-ID: <8cae0b08-8040-ef7b-da0e-92d9b3695249@gmail.com> Date: Wed, 1 Feb 2023 21:02: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 Subject: [PATCH 4/4] dt-bindings: interrupt-controller: Convert Amlogic Meson GPIO interrupt controller binding Content-Language: en-US From: Heiner Kallweit To: Rob Herring , Krzysztof Kozlowski , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Marc Zyngier , Thomas Gleixner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Thierry Reding Cc: "devicetree@vger.kernel.org" , "open list:ARM/Amlogic Meson..." , "linux-arm-kernel@lists.infradead.org" , linux-pwm@vger.kernel.org References: <8df4ceec-663c-dc68-d775-5caeb02c0cca@gmail.com> In-Reply-To: <8df4ceec-663c-dc68-d775-5caeb02c0cca@gmail.com> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Convert Amlogic Meson GPIO interrupt controller binding to yaml. Signed-off-by: Heiner Kallweit Reviewed-by: Rob Herring --- - consider that more than one compatible may be set - remove bus part from example - remove minItem/maxItem properties for compatible - reduce compatible fallback 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>; + };