From: Rob Herring <robh@kernel.org>
To: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Cc: linux-kernel@vger.kernel.org, michael@amarulasolutions.com,
linux-amarula@amarulasolutions.com,
Conor Dooley <conor.dooley@microchip.com>,
Conor Dooley <conor+dt@kernel.org>,
Fabio Estevam <festevam@gmail.com>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Lee Jones <lee@kernel.org>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Sascha Hauer <s.hauer@pengutronix.de>,
Shawn Guo <shawnguo@kernel.org>,
devicetree@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 1/4] dt-bindings: mfd: convert mxs-lradc bindings to json-schema
Date: Thu, 29 May 2025 07:51:17 -0500 [thread overview]
Message-ID: <20250529125117.GA2750225-robh@kernel.org> (raw)
In-Reply-To: <20250529083201.2286915-2-dario.binacchi@amarulasolutions.com>
On Thu, May 29, 2025 at 10:31:04AM +0200, Dario Binacchi wrote:
> 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 <dario.binacchi@amarulasolutions.com>
> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
>
> ---
>
> Changes in v3:
> - Add Reviewed-by tag of Conor Dooley
>
> .../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 <dario.binacchi@amarulasolutions.com>
> +
> +description: |
Don't need '|' unless there is formatting to preserve.
> + 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.
Wrap lines at 80 char.
> +
> +properties:
> + compatible:
> + items:
> + - enum:
> + - fsl,imx23-lradc
> + - fsl,imx28-lradc
> +
> + reg:
> + maxItems: 1
> +
> + clocks:
> + minItems: 1
> +
> + interrupts:
> + minItems: 9
> + maxItems: 13
Please describe what each interrupt is. Unless they are all the same
(e.g. 1 interrupt per ADC channel), you need to list them out.
> +
> + 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.
Don't need '|'. Unless this is supposed to be 2 paragraphs. In that
case, add a blank line between paragraphs. Same comment on the rest.
> +
> + 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]
Move this constraint to the top level and drop the 'else'.
> +
> +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
>
next prev parent reply other threads:[~2025-05-29 13:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-29 8:31 [PATCH v3 0/4] Support i.MX28 Amarula rmm board Dario Binacchi
2025-05-29 8:31 ` [PATCH v3 1/4] dt-bindings: mfd: convert mxs-lradc bindings to json-schema Dario Binacchi
2025-05-29 12:51 ` Rob Herring [this message]
2025-05-29 8:31 ` [PATCH v3 2/4] ARM: dts: imx28: add pwm7 muxing options Dario Binacchi
2025-05-29 8:31 ` [PATCH v3 4/4] ARM: dts: mxs: support i.MX28 Amarula rmm board Dario Binacchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250529125117.GA2750225-robh@kernel.org \
--to=robh@kernel.org \
--cc=conor+dt@kernel.org \
--cc=conor.dooley@microchip.com \
--cc=dario.binacchi@amarulasolutions.com \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=linux-amarula@amarulasolutions.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@amarulasolutions.com \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).