[PATCH v4 01/15] dt-bindings: iio: adc: stm32-adc: add support for stm32mp23 and stm32mp25
flat view
COOLING4d
REVIEWED: 3 (3M)
From: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Date: 2026-10-06 07:58:29
Also in:
linux-devicetree, linux-iio, lkml
Subsystem:
iio subsystem and drivers, open firmware and flattened device tree bindings, the rest · Maintainers:
Jonathan Cameron, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Torvalds
1 review trailer.
Add stm32mp23 and stm32mp25 compatibles. Three ADCs can be found on these SoCs, split into two blocks: - ADC1 and ADC2 are tightly coupled (common registers). - ADC3 is managed independently. Each ADC has: - 12-bits successive approximation analog-to-digital converter - up to 20 single ended or differential multiplexed channels - different trigger list, or internal channels interconnects, hence add a dedicated compatible for each ADC1, ADC2 and ADC3. The trigger list varies in between the two SoCs. So add a compatible for each SoC/ADC child. STM32 ADC may be in a power domain: allow a single 'power-domains'. Restrict the last channel (19), as it is wired directly to ADC Vref+. It's meaningless to have direct measurement. Internal Vref with calibration data from bsec (nvmem) must be used instead e.g. vrefint. Restrict deprecated properties (st,adc-channels, st,adc-diff-channels, st,min-sample-time-nsecs). Acked-by: Conor Dooley <conor.dooley@microchip.com> Co-developed-by: Cheick Traore <redacted> Signed-off-by: Cheick Traore <redacted> Co-developed-by: Olivier Moysan <olivier.moysan@foss.st.com> Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com> --- Changes in v2: - Drop st,adc-trigger-sel: as discussed with Jonathan, better to describe each ADC child with a dedicated compatible. It is robust approach to distinguish variations in trigger list and internal channels interconnects. - Drop unused fallback compatible. --- .../devicetree/bindings/iio/adc/st,stm32-adc.yaml | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+)
diff --git a/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.yaml b/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.yaml
index c4c4575d3fa9..e7e92fd4959a 100644
--- a/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.yaml@@ -28,6 +28,8 @@ properties: - st,stm32h7-adc-core - st,stm32mp1-adc-core - st,stm32mp13-adc-core + - st,stm32mp23-adc-core + - st,stm32mp25-adc-core reg: maxItems: 1
@@ -78,6 +80,9 @@ properties: Phandle to the vdd input voltage. It can be used to supply ADC analog input switches on stm32mp1. + power-domains: + maxItems: 1 + st,syscfg: description: Phandle to system configuration controller. It can be used to control the
@@ -215,6 +220,33 @@ allOf: maximum: 75000000 default: 75000000 + - if: + properties: + compatible: + contains: + enum: + - st,stm32mp23-adc-core + - st,stm32mp25-adc-core + + then: + properties: + clocks: + maxItems: 1 + + clock-names: + const: adc + + interrupts: + items: + - description: interrupt line for ADC1 or ADC3 + - description: interrupt line for ADC2 + minItems: 1 + + st,max-clk-rate-hz: + minimum: 700000 + maximum: 70000000 + default: 70000000 + additionalProperties: false required:
@@ -244,6 +276,12 @@ patternProperties: - st,stm32h7-adc - st,stm32mp1-adc - st,stm32mp13-adc + - st,stm32mp23-adc1 + - st,stm32mp23-adc2 + - st,stm32mp23-adc3 + - st,stm32mp25-adc1 + - st,stm32mp25-adc2 + - st,stm32mp25-adc3 reg: description: |
@@ -486,6 +524,39 @@ patternProperties: maxItems: 19 items: minimum: 40 + + - if: + properties: + compatible: + contains: + enum: + - st,stm32mp23-adc1 + - st,stm32mp23-adc2 + - st,stm32mp23-adc3 + - st,stm32mp25-adc1 + - st,stm32mp25-adc2 + - st,stm32mp25-adc3 + + then: + properties: + reg: + enum: + - 0x0 + - 0x100 + + interrupts: + minimum: 0 + maximum: 1 + + assigned-resolution-bits: + enum: [6, 8, 10, 12] + default: 12 + + channel@19: false + st,adc-channels: false + st,adc-diff-channels: false + st,min-sample-time-nsecs: false + additionalProperties: false required:
--
2.43.0