From patchwork Tue Jun 25 04:35:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manikandan Muralidharan X-Patchwork-Id: 13710595 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 C2286C2BBCA for ; Tue, 25 Jun 2024 04:36:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=a0pmrbmDrGB3A1WPJdDwdpU0bg53Ad/YS65r58Qu8Eg=; b=I6aJU4d/rE560UBx1K1NmCWEkt qvOdw82oQVXVIVPdZUmH2Y481Vkc7pygmEoIptjoxOqUpDIaYeRhAyBEju8owsYVd5Zh0rXGsgIHg brz04HgeTxG1633wMwGclcMUP8yr+XCaP5OXqnj5rutr17JvbhOKhXzmtEP2UjIX3cnoUIgOgvCCS EOyYyd/QNcu6hF7vzOIwAYMzvw4gg8WNcW1HbZlI4qZX28p2TE7viHVWHDLNeKCT23LpNNcxEPzz6 gfW1sdviUHtPsdXPzlBhvS2sd+z6e0GHHaDAKz6Rt0MKaNcNTqsvnLw2AUQyRtdi9/3rpmVKFwhln IihqvfgA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sLxvB-00000001ZoY-0HIV; Tue, 25 Jun 2024 04:36:45 +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 1sLxv0-00000001ZjI-0vsg for linux-arm-kernel@lists.infradead.org; Tue, 25 Jun 2024 04:36:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1719290194; x=1750826194; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=puFxjvjjB6a4HtmjgHqz62T3yxPAylOcUIy/Wguo/BQ=; b=KLzn8CFHE6EhReEYHx4WXdNbrBgq8vSeAXKPrIJiVUSoSu/aHULN/5/1 5atO9O4AKD+rZumie4EKXxqDRJ4tafGlEAfXpiFE0Q/H9XksAs1itYvws hrYxAFXs+gCcLSflmohygQKB3VV/UuOgfSZmHO9LA9v5XipfFjTZBVKXz hZnotrCem6pctSNr8dgEs1HzTAeS/goAOawooYFLOrA/9Cmisg2PFDXTz V8O+TFhfYGaWVt04NTINx8EHkpNNC1tSJCLPbjYPmKpTadrbmm9VutuKr PmtyaYkf1VDSdB4atvK8yaBqd0LO94ny8zSBMbs31160LtKiGNRySAyAj g==; X-CSE-ConnectionGUID: GBVTrIN9ThaMEpX7MY3+Kw== X-CSE-MsgGUID: vBwZ9LkyTDaF6Shq9ND9/Q== X-IronPort-AV: E=Sophos;i="6.08,263,1712646000"; d="scan'208";a="28457235" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 24 Jun 2024 21:36:33 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.87.72) by chn-vm-ex02.mchp-main.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 24 Jun 2024 21:36:03 -0700 Received: from che-lt-i67131.microchip.com (10.10.85.11) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Mon, 24 Jun 2024 21:35:55 -0700 From: Manikandan Muralidharan To: , , , , , , , , , , , , , CC: Subject: [PATCH v2 4/5] dt-bindings: gpio: convert Atmel GPIO to json-schema Date: Tue, 25 Jun 2024 10:05:24 +0530 Message-ID: <20240625043525.279711-5-manikandan.m@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240625043525.279711-1-manikandan.m@microchip.com> References: <20240625043525.279711-1-manikandan.m@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240624_213634_299891_C97BC3A2 X-CRM114-Status: GOOD ( 18.38 ) 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 GPIO controller binding document to DT schema format using json-schema. The compatible string "microchip,sam9x7-gpio" is added as well. Signed-off-by: Manikandan Muralidharan Reviewed-by: Conor Dooley --- changes in v2: - Fix bot errors with 'make dt_binding_check', missed to add "atmel,at91rm9200-gpio" as separate compatible for devices that uses it - Remove label from example - Add default entry for #gpio-lines property - Add new compatible string details in commit message --- .../bindings/gpio/atmel,at91rm9200-gpio.yaml | 81 +++++++++++++++++++ .../devicetree/bindings/gpio/gpio_atmel.txt | 31 ------- 2 files changed, 81 insertions(+), 31 deletions(-) create mode 100644 Documentation/devicetree/bindings/gpio/atmel,at91rm9200-gpio.yaml delete mode 100644 Documentation/devicetree/bindings/gpio/gpio_atmel.txt diff --git a/Documentation/devicetree/bindings/gpio/atmel,at91rm9200-gpio.yaml b/Documentation/devicetree/bindings/gpio/atmel,at91rm9200-gpio.yaml new file mode 100644 index 000000000000..3dd70933ed8e --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/atmel,at91rm9200-gpio.yaml @@ -0,0 +1,81 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/gpio/atmel,at91rm9200-gpio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Microchip GPIO controller (PIO) + +maintainers: + - Manikandan Muralidharan + +properties: + compatible: + oneOf: + - items: + - enum: + - atmel,at91sam9x5-gpio + - microchip,sam9x60-gpio + - const: atmel,at91rm9200-gpio + - items: + - enum: + - microchip,sam9x7-gpio + - const: microchip,sam9x60-gpio + - const: atmel,at91rm9200-gpio + - items: + - const: atmel,at91rm9200-gpio + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + interrupt-controller: true + + "#interrupt-cells": + const: 2 + + gpio-controller: true + gpio-line-names: true + + "#gpio-cells": + const: 2 + + clocks: + maxItems: 1 + + "#gpio-lines": + description: + Number of gpio, 32 by default if absent + maxItems: 1 + default: 32 + +required: + - compatible + - reg + - interrupts + - interrupt-controller + - "#interrupt-cells" + - gpio-controller + - "#gpio-cells" + - clocks + +additionalProperties: false + +examples: + - | + #include + #include + + gpio@fffff400 { + compatible = "atmel,at91rm9200-gpio"; + reg = <0xfffff400 0x200>; + interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>; + #gpio-cells = <2>; + gpio-controller; + interrupt-controller; + #interrupt-cells = <2>; + clocks = <&pmc PMC_TYPE_PERIPHERAL 2>; + }; +... diff --git a/Documentation/devicetree/bindings/gpio/gpio_atmel.txt b/Documentation/devicetree/bindings/gpio/gpio_atmel.txt deleted file mode 100644 index 29416f9c3220..000000000000 --- a/Documentation/devicetree/bindings/gpio/gpio_atmel.txt +++ /dev/null @@ -1,31 +0,0 @@ -* Atmel GPIO controller (PIO) - -Required properties: -- compatible: "atmel,-gpio", where is at91rm9200 or at91sam9x5. -- reg: Should contain GPIO controller registers location and length -- interrupts: Should be the port interrupt shared by all the pins. -- #gpio-cells: Should be two. The first cell is the pin number and - the second cell is used to specify optional parameters to declare if the GPIO - is active high or low. See gpio.txt. -- gpio-controller: Marks the device node as a GPIO controller. -- interrupt-controller: Marks the device node as an interrupt controller. -- #interrupt-cells: Should be two. The first cell is the pin number and the - second cell is used to specify irq type flags, see the two cell description - in interrupt-controller/interrupts.txt for details. - -optional properties: -- #gpio-lines: Number of gpio if absent 32. - - -Example: - pioA: gpio@fffff200 { - compatible = "atmel,at91rm9200-gpio"; - reg = <0xfffff200 0x100>; - interrupts = <2 4>; - #gpio-cells = <2>; - gpio-controller; - #gpio-lines = <19>; - interrupt-controller; - #interrupt-cells = <2>; - }; -