Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp819826rdb; Fri, 9 Feb 2024 02:02:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IER9rBafuFhXGFFtoZ+5n0RhfR3qzLD2eJayO53DeXFrqFwPD9AgR3F42gdwsI1CysLilU/ X-Received: by 2002:a05:620a:1a09:b0:785:b7e1:d5ea with SMTP id bk9-20020a05620a1a0900b00785b7e1d5eamr1178694qkb.5.1707472941449; Fri, 09 Feb 2024 02:02:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707472941; cv=pass; d=google.com; s=arc-20160816; b=wwPPmPfzmYz9ywnOmiKZVzoRF/BBBdt0sNWoIhC4dLvLJA8N2w15znkRK3ejocijl/ zEksv3UPmQFfFwXBZrakn6xg8bSU74Z232ksjTZPXdDmmmc8rAfNp9fsEN1EsVQAbx8/ J8+hXSzahTnKyclyvJ1PETMJFLNbFmzW/5RgkwFlxAJXT7g8O2nka/MzbZLeATaUxzpa P9ZaVZwtzPlkqh8NgNURvBj+W0fmInYoMbfXIFjyIQqK4EP+SlDSkLwclKRlHsh9wt7p KIOgApwMrvGGptaUBf1rYxo22urgZDTcfmS1wgT8zNl8RQP+DpudrP4mf9EfcllwPPfC unOw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:to:from :dkim-signature; bh=6LuTNGRFGQ5idStnxRknISqcgBdZauv0tBArh0BhIjs=; fh=aEHdTvHIpuzkrbdyQQ0uz0d1BGIVej4YD/YfNx0jJrE=; b=r0xKUC02rc0tUC6+dGNevIvIO3MYRlWeQynh4vbNpeOcBUR44sgwDx76akSecEad2L m31yuBg+VFjCDuhSfLc/CnUPS7BgucNIU8cUQIIFMxZ99X4ir7l+6UZuUNeqW5G9NFKc dL96DeXsL5sd4g4GfLu1frYN2E9Z6/2VxzmIFvUggalUpefCLObv+CCRjQXgQp/yvZPk 07Wd5maSqCOE18gnTC/cQrIO7pvC4FFaXn6dl2t466OPXAcShlhefIw9Ze3V1Hd1/vyN D4kDjjlPKLrh4rVV8KXXpMWuBgwzanPQMkr5XyXQnnsMAnK5f2svXTZmNlS5znP2WBqA Okig==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=c0kNo2SP; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-59190-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59190-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=microchip.com X-Forwarded-Encrypted: i=2; AJvYcCXSr/oD4xyW+Gx0V/qSDpZY12Nxn/XNG6yqXwmBHnPyVcNDvr1E0sZmTBw6CAqvFnWUCswu0OyAjPzV+UqG+cSIODf+kEUIplPZqWvqeA== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id m23-20020ae9e017000000b00783e5c0ae73si1612322qkk.180.2024.02.09.02.02.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 02:02:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59190-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=c0kNo2SP; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-59190-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59190-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=microchip.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 280421C20D4E for ; Fri, 9 Feb 2024 10:02:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 22CAD67E87; Fri, 9 Feb 2024 10:02:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="c0kNo2SP" Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 614703FDF; Fri, 9 Feb 2024 10:02:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707472933; cv=none; b=QbGWUFk7hADUjUhmc8mUy/dA+N7Hk5wVwvBR74fcWaJzgCt7FrxCCNH9p0Feqfh1NJQGjqzWfmEepM+Uag3j/0A7N1VWiFr2jgavUTSY5knakKg511AUIymarWixepMP8Kq9kJAaDlt3jThapuaZDXmBbfVIJiwQR97weshaLdc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707472933; c=relaxed/simple; bh=dHt3XARATvm47LBWteX4AQlK8JTfzsMgBrvHp9qNz0k=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=nL29ZPvtz2cDbI8BHXFRUzZ7Ioh2CGFvsuigH9Lc2PUNX/z+09E8iJyqthb7R1HyXUV+6FoAj8W/3W9xvCW86obSFocqw2dKjWL0GHi9yKGC/jsrATYmmGRCKvnbHh60p7Ubq2cwWw6n6B3I9yI9SI6GOqnTpUOkxUZmECrXsMg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=c0kNo2SP; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1707472931; x=1739008931; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=dHt3XARATvm47LBWteX4AQlK8JTfzsMgBrvHp9qNz0k=; b=c0kNo2SPI6EbSBVthgfSe7+zNz01vqweSIlSvXFdQOlDGWCZ9uBlHjMP +aZBawe2TSaSqwe1a062RYEKHgQeuAHWCxgQfG+sMt5kRiDl86wtH+nI4 OzxMUPnQ+dqjm4hyvuFO8rqgkH8uDpY3FFd4dyVJvSbcl3a0TQaqEJQ2/ 6r7LjuFiqC8ECqfWf9uEiCkH474Bhj1oPSogu4ckH2xDdbX+KGvztBDRA EMe9o25yE7wtfaFhp0dcofbjrrMaiqi68ha/KAiZ/7TuGfJyK1BOfTOWE nlpTt5BcJU3RtWF1+khwaQVr8tFnlUxBRAcaBjHEpy0PnfIegM4psKtow A==; X-CSE-ConnectionGUID: fX7JcovPRN+JJx0KDfcpAQ== X-CSE-MsgGUID: gvdEMF7UTZGKu02Cq+Yz3Q== X-IronPort-AV: E=Sophos;i="6.05,256,1701154800"; d="scan'208";a="17415429" 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; 09 Feb 2024 03:02:09 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 9 Feb 2024 03:01:29 -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; Fri, 9 Feb 2024 03:01:25 -0700 From: Dharma Balasubiramani To: , , , , , , , , , , Subject: [PATCH v2] dt-bindings: interrupt-controller: Convert Atmel AIC to json-schema Date: Fri, 9 Feb 2024 15:31:22 +0530 Message-ID: <20240209100122.61335-1-dharma.b@microchip.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Convert the Atmel AIC binding document to DT schema format using json-schema. Signed-off-by: Dharma Balasubiramani --- Changelog v1 -> v2 - Drop the '|' as there is no formatting to preserve. - Remove unnecessary marketing statement from description. - Drop the description for interrupts and reg, it's obvious. - Put reg after compatible. - Drop comment in example. - Drop the example of device that is wired to an AIC as it's(dma) binding is not yet available. --- .../interrupt-controller/atmel,aic.txt | 43 ----------- .../interrupt-controller/atmel,aic.yaml | 74 +++++++++++++++++++ 2 files changed, 74 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 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..df81115a8b7f --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/atmel,aic.yaml @@ -0,0 +1,74 @@ +# 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. + +allOf: + - $ref: /schemas/interrupt-controller.yaml# + +properties: + compatible: + enum: + - atmel,at91rm9200-aic + - atmel,sama5d2-aic + - atmel,sama5d3-aic + - atmel,sama5d4-aic + - microchip,sam9x60-aic + + reg: + maxItems: 1 + + 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: + maxItems: 1 + + atmel,external-irqs: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: u32 array of external irqs. + +required: + - compatible + - reg + - interrupt-controller + - "#interrupt-cells" + - atmel,external-irqs + +unevaluatedProperties: false + +examples: + - | + interrupt-controller@fffff000 { + compatible = "atmel,at91rm9200-aic"; + interrupt-controller; + #interrupt-cells = <3>; + reg = <0xfffff000 0x200>; + atmel,external-irqs = <31>; + }; +... base-commit: 0dd3ee31125508cd67f7e7172247f05b7fd1753a -- 2.25.1