From mboxrd@z Thu Jan 1 00:00:00 1970 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 56782C3ABB2 for ; Wed, 28 May 2025 12:17:52 +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:References:In-Reply-To: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:List-Owner; bh=LbcaZGbt/aOu/lBCcUk69RNM6cMf8NN5vQOyyRIAIOw=; b=LcwaDA26op83jcJfS83zIlCD49 bZ58KlO+QWhlQgfLIh6DVSQigp+xQ5RaldHCUjsbFhBqRjSunCeBkcweH3+df6AYjhzwtGWkxUmv3 oqIA2/X7eVb+P1MkTUyOGP1iG5wq9hgiY88a3xJqKIsaAY7Ga/evxkmRmAB2wW7cs3BLp939VUpXo HfaM8C2Aw41YlDczxdzPOVgHU3h2rQyUhXnnhT7GoKn76wXOsnGrS/IQ7qGGnBUZZhaAehCBq+IY+ dHp9JVZKUa5ey1RVtAVhw6vnvJywLjCXG6spuZCAsPoIqdRrS/7aOfjGDf9igWB5j/nXUmDlNODbL pw5JvR3Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uKFj1-0000000D56C-0lve; Wed, 28 May 2025 12:17:39 +0000 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uKFej-0000000D4Sz-3Aix for linux-arm-kernel@lists.infradead.org; Wed, 28 May 2025 12:13:15 +0000 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-ad89333d603so296133966b.2 for ; Wed, 28 May 2025 05:13:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1748434392; x=1749039192; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LbcaZGbt/aOu/lBCcUk69RNM6cMf8NN5vQOyyRIAIOw=; b=ad5ie1Dcpe5OWtP1ytneRAzy6AtLVBltYulpjL9okjELyekVhSmcElLpBWwNgvw0jI xMBCQktuWS2XI8hc2A4Rus5h1FgEMNRyzYQuWx94S0li2H3owWIQ59rirtsvzLCv6qnl 62SCtDTTlQi8emZeHmlLYbI0azuaJ7Rz6oD/w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748434392; x=1749039192; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LbcaZGbt/aOu/lBCcUk69RNM6cMf8NN5vQOyyRIAIOw=; b=IIi+117LJlO2CurUMeJUHT4Od90UK+dhjxfv8zkpsDlfP+3rGZ1tg43rQ0InH5esgn IN+PisTVufulO70p5A59k2vrAv0zQbG/4ZDGSkb38wRResDgslV5/gfyTIr3Y1Iu2Hkp /cpWptK2wHWBc5eGNhajahNPdxfaqldqBVc7Li55Cj1vO5u63mJgZMb8iANBlkqlC/v+ Skwfzuo7uobBH/LHIrS+geEoqa0WKUp89NMacVddj5ZcTq1znpK5qub5GXo7X6MW3qaO RWiZ3HpftWqGDGIDN7ttn+hf8/hGDUSvo/mDUpZYSoHJ9PydB/qmEdi5zVTdKvK9lMqY tJbw== X-Forwarded-Encrypted: i=1; AJvYcCUz4HGX0ULPahppL9LhFWzmKn/omsJ0/Iuz8Zgx4FN7oTEDtx5jvG6CYOzNyFhIyUg3p5oqm0XzUGbDNhHWIpS9@lists.infradead.org X-Gm-Message-State: AOJu0YxnUwT0gR0wPJ02kucxy2xrdzSom3XNcFYK1KEXkicG6szJNqDK X130YQM9KdZyHb8UQ9K/gyfOHI3n/CQ4PADteC1kK9nHcXf8rDW0ryDq1A9ywK2otaI= X-Gm-Gg: ASbGncu0zYjqbFndc20NMAg8XqTknOt4MOqY8vEy5GD03mV5frOLe2m8X1dyhDAKTBa g+gFjwLeaAgw0K/deP9p5rCaqux/EbbsWi1t5Va2XXuQOdoyvAvtcN3lqESXyf+D3CkwvKcApiv zi1y4cOW7DNA30DHE6qu2jpx3u3tIttzzvFXa1ELcoPDNDDTV4OKqX0RZNe1TLmTVVne6VWv/Ma fIfhIYv/sdrHLfntTeghtacEpCZUklAOFnA5Etbx5OG4jor0xo1GC4DSaDTkzxDRXGbXVY57hxK rBD69XMt2N3iRti2p5w6hLRH+q1OInIg370Gr8YLUfvLsxWTHQFI6KA4CnUB45uRDbXxI2Ivyjb +S4Q+Qnr9X+BS X-Google-Smtp-Source: AGHT+IH9dXEwPMbdH9wy3rWwV7hw5jvz1DJDb7y8RMmtXntuIkZHQwYgbcjzUf91UXx0NsuCLx/ImQ== X-Received: by 2002:a17:907:2d0e:b0:ad8:89c7:2735 with SMTP id a640c23a62f3a-ad889c72964mr703027166b.58.1748434391971; Wed, 28 May 2025 05:13:11 -0700 (PDT) Received: from localhost.localdomain ([2001:b07:6474:ebbf:5631:61bf:398a:c492]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ad8a1b5b8afsm98523266b.170.2025.05.28.05.13.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 May 2025 05:13:11 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: michael@amarulasolutions.com, linux-amarula@amarulasolutions.com, Dario Binacchi , Conor Dooley , Fabio Estevam , Krzysztof Kozlowski , Lee Jones , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 1/4] dt-bindings: mfd: convert mxs-lradc bindings to json-schema Date: Wed, 28 May 2025 14:11:38 +0200 Message-ID: <20250528121306.1464830-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250528121306.1464830-1-dario.binacchi@amarulasolutions.com> References: <20250528121306.1464830-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250528_051313_794985_094BD1C0 X-CRM114-Status: GOOD ( 21.14 ) 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 Freescale MXS Low-Resoulution ADC (LRADC) device tree binding documentation to json-schema. The clocks and #io-channel-cells properties have also been added; They are present in the respective SoC DTSI files but were missing from the old mxs-lradc.txt file. Signed-off-by: Dario Binacchi --- (no changes since v1) .../devicetree/bindings/mfd/mxs-lradc.txt | 45 -------- .../devicetree/bindings/mfd/mxs-lradc.yaml | 106 ++++++++++++++++++ 2 files changed, 106 insertions(+), 45 deletions(-) delete mode 100644 Documentation/devicetree/bindings/mfd/mxs-lradc.txt create mode 100644 Documentation/devicetree/bindings/mfd/mxs-lradc.yaml diff --git a/Documentation/devicetree/bindings/mfd/mxs-lradc.txt b/Documentation/devicetree/bindings/mfd/mxs-lradc.txt deleted file mode 100644 index 755cbef0647d..000000000000 --- a/Documentation/devicetree/bindings/mfd/mxs-lradc.txt +++ /dev/null @@ -1,45 +0,0 @@ -* Freescale MXS LRADC device driver - -Required properties: -- compatible: Should be "fsl,imx23-lradc" for i.MX23 SoC and "fsl,imx28-lradc" - for i.MX28 SoC -- reg: Address and length of the register set for the device -- interrupts: Should contain the LRADC interrupts - -Optional properties: -- fsl,lradc-touchscreen-wires: Number of wires used to connect the touchscreen - to LRADC. Valid value is either 4 or 5. If this - property is not present, then the touchscreen is - disabled. 5 wires is valid for i.MX28 SoC only. -- fsl,ave-ctrl: number of samples per direction to calculate an average value. - Allowed value is 1 ... 32, default is 4 -- fsl,ave-delay: delay between consecutive samples. Allowed value is - 2 ... 2048. It is used if 'fsl,ave-ctrl' > 1, counts at - 2 kHz and its default is 2 (= 1 ms) -- fsl,settling: delay between plate switch to next sample. Allowed value is - 1 ... 2047. It counts at 2 kHz and its default is - 10 (= 5 ms) - -Example for i.MX23 SoC: - - lradc@80050000 { - compatible = "fsl,imx23-lradc"; - reg = <0x80050000 0x2000>; - interrupts = <36 37 38 39 40 41 42 43 44>; - fsl,lradc-touchscreen-wires = <4>; - fsl,ave-ctrl = <4>; - fsl,ave-delay = <2>; - fsl,settling = <10>; - }; - -Example for i.MX28 SoC: - - lradc@80050000 { - compatible = "fsl,imx28-lradc"; - reg = <0x80050000 0x2000>; - interrupts = <10 14 15 16 17 18 19 20 21 22 23 24 25>; - fsl,lradc-touchscreen-wires = <5>; - fsl,ave-ctrl = <4>; - fsl,ave-delay = <2>; - fsl,settling = <10>; - }; diff --git a/Documentation/devicetree/bindings/mfd/mxs-lradc.yaml b/Documentation/devicetree/bindings/mfd/mxs-lradc.yaml new file mode 100644 index 000000000000..90391b02c715 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/mxs-lradc.yaml @@ -0,0 +1,106 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/mxs-lradc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale MXS Low-Resoulution ADC (LRADC) + +maintainers: + - Dario Binacchi + +description: | + The LRADC provides 16 physical channels of 12-bit resolution + for analog-to-digital conversion and includes an integrated + 4-wire/5-wire touchscreen controller. + +properties: + compatible: + items: + - enum: + - fsl,imx23-lradc + - fsl,imx28-lradc + + reg: + maxItems: 1 + + clocks: + minItems: 1 + + interrupts: + minItems: 9 + maxItems: 13 + + fsl,lradc-touchscreen-wires: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Number of wires used to connect the touchscreen to LRADC. + If this property is not present, then the touchscreen is disabled. + + fsl,ave-ctrl: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 1 + maximum: 32 + default: 4 + description: | + Number of samples per direction to calculate an average value. + + fsl,ave-delay: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 2 + maximum: 2048 + default: 2 + description: | + Delay between consecutive samples. + It is used if 'fsl,ave-ctrl' > 1, counts at 2 kHz and its + default value (i. e. 2) is 1 ms. + + fsl,settling: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 1 + maximum: 2047 + default: 10 + description: | + Delay between plate switch to next sample. + It counts at 2 kHz and its default (i. e. 10) is 5 ms. + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - clocks + - interrupts + +if: + properties: + compatible: + contains: + enum: + - fsl,imx23-lradc +then: + properties: + fsl,lradc-touchscreen-wires: + const: 4 +else: + properties: + fsl,lradc-touchscreen-wires: + enum: [4, 5] + +additionalProperties: false + +examples: + - | + lradc@80050000 { + compatible = "fsl,imx23-lradc"; + reg = <0x80050000 0x2000>; + interrupts = <36>, <37>, <38>, <39>, <40>, + <41>, <42>, <43>, <44>; + clocks = <&clks 26>; + #io-channel-cells = <1>; + fsl,lradc-touchscreen-wires = <4>; + fsl,ave-ctrl = <4>; + fsl,ave-delay = <2>; + fsl,settling = <10>; + }; -- 2.43.0