dts: bindings: adc: stm32: add oversampler

On STM32 ADC, there are currently two types of oversamplers (if present),
one with 8 available oversampling values, the other with 1024.
To simplify the driver, add the oversampler as a dts property.
Also add defines to avoid magic values in the dtsi.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
This commit is contained in:
Guillaume Gautier 2024-12-12 17:04:43 +01:00 committed by Benjamin Cabé
parent fb5ff902e8
commit 49e2511dc6

View file

@ -104,5 +104,18 @@ properties:
- <NOT_FULLY_CONFIGURABLE>: Not fully configurable sequencer
- <FULLY_CONFIGURABLE>: Fully configurable sequencer
st,adc-oversampler:
type: string
required: true
enum:
- "OVERSAMPLER_NONE"
- "OVERSAMPLER_MINIMAL"
- "OVERSAMPLER_EXTENDED"
description: |
Type of ADC oversampler:
- "OVERSAMPLER_NONE": No oversampler
- "OVERSAMPLER_MINIMAL": Oversampler with 8 possible oversampling values (2, 4, 8, ..., 256)
- "OVERSAMPLER_EXTENDED": Oversampler with 1024 possible oversampling values (1..1024)
io-channel-cells:
- input