From patchwork Wed Jul 31 05:44:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Animesh Agarwal X-Patchwork-Id: 13748077 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 E5B03C3DA7F for ; Wed, 31 Jul 2024 05:45:40 +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=BC/1wGF6ESoob1KqZeUdHt7PS9fgESUzLCWFdRi9eQs=; b=BPRy88BaX8xkYWKmSgeHYjGOnh PZie9NGhxRwGLrZiokigaFsS5FPSPAGC4dRDxnUUGvjrpar+yS2DPFbKEcVku3zci9kPVuH1A8prk xO0PlO2Nh0eTsz2r+SxxCH5+8qaBRI1V1kEExbd4nABS9WCq0g1yfrTz2dZEy/YD3TSZvt4rbJhB8 cx7Caou0uxk5p7biOpFRWGpYfk7Bi6u00ymnvSYLC2u1wGf8xxXpJEPYndU3s/mGuJnDp40RLX3kW o2bEzKX6J2QBCEf/+UYf8kTZYIwihwrh6Tfew0kFn689Vbzmg/zdbRVoxnQ9b/DlTOn9CUJhgrpwi UKpOAAWg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZ29R-0000000HQIJ-2aHw; Wed, 31 Jul 2024 05:45:29 +0000 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZ28x-0000000HQBD-1Fxp for linux-arm-kernel@lists.infradead.org; Wed, 31 Jul 2024 05:45:01 +0000 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1fc47abc040so34259165ad.0 for ; Tue, 30 Jul 2024 22:44:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722404698; x=1723009498; 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=BC/1wGF6ESoob1KqZeUdHt7PS9fgESUzLCWFdRi9eQs=; b=NYaI3yid7L7Bhd6HRk6TQQ9LxYc0lOvooQ37IJVk0DZSwztDulwsP2Suh9YTRXQQI8 pEbyqlVLHVrR4J3thBM+3/znPnUL2169lvoXZ7DdsNUfg6zLR0rqHan149Ouujd2OhC4 /ri7cNDiIUUnyr4AMag4ScJ6i8slTjHQc2Iw5y1xcEyWRLp3AIqNuJ9Ro4EDTyv+aXLj nBF1shDcNiBrEWaAd7YazS7VPECkOJ40uJtNSJUistsHBmGa0GjaL61JmHBMnTlPGayK tlv3DBsUGkqo1Q6cGWyjkTjz2qpvaoj2J45OVgWbI1LitEDEgK4PW6WFASbk5/NXm0WC +SKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722404698; x=1723009498; 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=BC/1wGF6ESoob1KqZeUdHt7PS9fgESUzLCWFdRi9eQs=; b=dj6j676jP92sbkcROdIjTBdcDILCsd/W8eYWUidyVLrnfIvPrcRS3Rm2vCAt+Qc7nj u3ILGs62cGMW4INJP14pzUsRvBl2iwTBjSfpMiRetHK8wj9MINHjiZGVvn0SRDDTuvHs irBleMEI4hJOv6YXwD9XdGMyO42avAFCgqLDI3XP3H0jCqrRxZ3lRfSiFL/p/YunPkpy WjR1rbKAexPXu3cTPUCaMxC8SJeyof2dLwwanYRr9A6AczKp/AMsWh/PXSXbW673lGzb holpiOMq2okeEpqBt7zYkKE8+tlUj/DvQ1jgAvUyZcp4eGJo7WP2evv9x7edluLLFLlL ltrA== X-Forwarded-Encrypted: i=1; AJvYcCWKND/MP7sC1Dvvcsm42mQ/kqPAAHWCjMfQMeu3NUXJKV2G5GlyHqvsyn1xF3Ydkw4R2j25m8yQCZwr5M6qtUXmRwZaY0y5oUXen5URjlBeSQd94qk= X-Gm-Message-State: AOJu0YxZm/tVoigLRCTzvT7Ixk094YGs692O/KdtFlzmC2B0iRQUnY7B py8E5tTSZqHp9Z7+eQyLtll4LvJMPeWSqEUtIJPWNgAcvpRof2+6AWcLaMYe8vg= X-Google-Smtp-Source: AGHT+IHxQObfjU980Misuy2+P7JlI9fIsZPaHtla2bfIq7tNqqyqhR+dKEHn/hWwBPXv4Sw1+e+gZg== X-Received: by 2002:a17:902:da91:b0:1fc:560b:1456 with SMTP id d9443c01a7336-1ff047a42d0mr111765665ad.15.1722404697830; Tue, 30 Jul 2024 22:44:57 -0700 (PDT) Received: from localhost.localdomain ([115.240.194.54]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fed7ce4239sm111968755ad.80.2024.07.30.22.44.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jul 2024 22:44:57 -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 v3] dt-bindings: gpio: nxp,lpc3220-gpio: Convert to dtschema Date: Wed, 31 Jul 2024 11:14:30 +0530 Message-ID: <20240731054442.109732-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-20240730_224459_365181_07BF5AFB X-CRM114-Status: GOOD ( 18.43 ) 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 LPC3220 SoC GPIO controller bindings to DT schema format. Cc: Daniel Baluta Signed-off-by: Animesh Agarwal Reviewed-by: Krzysztof Kozlowski --- Changes in v3: - Removed unnecessary #include from example. Changes in v2: - Changed the file name to match the compatible string. - Removed optional from the description of '#gpio-cells' as it was wrongly present. --- .../devicetree/bindings/gpio/gpio_lpc32xx.txt | 43 ---------------- .../bindings/gpio/nxp,lpc3220-gpio.yaml | 50 +++++++++++++++++++ 2 files changed, 50 insertions(+), 43 deletions(-) delete mode 100644 Documentation/devicetree/bindings/gpio/gpio_lpc32xx.txt create mode 100644 Documentation/devicetree/bindings/gpio/nxp,lpc3220-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,lpc3220-gpio.yaml b/Documentation/devicetree/bindings/gpio/nxp,lpc3220-gpio.yaml new file mode 100644 index 000000000000..25b5494393cc --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/nxp,lpc3220-gpio.yaml @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/gpio/nxp,lpc3220-gpio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP LPC3220 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) flags: + - bit 0 specifies polarity (0 for normal, 1 for inverted) + +required: + - compatible + - reg + - gpio-controller + - '#gpio-cells' + +additionalProperties: false + +examples: + - | + gpio@40028000 { + compatible = "nxp,lpc3220-gpio"; + reg = <0x40028000 0x1000>; + gpio-controller; + #gpio-cells = <3>; /* bank, pin, flags */ + };