From patchwork Sun Mar 12 21:29:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13171874 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 392C2C6FA99 for ; Sun, 12 Mar 2023 21:29:44 +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=50A3Hg5GCF7K2xRz3RXF7d5Ihgy9DLBgnExE9j8G1XQ=; b=IkQ0wnmvwi2C2A XNHTvl4inVI8exysV53kZNafBiYuS/iKIcn6X8kJVgdSXNrebAf+bFXJ7jFMRCUPG6gf6SF9+ZccF E+Mzgdw0I1SK6Z4wcvPM3ci+dskW4JN3b4mEOxSTlnAKiCKHkv/yVgK+QzHEM3b7CRMpJQ7yW0MH6 Pa5AHW9dFytnsxs1cen/4aJq1k1lTWIWON1mGhyHBx9UJfffT3GJ96NwOGhLzJZzlN1iKNyydH1Qt 1IgIXXtr6qhyMzFzS5Et+61EXh9t+0yg1LDVdEyY7t1YjVXmjVG5NyA8XErh/WA69dJO/Asw/Dd0q k6rvy4zvBv/A1SgvBMlQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbTFs-003d4d-32; Sun, 12 Mar 2023 21:29:24 +0000 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbTFm-003d3j-3L; Sun, 12 Mar 2023 21:29:20 +0000 Received: by mail-ed1-x530.google.com with SMTP id k10so41154627edk.13; Sun, 12 Mar 2023 14:29:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678656555; 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=ILBZJyBz1q/L98jgfgXRg4/uL4DKnFkFBCa98vRc6CQ=; b=mi6ROhZCt7r7YjGunAdd64isK6iQGzIyhEcCPrrjO9xaSUSMA6BHbrQWi3oylZVgCS jCYTLHJIRz1IZGl3ksw4zBPdsop838zb4ZA//flBMQF+sAYEWDt/f4MpGgtcsvRdasUw Fe4fGpLAcdyzlZWuR74BJgMpRtF9rtTbbrxlgKE9RsL/dzeesVICjwclaREvAw9J4c6m DE0dA2CZCIqD5lwE1tR+toMKsJZS3u9xMdWcgurv5O+IbNJkSx3m0dIEVY46MOjDl17V 44zpJI+mxypCIaRg3jCjb+LGfSJh2A2EnlykPnqJs9mnNndQKxvZJpSxPOt/TmEyFH9Q +48g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678656555; 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=ILBZJyBz1q/L98jgfgXRg4/uL4DKnFkFBCa98vRc6CQ=; b=H813bofA7AZCWHnwtMgc2xvHI6SBUD+8vwFE4EYIRlF3jgmJtAWudLouZw90+4ZlwB bBtzDpPsu/NMuFEztlSqPJ3w5/5UW2YyzmFWmjRUjQqTYtJ8bmpXKjliBKqByWMJC6B6 gnRMh7sxfsyYq2Db+nXYP/Sh0C+nWYTHf7dZzeddHzxeQirbvpaMO/QCXG7OzcrQc3Uw /ajIQbruizTNRZKJ/dcmwc/JezgSNF2Dc+mMcSw3fGqTK7AyZEllHfEBlGNK6MZJJxe+ vdUUV0TxE5BjoW3jU15/IxcoWVPHcN6FaedffJ5NC/a5fqdxUOEyZrayHYdSZs5rNkuW UgGg== X-Gm-Message-State: AO0yUKWjjUza00HmHQvPzAPzEUwt+n3zBHQe34N8HGubwyx5c2M4Ik36 vnShOR8fXGWG/KN0qwfVTnM= X-Google-Smtp-Source: AK7set9wfz8nYoSr6C8f53CakOVimuzQy2+nLLknKBL28clXqkQhNZU8YcWisGhivsZtRHfT1I3NVQ== X-Received: by 2002:a17:907:6092:b0:888:b471:8e46 with SMTP id ht18-20020a170907609200b00888b4718e46mr40717483ejc.50.1678656555295; Sun, 12 Mar 2023 14:29:15 -0700 (PDT) Received: from ?IPV6:2a01:c23:b9c8:9800:5093:57c3:81d7:5324? ([2a01:c23:b9c8:9800:5093:57c3:81d7:5324]) by smtp.googlemail.com with ESMTPSA id b18-20020a17090636d200b008d0dbf15b8bsm2596889ejc.212.2023.03.12.14.29.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Mar 2023 14:29:14 -0700 (PDT) Message-ID: Date: Sun, 12 Mar 2023 22:29:07 +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 v2] 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-20230312_142918_398536_9CDD0729 X-CRM114-Status: GOOD ( 18.66 ) 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. Reviewed-by: Martin Blumenstingl Reviewed-by: Rob Herring Signed-off-by: Heiner Kallweit --- - consider that more than one compatible may be set - remove bus part from example - remove minItem/maxItem properties for compatible - reduce compatible fallback complexity - add that 8 or 12 GIC interrupts can be used - fix typo --- .../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 or 12 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 interrupts 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>; + };