dts: bindings: adc: add properties for stm32 adc clock source

Add two properties to define the STM32 ADC clock source:
- Clock source: synchronous or asynchronous
- Clock prescaler
By combining these two parameters, it will be possible to set the desired
ADC clock for most series.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
This commit is contained in:
Guillaume Gautier 2023-06-23 10:14:16 +02:00 committed by Fabio Baltieri
commit 8f197adc30
2 changed files with 47 additions and 2 deletions

View file

@ -27,6 +27,44 @@ properties:
pinctrl-names:
required: true
st,adc-clock-source:
type: int
required: true
enum:
- 1 # SYNC for synchronous ADC clock source
- 2 # ASYNC for asynchronous ADC clock source
description: |
Type of ADC clock source :
- <SYNC>: derived from the bus clock.
- <ASYNC> : independent and asynchronous with the bus clock
One of the two values may not apply to some series. Refer to the RefMan.
st,adc-prescaler:
type: int
required: true
enum:
- 1 # not divided
- 2
- 4
- 6
- 8
- 10
- 12
- 16
- 32
- 64
- 128
- 256
description: |
Clock prescaler at the input of the ADC:
Apply to synchronous or asynchronous clock depending on the STM32
st,adc-clock-source.
Some of the values may not apply to some series, and may depend on the
selected clock source. Refer to the RefMan.
On STM32F3x (except STM32F37x), this configures only the synchronous
prescaler (see properties adcXX-prescaler in st,stm32f3-rcc bindings to
set asynchronous prescaler).
vref-mv:
type: int
default: 3300

View file

@ -5,8 +5,15 @@
description: |
ST STM32F1 family ADC
This compatible stands for all ADC blocks similar to the one on STM32F1,
like F37x.
like STM32F37x.
Remove the st,adc-clock-source and st,adc-prescaler property.
See adc-prescaler property in st,stm32f1-rcc binding to configure ADC
prescaler.
compatible: "st,stm32f1-adc"
include: st,stm32-adc.yaml
include:
- name: st,stm32-adc.yaml
property-blocklist:
- st,adc-clock-source
- st,adc-prescaler