From patchwork Thu Feb 8 09:20:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dharma Balasubiramani X-Patchwork-Id: 13549504 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 28F15C48260 for ; Thu, 8 Feb 2024 09:21:17 +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:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=41vNzzycMY6s9URhhSgQL68dZ7KHC0UgrgeFpyI6SBg=; b=ic1tVucljKZqOd 9znmqFaW9MkQPBBZejiFZ6GYUQyRaSaYBoaHuBHp7ivB7FocyCMmdQ5AOB+9nu44lzMgq0QtRaOzD fRXbHBtSaepjDtBeY39Iiz80H/uS0HyLn/EDJnE3Xyai76OHMC2SUW5NpZdJksn72gKfPmzYabPFY HaVyxJRdkaeatMW2rjXnuJtQIxiFM6qMU3J9+yvBRsQiekeq8ixRQDunSMdasDvd4+73OWQe4aLc8 E+Bhsol+0VXlkYwOHS+9lRyW6foXPxIcV+K0qgjXsCILmyvQDsU7aHLQooW+pPS9RShpG/I0O8hPs ZF4U7+kqsLif+5b3auyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rY0aX-0000000DAUW-1bGf; Thu, 08 Feb 2024 09:20:57 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rY0aU-0000000DATW-2KkY for linux-arm-kernel@lists.infradead.org; Thu, 08 Feb 2024 09:20:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1707384054; x=1738920054; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=4hfqZVleXT6Y3NFEbrSgvIveo82gukJg4CkL7/6vfw4=; b=i4QHfl5aGoURiSIn/HJvPRwkgnVYeenpLs7+liIIXshRkXlWxZDvcN1t vAjUycpR26VlyUVIvYvQwkwjGu6NNCONGrCxdNbspk9/yFWz/smwoDqb0 M5tbP3uOeCi14H6AiuvkYWDTWPK0SsPkDPfbIDLxR9DyG6Vhi9NoiY/7P dPU5Onrgjuulc8apVR1dkUAekgN8gqmGl4NnaXiljtP0wVowXBGBk4cQ7 sJ0WDe6iWKnUHuIalCFUyFld3IDwUU93XqIlhb4/sLbBLbF2+U4W7RXBC 7Tm9kNQUDyCYm0pad4dIgYktE+nnkBsv+rlDCA1firIrYr4uWEpD1a+ax w==; X-CSE-ConnectionGUID: /OK1/V5OQPGFg36ypVfDrQ== X-CSE-MsgGUID: +Tr4CF2aQeWQihcHw0n6qA== X-IronPort-AV: E=Sophos;i="6.05,253,1701154800"; d="scan'208";a="17348955" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 08 Feb 2024 02:20:52 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 8 Feb 2024 02:20:22 -0700 Received: from che-lt-i70843lx.microchip.com (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Thu, 8 Feb 2024 02:20:18 -0700 From: Dharma Balasubiramani To: , , , , , , , , , , Subject: [PATCH] dt-bindings: interrupt-controller: Convert Atmel AIC to json-schema Date: Thu, 8 Feb 2024 14:50:15 +0530 Message-ID: <20240208092015.263210-1-dharma.b@microchip.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240208_012054_757061_1071A0A0 X-CRM114-Status: GOOD ( 17.92 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Convert the Atmel AIC binding document to DT schema format using json-schema. Signed-off-by: Dharma Balasubiramani --- Note: I get the following warnings on latest kernel but not in 6.7. Should I be worried? usage: yamllint [-h] [-] [-c CONFIG_FILE | -d CONFIG_DATA] [--list-files] [-f {parsable,standard,colored,github,auto}] [-s] [--no-warnings] [-v] [FILE_OR_DIR [FILE_OR_DIR ...]] yamllint: error: one of the arguments FILE_OR_DIR - is required .../interrupt-controller/atmel,aic.txt | 43 --------- .../interrupt-controller/atmel,aic.yaml | 88 +++++++++++++++++++ 2 files changed, 88 insertions(+), 43 deletions(-) delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/atmel,aic.txt create mode 100644 Documentation/devicetree/bindings/interrupt-controller/atmel,aic.yaml base-commit: 047371968ffc470769f541d6933e262dc7085456 diff --git a/Documentation/devicetree/bindings/interrupt-controller/atmel,aic.txt b/Documentation/devicetree/bindings/interrupt-controller/atmel,aic.txt deleted file mode 100644 index 7079d44bf3ba..000000000000 --- a/Documentation/devicetree/bindings/interrupt-controller/atmel,aic.txt +++ /dev/null @@ -1,43 +0,0 @@ -* Advanced Interrupt Controller (AIC) - -Required properties: -- compatible: Should be: - - "atmel,-aic" where can be "at91rm9200", "sama5d2", - "sama5d3" or "sama5d4" - - "microchip,-aic" where can be "sam9x60" - -- interrupt-controller: Identifies the node as an interrupt controller. -- #interrupt-cells: The number of cells to define the interrupts. It should be 3. - The first cell is the IRQ number (aka "Peripheral IDentifier" on datasheet). - The second cell is used to specify flags: - bits[3:0] trigger type and level flags: - 1 = low-to-high edge triggered. - 2 = high-to-low edge triggered. - 4 = active high level-sensitive. - 8 = active low level-sensitive. - Valid combinations are 1, 2, 3, 4, 8. - Default flag for internal sources should be set to 4 (active high). - The third cell is used to specify the irq priority from 0 (lowest) to 7 - (highest). -- reg: Should contain AIC registers location and length -- atmel,external-irqs: u32 array of external irqs. - -Examples: - /* - * AIC - */ - aic: interrupt-controller@fffff000 { - compatible = "atmel,at91rm9200-aic"; - interrupt-controller; - #interrupt-cells = <3>; - reg = <0xfffff000 0x200>; - }; - - /* - * An interrupt generating device that is wired to an AIC. - */ - dma: dma-controller@ffffec00 { - compatible = "atmel,at91sam9g45-dma"; - reg = <0xffffec00 0x200>; - interrupts = <21 4 5>; - }; diff --git a/Documentation/devicetree/bindings/interrupt-controller/atmel,aic.yaml b/Documentation/devicetree/bindings/interrupt-controller/atmel,aic.yaml new file mode 100644 index 000000000000..396eac53da3a --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/atmel,aic.yaml @@ -0,0 +1,88 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/interrupt-controller/atmel,aic.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Advanced Interrupt Controller (AIC) + +maintainers: + - Nicolas Ferre + - Dharma balasubiramani + +description: | + The Advanced Interrupt Controller (AIC) is an 8-level priority, individually + maskable, vectored interrupt controller providing handling of up to one + hundred and twenty-eight interrupt sources. It is designed to substantially + reduce the software and real-time overhead in handling internal and external + interrupts. + +allOf: + - $ref: /schemas/interrupt-controller.yaml# + +properties: + compatible: + enum: + - atmel,at91rm9200-aic + - atmel,sama5d2-aic + - atmel,sama5d3-aic + - atmel,sama5d4-aic + - microchip,sam9x60-aic + + interrupt-controller: true + + "#interrupt-cells": + const: 3 + description: | + The 1st cell is the IRQ number (Peripheral IDentifier on datasheet). + The 2nd cell specifies flags: + bits[3:0] trigger type and level flags: + 1 = low-to-high edge triggered. + 2 = high-to-low edge triggered. + 4 = active high level-sensitive. + 8 = active low level-sensitive. + Valid combinations: 1, 2, 3, 4, 8. + Default for internal sources: 4 (active high). + The 3rd cell specifies irq priority from 0 (lowest) to 7 (highest). + + interrupts: + description: Interrupt source of the parent interrupt controller. + maxItems: 1 + + reg: + description: Specifies base physical address(s) and size of the AIC registers. + maxItems: 1 + + atmel,external-irqs: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: u32 array of external irqs. + +required: + - compatible + - interrupt-controller + - "#interrupt-cells" + - reg + - atmel,external-irqs + +unevaluatedProperties: false + +examples: + - | + /* AIC */ + aic: interrupt-controller@fffff000 { + compatible = "atmel,at91rm9200-aic"; + interrupt-controller; + #interrupt-cells = <3>; + reg = <0xfffff000 0x200>; + atmel,external-irqs = <31>; + }; + + - | + /* An interrupt generating device that is wired to an AIC. */ + dma: dma-controller@ffffec00 { + compatible = "atmel,at91sam9g45-dma"; + #dma-cells = <2>; + reg = <0xffffec00 0x200>; + interrupts = <21 4 5>; + }; +...