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: 198237 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp43654dyd; Thu, 8 Feb 2024 01:22:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IFKZFdwNmn/YvCIPwxYx5lChKk+/6heyG/F0Mml+kTEQV4D8ecTIXC5schpYx9W2ZyG3Wfw X-Received: by 2002:a05:620a:8008:b0:785:9281:1d00 with SMTP id ee8-20020a05620a800800b0078592811d00mr10032687qkb.3.1707384149645; Thu, 08 Feb 2024 01:22:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707384149; cv=pass; d=google.com; s=arc-20160816; b=EqJpp/LDXRX9/lZaKaxMxpxczdJPdRALgeYn43wBnIHMYv4TvWvVSBATi2TuIs8XVw WQM4auZzOc0QYJX+YYmVp+hgIVco1c+u/4v+tliLA9v6hGRIn0QXCIvGAN2/aGqfnfYX OXARn2pmnveXmTtduDiMAFUlPEr7654OWFVNA9B7EMPktb1W4iCsUFJPD59qNHyE+sKL d1I8KmpB3A3N1tgINgjrYL7wxR8L6bLotkXE/g/drla22zA3uwjM0LxwBTUG5WD1lim7 5cu9EIFMOCIF+hndHYtJjGGCmX3PHFn5JKIu9iL2MG7eoEqpEXbmzUiu9x8dqrxrnPoo BoQQ== 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=D05n98L1NY+lAXe17LbODlL6EgU91KAUViRZu4hXMIM=; fh=n3sWMaIglpEoOWIIIHpAXid8SOQj7ePoeomBMlsYWWw=; b=edAicvLTmQz2kUxa23pxWEpZmeBBmp6AzddXZJ2W4G4NKRs54vH5BblWHBR0K0Wp2U BSGOEVYO5NTQHmPhu2wVoYIM4VF5WZievNwCmYJkBbujPlXrScK8fY8w26jg5+9E2/Qg ofFYcXTJHXVHysHdL2zbXtMNH0aQXc17usdI5k9EAyL1z1xR+/CP/JsA/EQbHICyqAlb ioDKi1x3/e5NM6ZysjXZKCXP3v8Uqp5NhZhoxkZqQBkahZ+UPDGfTpy3X+wyg0/BagEN mrU1vljT49X8ey0guL1xu9l5Dzw2GtiMUM0DqdCuzmxzNtuhE1fay0gUXZyRiGbUA44E zJNg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=y3BgmHh7; 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-57716-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57716-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=microchip.com X-Forwarded-Encrypted: i=2; AJvYcCWX4lzy21j0tQACF7guRAvVGtEavxyk86tzidSeISviTZ01o2VPtj495TQ4AmhUnKvmSfk+c2c3LTnajZL17mgR3dZ7rQ== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id b23-20020a05620a089700b0078404c4441bsi2696874qka.503.2024.02.08.01.22.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 01:22:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57716-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=y3BgmHh7; 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-57716-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57716-ouuuleilei=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 617921C229F0 for ; Thu, 8 Feb 2024 09:22:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 581366F06C; Thu, 8 Feb 2024 09:21:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="y3BgmHh7" 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 A2C496A03A; Thu, 8 Feb 2024 09:20:53 +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=1707384055; cv=none; b=EVQJCCDi8MU4pN6mJAVzEpnxfhBPUs+Lt58n93d4nYOte426WnUkGCeNVi+KBX9TB4Rp3D4J1HyhY8cc5u7maEDnRNZt0gGriJ4fno2nCk3lblI+VxZs8v74zJVZkfkpLqm3RNRCw+/k8CLI5N3j1c8Xe5fgwPLEJ+goOvQAmk0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707384055; c=relaxed/simple; bh=4hfqZVleXT6Y3NFEbrSgvIveo82gukJg4CkL7/6vfw4=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=LiwC7uLSnYxLqDVKIJW9g1t3+Y/Ae4V094PjfUzrjA6r/GPn+kAo0e8yjoTmx+CWdDmkCuxaKe+mQuuv0+/QoDL4n+OCBqwxrRElWYo+OsZcnBG69QFjFMMnTRLL36mbZhVJ6XgXXBaT/ygAzKE3TVBp4FGQt2kHa6JwsHt+p5E= 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=y3BgmHh7; 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=1707384053; x=1738920053; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=4hfqZVleXT6Y3NFEbrSgvIveo82gukJg4CkL7/6vfw4=; b=y3BgmHh71tsYPT2b/iULuf8xJrHn9rfhqx4jQUFVZTOmYxLYcOJXOhQD tNe1c+TqKpl2fG5DbuOrj5to1p6mx79Bn+vnzx0E7uG57DE38Ho+21wiw VzSHFDO23GG3yPHtOyPag1Y3e7TrYa0sOntvc5KN5lLwqLXWEXwjfH8nc Kj9rU1qORjOOE1lQGLoQYC/kgbH+DmpFBvtc/Se/BswoJk5qxOJFPA+3k fRETieU7I8N54cUyHtwrA0YD7qK0rz3hDhILvHVq5jS3xBA1fgQfTVeW2 pZ80AO0FrGk+npACFD6yJncT56lUk3NAU3GUz7yefZ7RAX+EmiSJreMrc A==; 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790322042007826175 X-GMAIL-MSGID: 1790322042007826175 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>; + }; +...