linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/6] Add ADCs support for RZ/T2H and RZ/N2H
@ 2025-10-05 11:13 Cosmin Tanislav
  2025-10-05 11:13 ` [PATCH v4 1/6] dt-bindings: iio: adc: document RZ/T2H and RZ/N2H ADC Cosmin Tanislav
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Cosmin Tanislav @ 2025-10-05 11:13 UTC (permalink / raw)
  Cc: Cosmin Tanislav, Jonathan Cameron, David Lechner, Nuno Sá,
	Andy Shevchenko, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Geert Uytterhoeven, Magnus Damm, linux-iio, linux-renesas-soc,
	devicetree, linux-kernel

Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs include three
12-Bit successive approximation A/D converters.

RZ/T2H has two ADCs with 4 channels and one with 6.
RZ/N2H has two ADCs with 4 channels and one with 15.

Add support for them.

V4:
 * pick up tags
 * require r9a09g077 as fallback for r9a09g087
 * remove per-SoC restrictions
 * add depends on ARCH_RENESAS || COMPILE_TEST
 * inline RZT2H_NAME, RZT2H_ADC_VREF_MV, RZT2H_ADC_RESOLUTION values
 * remove renesas,r9a09g087-adc from of_match_table

V3:
 * remove leftover renesas,max-channels property from SoC dts
 * split rzt2h_adc_start_stop() into rzt2h_adc_start() and
   rzt2h_adc_stop(), getting rid of mask variable
 * use FIELD_MODIFY() to clear and set at the same time
 * switch from guard(mutex) to mutex_lock() & mutex_unlock() to keep
   pm_runtime_put_autosuspend() out of the mutex and to avoid using both
   guard() and goto in the same function
 * inline ret and irq declarations
 * use private state rather than indio_dev for platform_set_drvdata() to
   avoid extra pointer arithmetic
 * pick up Reviewed-by for the driver from Nuno
 * pick up Acked-by for the bindings from Conor
 * pick up Reviewed-by for the bindings from Geert

V2:
 * pick up Reviewed-by from Geert
 * dt-bindings: move required after patternProperties
 * dt-bindings: describe 16 channels, but limit per-SoC to 6 / 15
 * dt-bindings: use uppercase for clock descriptions
 * remove max-channels property and find it from parsed channel subnodes
 * remove start/stop wrappers
 * stop calibration even on failure
 * move data reading to rzt2h_adc_read_single() instead of interrupt
 * handler

Cosmin Tanislav (6):
  dt-bindings: iio: adc: document RZ/T2H and RZ/N2H ADC
  iio: adc: add RZ/T2H / RZ/N2H ADC driver
  arm64: dts: renesas: r9a09g077: Add ADCs support
  arm64: dts: renesas: r9a09g087: Add ADCs support
  arm64: dts: renesas: rzt2h/rzn2h-evk: enable ADCs
  arm64: defconfig: enable RZ/T2H / RZ/N2H ADC driver

 .../iio/adc/renesas,r9a09g077-adc.yaml        | 135 ++++++++
 MAINTAINERS                                   |   8 +
 arch/arm64/boot/dts/renesas/r9a09g077.dtsi    |  66 ++++
 .../dts/renesas/r9a09g077m44-rzt2h-evk.dts    |  28 ++
 arch/arm64/boot/dts/renesas/r9a09g087.dtsi    |  66 ++++
 .../dts/renesas/r9a09g087m44-rzn2h-evk.dts    |  64 ++++
 .../dts/renesas/rzt2h-n2h-evk-common.dtsi     |  79 +++++
 arch/arm64/configs/defconfig                  |   1 +
 drivers/iio/adc/Kconfig                       |  11 +
 drivers/iio/adc/Makefile                      |   1 +
 drivers/iio/adc/rzt2h_adc.c                   | 304 ++++++++++++++++++
 11 files changed, 763 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/renesas,r9a09g077-adc.yaml
 create mode 100644 drivers/iio/adc/rzt2h_adc.c

-- 
2.51.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-10-21  7:47 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-05 11:13 [PATCH v4 0/6] Add ADCs support for RZ/T2H and RZ/N2H Cosmin Tanislav
2025-10-05 11:13 ` [PATCH v4 1/6] dt-bindings: iio: adc: document RZ/T2H and RZ/N2H ADC Cosmin Tanislav
2025-10-05 11:13 ` [PATCH v4 2/6] iio: adc: add RZ/T2H / RZ/N2H ADC driver Cosmin Tanislav
2025-10-05 11:13 ` [PATCH v4 3/6] arm64: dts: renesas: r9a09g077: Add ADCs support Cosmin Tanislav
2025-10-21  7:46   ` Geert Uytterhoeven
2025-10-05 11:13 ` [PATCH v4 4/6] arm64: dts: renesas: r9a09g087: " Cosmin Tanislav
2025-10-21  7:46   ` Geert Uytterhoeven
2025-10-05 11:13 ` [PATCH v4 5/6] arm64: dts: renesas: rzt2h/rzn2h-evk: enable ADCs Cosmin Tanislav
2025-10-21  7:47   ` Geert Uytterhoeven
2025-10-05 11:13 ` [PATCH v4 6/6] arm64: defconfig: enable RZ/T2H / RZ/N2H ADC driver Cosmin Tanislav
2025-10-21  7:47   ` Geert Uytterhoeven
2025-10-12 14:16 ` [PATCH v4 0/6] Add ADCs support for RZ/T2H and RZ/N2H Jonathan Cameron

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).