From patchwork Wed Jul 24 16:12:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Animesh Agarwal X-Patchwork-Id: 13741159 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 785D0C3DA61 for ; Wed, 24 Jul 2024 16:13:34 +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-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=dGy8zPia1B1XKZzXuwWS8JSh1QUyF/w6Ab7CItZJ4ps=; b=p3OnDqTN18lAWS5/DuaXldQu04 ZOsXmAQ/BdzLpnTvNAOlKmAyH2PNYvlfNGTjjDgPaTczfikYZl4QlALy9bi3XtrszF0bi2I9oblDO 9bt+WvRHy4C59S2vUkHhhDitCbwnQ/3bO02TQ7P+UMdaUwqxkBx3D2v2Sl/2rmwADlckidIDew3DE wpISKZ15ICyuH8E/P0v6ePyLzNAG4IU00vyVwWk6KKcuW8dbHef2ZUBNpqyTQeH9gEZDf5+FFMvwK QLEKzQMWZ6BEZgvICmaCHG2kExdRYInBPLQx9UU7+0BymV7FgFvpgh+NWz1O9Acco+3EBDDyz6AI7 vJ2iJFUA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWecC-0000000Ft4D-07iP; Wed, 24 Jul 2024 16:13:20 +0000 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWebm-0000000FsyM-1bEH for linux-arm-kernel@lists.infradead.org; Wed, 24 Jul 2024 16:12:57 +0000 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1fa9ecfb321so15567845ad.0 for ; Wed, 24 Jul 2024 09:12:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721837572; x=1722442372; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=dGy8zPia1B1XKZzXuwWS8JSh1QUyF/w6Ab7CItZJ4ps=; b=cmz0N+FVaEUpglD/uL2QZFteeVkD2Y1rw7J0SmLhhvyUcUQPsSyxf5tvBkxz1TVdYG qKrRWZh5QVuG1gUOZNvA5uZklX4t+u8CkXRVVI4XiFNT0spElfcnAic4w/l4auFwXxGk SPhgX58J7TwVn/f2a6r+3BubQB8pBX8lmMvx0MDaWA+2CJKD44SVq/VhlA+4HRCjnpn+ ydQ9k4VD5nSo/QqLEkuVp7QPYME2EpTGYyOitc21Cpf2l7ihiCGvuDETN1UjekSRW1IH O/nYfE4k9bKgM7qkdH3FewjoTgQgB+JH3H/ehXuJSF/XbZpV0pVXmk4xoiigv1Q5NrI4 X/WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721837572; x=1722442372; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dGy8zPia1B1XKZzXuwWS8JSh1QUyF/w6Ab7CItZJ4ps=; b=MVUscZTvFBfJMbP9jibtyb/z0VFHLFb11WiXBD2wYi1njtgy99zK2tRLiCoBjfYzxk bQr1VH7HfiTF3X4d5rb+BmFOhW5TrDqBF1OwUyUNtftbZk928E4bNLx9JiKJTfYqqhC2 9lOhInpYXianTvlFyqKjYQhn8aQx/SSAA4HQp1RmkCBl/nfnOnJcU/fyYTiz7b+HKKIX 9dVHBdOAsYM/tcIUYHuroxA3QsxqjjnlR8ju4xI+go7GzEhPHRFIKyk5dWvBO/toGobV Yy7rEZEAnHggTahvCMREO5YUZkKAK8hNIKDgr/fN283345brDXsY9ZFJqOMHm8tGg1Y/ 22tA== X-Forwarded-Encrypted: i=1; AJvYcCXeCJMJ/1rglot6hEFhR59OZ8h70ndScKyWWOGkYkehx4FqIzeH53w1pZi71OWEaI0rt88WfVXNj7X9eNM4ic/QHtdtEJvwR1vWIUkAwPLGGyWj8Ek= X-Gm-Message-State: AOJu0YwyeQvms5eBHCY9SylbxWOpqjImaqV/rDX+hU4vsFJf6+wUwMEn quXQBiq7ZAV+fyVZEMgLBXfUoLss4F1A5ZrAn/6k3T4vfU/lSGFO X-Google-Smtp-Source: AGHT+IGwOmSmZRzublCwto8iAdsGQCIJhKKjiFYZCs+wlRCvU3WxVvNuBUWb0T/QF+lXF8AXBA39Dg== X-Received: by 2002:a17:903:230a:b0:1fc:2e38:d3de with SMTP id d9443c01a7336-1fed352f8e7mr551235ad.7.1721837572292; Wed, 24 Jul 2024 09:12:52 -0700 (PDT) Received: from fedora.. ([115.240.194.54]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fd6f31bd9bsm96065825ad.157.2024.07.24.09.12.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jul 2024 09:12:51 -0700 (PDT) From: Animesh Agarwal To: Cc: Animesh Agarwal , Daniel Baluta , Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vladimir Zapolskiy , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] dt-bindings: gpio: nxp,lpc32xx-gpio: Convert to dtschema Date: Wed, 24 Jul 2024 21:42:28 +0530 Message-ID: <20240724161235.130333-1-animeshagarwal28@gmail.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240724_091254_445136_22B7AD01 X-CRM114-Status: GOOD ( 15.90 ) 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 NXP LPC32xx SoC GPIO controller bindings to DT schema format. Cc: Daniel Baluta Signed-off-by: Animesh Agarwal --- .../devicetree/bindings/gpio/gpio_lpc32xx.txt | 43 --------------- .../bindings/gpio/nxp,lpc32xx-gpio.yaml | 52 +++++++++++++++++++ 2 files changed, 52 insertions(+), 43 deletions(-) delete mode 100644 Documentation/devicetree/bindings/gpio/gpio_lpc32xx.txt create mode 100644 Documentation/devicetree/bindings/gpio/nxp,lpc32xx-gpio.yaml diff --git a/Documentation/devicetree/bindings/gpio/gpio_lpc32xx.txt b/Documentation/devicetree/bindings/gpio/gpio_lpc32xx.txt deleted file mode 100644 index 49819367a011..000000000000 --- a/Documentation/devicetree/bindings/gpio/gpio_lpc32xx.txt +++ /dev/null @@ -1,43 +0,0 @@ -NXP LPC32xx SoC GPIO controller - -Required properties: -- compatible: must be "nxp,lpc3220-gpio" -- reg: Physical base address and length of the controller's registers. -- gpio-controller: Marks the device node as a GPIO controller. -- #gpio-cells: Should be 3: - 1) bank: - 0: GPIO P0 - 1: GPIO P1 - 2: GPIO P2 - 3: GPIO P3 - 4: GPI P3 - 5: GPO P3 - 2) pin number - 3) optional parameters: - - bit 0 specifies polarity (0 for normal, 1 for inverted) -- reg: Index of the GPIO group - -Example: - - gpio: gpio@40028000 { - compatible = "nxp,lpc3220-gpio"; - reg = <0x40028000 0x1000>; - gpio-controller; - #gpio-cells = <3>; /* bank, pin, flags */ - }; - - leds { - compatible = "gpio-leds"; - - led0 { - gpios = <&gpio 5 1 1>; /* GPO_P3 1, active low */ - linux,default-trigger = "heartbeat"; - default-state = "off"; - }; - - led1 { - gpios = <&gpio 5 14 1>; /* GPO_P3 14, active low */ - linux,default-trigger = "timer"; - default-state = "off"; - }; - }; diff --git a/Documentation/devicetree/bindings/gpio/nxp,lpc32xx-gpio.yaml b/Documentation/devicetree/bindings/gpio/nxp,lpc32xx-gpio.yaml new file mode 100644 index 000000000000..5974b2775d23 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/nxp,lpc32xx-gpio.yaml @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/gpio/nxp,lpc32xx-gpio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP LPC32xx SoC GPIO controller + +maintainers: + - Animesh Agarwal + +properties: + compatible: + const: nxp,lpc3220-gpio + + reg: + maxItems: 1 + + gpio-controller: true + + '#gpio-cells': + const: 3 + description: | + 1) bank: + 0: GPIO P0 + 1: GPIO P1 + 2: GPIO P2 + 3: GPIO P3 + 4: GPI P3 + 5: GPO P3 + 2) pin number + 3) optional parameters: + - bit 0 specifies polarity (0 for normal, 1 for inverted) + +required: + - compatible + - reg + - gpio-controller + - '#gpio-cells' + +additionalProperties: false + +examples: + - | + #include + + gpio@40028000 { + compatible = "nxp,lpc3220-gpio"; + reg = <0x40028000 0x1000>; + gpio-controller; + #gpio-cells = <3>; /* bank, pin, flags */ + };