[PATCH 1/8] dt-bindings: iio: adc: stm32-adc: add support for stm32mp23 and stm32mp25
From: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Date: 2026-09-11 15:51:48
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
Add stm32mp23 and stm32mp25 compatibles. Three ADCs can be found on these SoCs, split into two blocks: - ADC12 are tightly coupled (common registers). - ADC3 is managed independently. Each ADC is a 12-bits successive approximation analog-to-digital converter, with up to 20 multiplexed channels that can be configured as single ended or differential. New property "st,adc-trigger-sel " allow to make the difference between the ADCs and to apply the correct trigger configuration. 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). 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> --- .../devicetree/bindings/iio/adc/st,stm32-adc.yaml | 106 ++++++++++++++++++--- 1 file changed, 94 insertions(+), 12 deletions(-)
diff --git a/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.yaml b/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.yaml
index c4c4575d3fa9..0e0ceaa3d8d6 100644
--- a/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.yaml@@ -23,11 +23,18 @@ maintainers: properties: compatible: - enum: - - st,stm32f4-adc-core - - st,stm32h7-adc-core - - st,stm32mp1-adc-core - - st,stm32mp13-adc-core + oneOf: + - items: + - enum: + - st,stm32f4-adc-core + - st,stm32h7-adc-core + - st,stm32mp1-adc-core + - st,stm32mp13-adc-core + - items: + - enum: + - st,stm32mp23-adc-core + - st,stm32mp25-adc-core + - const: st,stm32-adc-core reg: maxItems: 1
@@ -78,6 +85,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 +225,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:
@@ -239,11 +276,18 @@ patternProperties: properties: compatible: - enum: - - st,stm32f4-adc - - st,stm32h7-adc - - st,stm32mp1-adc - - st,stm32mp13-adc + oneOf: + - items: + - enum: + - st,stm32f4-adc + - st,stm32h7-adc + - st,stm32mp1-adc + - st,stm32mp13-adc + - items: + - enum: + - st,stm32mp23-adc + - st,stm32mp25-adc + - const: st,stm32-adc reg: description: |
@@ -294,8 +338,8 @@ patternProperties: List of single-ended channels muxed for this ADC. It can have up to: - 16 channels, numbered from 0 to 15 (for in0..in15) on stm32f4 - 19 channels, numbered from 0 to 18 (for in0..in18) on stm32mp13. - - 20 channels, numbered from 0 to 19 (for in0..in19) on stm32h7 and - stm32mp1. + - 20 channels, numbered from 0 to 19 (for in0..in19) on stm32h7, + stm32mp1, stm32mp23 and stm32mp25. $ref: /schemas/types.yaml#/definitions/uint32-array deprecated: true
@@ -344,6 +388,12 @@ patternProperties: items: - const: vrefint + st,adc-trigger-sel: + description: Selects the HW trigger configuration available on this ADC + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1] + default: 0 + patternProperties: "^channel@([0-9]|1[0-9])$": type: object
@@ -486,6 +536,38 @@ patternProperties: maxItems: 19 items: minimum: 40 + + - if: + properties: + compatible: + contains: + enum: + - st,stm32mp23-adc + - st,stm32mp25-adc + + 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 + + required: + - st,adc-trigger-sel + additionalProperties: false required:
--
2.43.0