From patchwork Sat Mar 11 23:18:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 662196 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 B278AC61DA4 for ; Sat, 11 Mar 2023 23:18:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229637AbjCKXSr (ORCPT ); Sat, 11 Mar 2023 18:18:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229473AbjCKXSo (ORCPT ); Sat, 11 Mar 2023 18:18:44 -0500 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F94212F for ; Sat, 11 Mar 2023 15:18:13 -0800 (PST) Received: by mail-wm1-x329.google.com with SMTP id j19-20020a05600c1c1300b003e9b564fae9so8514339wms.2 for ; Sat, 11 Mar 2023 15:18:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678576692; 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=3UnKenye0MlRfUzVaMfEjleTW/ipSCceVIYweRD/BNs=; b=VlqRl/eUVTqX4bTKSUEBr00LvElRkgLVwGs6+BE4YZ0nGbkePNc2QKrWfnYO5xkGx0 eMhYEynRzQcKIIRzZLzGe8wMloB/Bq8gm9OW8OX449aA9978+XHGo/oM2j+M/HpU+dUi ZQyGm148bgDRVfWGaWj7m/X/0JnI6xZAUJhs9LpyZ+nfhfQsANlu7YaGTMN2iRPruhfi CO+wZ356WGEtxipBXcXpeIRMusTk02UkqIZ5+8dSNIzXGPnf7Ji1mFOK+ZNBgx/y9Cls yPht04UWX7xFZtBCyRczh/ava3Q34jX3/WADj4rl2hLHXfXxKq5yLfUVP6zXZ2Z+VI6Y 8Eig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678576692; 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=3UnKenye0MlRfUzVaMfEjleTW/ipSCceVIYweRD/BNs=; b=N+UfBNjatlDT4cnaGz8jl841Vi8VnIMjV3E9A04InES+c9mkSvI3/95Dopj2tlHTfl X2BwBdfBPuHTzi/DxpqV8+vdJDHnzj3NU04Gnw9XuE8hkhjarn5VdPunnnv1lfYEHW0f QBKoO4svYMxiVMuMEHnXPNFmXjq9p2nJlr+AvIGR9A5vKPAV4owfWQeRVwiim5Q4lQMU hB5arF/lvI4PBPv2KiCVM2rcqBsPBOLFjQn5IiYvuxfBPEhZYDX2X9vguc5Zb79LAt9D SIK95dne4hQ5USWJIFvk11Lx7PpU93OUsFEVXRp3b2TxB+LMRsmCs8V+MEayAAuEAReU BitQ== X-Gm-Message-State: AO0yUKXb+3kG90f4dxXWJf6Be+HTrBeqHFs0l0auZQwkFNkvtApaSQFA PE21Ia3GZa8iJ8DsdqJ28Jk= X-Google-Smtp-Source: AK7set8J22Ohd1kzA/9PUi6CQlJKOm3h157iJQsM+34GBmv3lb6AzaWcBS9T2hzcUJX8x3rC5P1+OA== X-Received: by 2002:a05:600c:3b99:b0:3dc:5c86:12f3 with SMTP id n25-20020a05600c3b9900b003dc5c8612f3mr6752205wms.1.1678576691745; Sat, 11 Mar 2023 15:18:11 -0800 (PST) Received: from ?IPV6:2a01:c22:7697:7600:79dc:4e28:a7d7:a00c? (dynamic-2a01-0c22-7697-7600-79dc-4e28-a7d7-a00c.c22.pool.telefonica.de. [2a01:c22:7697:7600:79dc:4e28:a7d7:a00c]) by smtp.googlemail.com with ESMTPSA id 4-20020a05600c024400b003e91b9a92c9sm4013225wmj.24.2023.03.11.15.18.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 11 Mar 2023 15:18:11 -0800 (PST) Message-ID: Date: Sun, 12 Mar 2023 00:18:05 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Content-Language: en-US To: Rob Herring , Krzysztof Kozlowski , Thomas Gleixner , Marc Zyngier , Jerome Brunet , Neil Armstrong , Martin Blumenstingl , Kevin Hilman Cc: "open list:ARM/Amlogic Meson..." , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" From: Heiner Kallweit Subject: [PATCH RESEND] dt-bindings: interrupt-controller: Convert Amlogic Meson GPIO interrupt controller binding Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Convert Amlogic Meson GPIO interrupt controller binding to yaml. Reviewed-by: Rob Herring Signed-off-by: Heiner Kallweit Reviewed-by: Martin Blumenstingl --- - 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>; + };