[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdVEDJZ6wdGZs_CDs=jLPV1u382o6=cZ1HfKQOffGf7jGw@mail.gmail.com>
Date: Wed, 24 Sep 2025 09:51:17 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@...esas.com>
Cc: Jonathan Cameron <jic23@...nel.org>, David Lechner <dlechner@...libre.com>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Geert Uytterhoeven <geert+renesas@...der.be>, Magnus Damm <magnus.damm@...il.com>,
Michael Turquette <mturquette@...libre.com>, Stephen Boyd <sboyd@...nel.org>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>, linux-iio@...r.kernel.org,
linux-renesas-soc@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-clk@...r.kernel.org
Subject: Re: [PATCH 2/7] dt-bindings: iio: adc: document RZ/T2H and RZ/N2H ADC
Hi Cosmin,
On Tue, 23 Sept 2025 at 18:06, Cosmin Tanislav
<cosmin-gabriel.tanislav.xa@...esas.com> wrote:
> Document the A/D 12-Bit successive approximation converters found in the
> Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs.
>
> RZ/T2H has two ADCs with 4 channels and one with 6.
> RZ/N2H has two ADCs with 4 channels and one with 15.
>
> Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@...esas.com>
Thanks for your patch!
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/renesas,r9a09g077-adc.yaml
> @@ -0,0 +1,170 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/adc/renesas,r9a09g077-adc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Renesas RZ/T2H / RZ/N2H ADC12
> +
> +maintainers:
> + - Cosmin Tanislav <cosmin-gabriel.tanislav.xa@...esas.com>
> +
> +description: |
> + A/D Converter block is a successive approximation analog-to-digital converter
> + with a 12-bit accuracy. Up to 15 analog input channels can be selected.
The documentation for several registers talks about bitmasks for ch0-ch15,
so the actual hardware block supports up to 16 channels.
> + Conversions can be performed in single or continuous mode. Result of the ADC
> + is stored in a 16-bit data register corresponding to each channel.
> +
> +properties:
> + compatible:
> + enum:
> + - renesas,r9a09g077-adc # RZ/T2H
> + - renesas,r9a09g087-adc # RZ/N2H
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + items:
> + - description: A/D scan end interrupt
> + - description: A/D scan end interrupt for Group B
> + - description: A/D scan end interrupt for Group C
> + - description: Window A compare match
> + - description: Window B compare match
> + - description: Compare match
> + - description: Compare mismatch
> +
> + interrupt-names:
> + items:
> + - const: adi
> + - const: gbadi
> + - const: gcadi
> + - const: cmpai
> + - const: cmpbi
> + - const: wcmpm
> + - const: wcmpum
> +
> + clocks:
> + items:
> + - description: converter clock
Converter
> + - description: peripheral clock
Peripheral
> +
> + clock-names:
> + items:
> + - const: adclk
> + - const: pclk
> +
> + power-domains:
> + maxItems: 1
> +
> + renesas,max-channels:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: |
> + Maximum number of channels supported by the ADC.
> + RZ/T2H has two ADCs with 4 channels and one with 6 channels.
> + RZ/N2H has two ADCs with 4 channels and one with 15 channels.
According to the documentation, both SoCs have three instances?
I agree with Connor that this should be dropped: the same information
is available from the channel@N subnodes, and future SoCs could have
gaps in the numbering.
FTR, from a quick glance, it looks like this module is very similar
to the ADC on RZ/A2M, so I hope we can reuse the driver for that SoC.
> +patternProperties:
> + "^channel@[0-9a-e]$":
0-9a-f
> + $ref: adc.yaml
> + type: object
> + description: The external channels which are connected to the ADC.
> +
> + properties:
> + reg:
> + description: The channel number.
> + maximum: 14
15
But I don't think it is needed, as the dtc check for non-matching unit
addresses and reg properties should already enforce this.
> +
> + required:
> + - reg
> +
> + additionalProperties: false
> +
> +allOf:
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: renesas,r9a09g077-adc
> + then:
> + properties:
> + renesas,max-channels:
> + enum: [4, 6]
> +
> + patternProperties:
> + "^channel@[6-9a-e]$": false
6-9a-f
> + "^channel@[0-5]$":
> + properties:
> + reg:
> + maximum: 5
Not needed as per above.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists