Commit 6cafcdb1 authored by Olivier Moysan's avatar Olivier Moysan Committed by Jonathan Cameron

dt-bindings: iio: adc: stm32-adc: add stm32mp13 compatibles

Add st,stm32mp13-adc-core and st,stm32mp13-adc compatibles
to support STM32MPU13 SoC.

On STM32MP13x, each ADC peripheral has a single ADC block.
These ADC peripherals, ADC1 and ADC2, are fully independent.

Main characteristics of STM32MP13x ADC:
- One interrupt line per ADC
- 6 to 12 bits resolution
- 19 channels

ADC2 instance supports two extra internal channels VDDCPU and VDDQ_DDR.
Add "vddcpu" and "vddq_ddr" internal channels names to the reserved
labels list.
Signed-off-by: default avatarOlivier Moysan <olivier.moysan@foss.st.com>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20221012142205.13041-3-olivier.moysan@foss.st.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent cd83c5c1
...@@ -27,6 +27,7 @@ properties: ...@@ -27,6 +27,7 @@ properties:
- st,stm32f4-adc-core - st,stm32f4-adc-core
- st,stm32h7-adc-core - st,stm32h7-adc-core
- st,stm32mp1-adc-core - st,stm32mp1-adc-core
- st,stm32mp13-adc-core
reg: reg:
maxItems: 1 maxItems: 1
...@@ -37,6 +38,7 @@ properties: ...@@ -37,6 +38,7 @@ properties:
- stm32f4 and stm32h7 share a common ADC interrupt line. - stm32f4 and stm32h7 share a common ADC interrupt line.
- stm32mp1 has two separate interrupt lines, one for each ADC within - stm32mp1 has two separate interrupt lines, one for each ADC within
ADC block. ADC block.
- stm32mp13 has an interrupt line per ADC block.
minItems: 1 minItems: 1
maxItems: 2 maxItems: 2
...@@ -180,6 +182,33 @@ allOf: ...@@ -180,6 +182,33 @@ allOf:
maximum: 36000000 maximum: 36000000
default: 36000000 default: 36000000
- if:
properties:
compatible:
contains:
const: st,stm32mp13-adc-core
then:
properties:
clocks:
minItems: 1
maxItems: 2
clock-names:
items:
- const: bus
- const: adc
minItems: 1
interrupts:
items:
- description: ADC interrupt line
st,max-clk-rate-hz:
minimum: 150000
maximum: 75000000
default: 75000000
additionalProperties: false additionalProperties: false
required: required:
...@@ -208,6 +237,7 @@ patternProperties: ...@@ -208,6 +237,7 @@ patternProperties:
- st,stm32f4-adc - st,stm32f4-adc
- st,stm32h7-adc - st,stm32h7-adc
- st,stm32mp1-adc - st,stm32mp1-adc
- st,stm32mp13-adc
reg: reg:
description: | description: |
...@@ -229,7 +259,7 @@ patternProperties: ...@@ -229,7 +259,7 @@ patternProperties:
interrupts: interrupts:
description: | description: |
IRQ Line for the ADC instance. Valid values are: IRQ Line for the ADC instance. Valid values are:
- 0 for adc@0 - 0 for adc@0 (single adc for stm32mp13)
- 1 for adc@100 - 1 for adc@100
- 2 for adc@200 (stm32f4 only) - 2 for adc@200 (stm32f4 only)
maxItems: 1 maxItems: 1
...@@ -250,13 +280,14 @@ patternProperties: ...@@ -250,13 +280,14 @@ patternProperties:
assigned-resolution-bits: assigned-resolution-bits:
description: | description: |
Resolution (bits) to use for conversions: Resolution (bits) to use for conversions:
- can be 6, 8, 10 or 12 on stm32f4 - can be 6, 8, 10 or 12 on stm32f4 and stm32mp13
- can be 8, 10, 12, 14 or 16 on stm32h7 and stm32mp1 - can be 8, 10, 12, 14 or 16 on stm32h7 and stm32mp1
st,adc-channels: st,adc-channels:
description: | description: |
List of single-ended channels muxed for this ADC. It can have up to: 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 - 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 - 20 channels, numbered from 0 to 19 (for in0..in19) on stm32h7 and
stm32mp1. stm32mp1.
$ref: /schemas/types.yaml#/definitions/uint32-array $ref: /schemas/types.yaml#/definitions/uint32-array
...@@ -322,7 +353,7 @@ patternProperties: ...@@ -322,7 +353,7 @@ patternProperties:
label: label:
description: | description: |
Unique name to identify which channel this is. Unique name to identify which channel this is.
Reserved label names "vddcore", "vrefint" and "vbat" Reserved label names "vddcore", "vddcpu", "vddq_ddr", "vrefint" and "vbat"
are used to identify internal channels with matching names. are used to identify internal channels with matching names.
diff-channels: diff-channels:
...@@ -419,6 +450,37 @@ patternProperties: ...@@ -419,6 +450,37 @@ patternProperties:
items: items:
minimum: 40 minimum: 40
- if:
properties:
compatible:
contains:
const: st,stm32mp13-adc
then:
properties:
reg:
const: 0x0
interrupts:
const: 0
assigned-resolution-bits:
enum: [6, 8, 10, 12]
default: 12
st,adc-channels:
minItems: 1
maxItems: 19
items:
minimum: 0
maximum: 18
st,min-sample-time-nsecs:
minItems: 1
maxItems: 19
items:
minimum: 40
additionalProperties: false additionalProperties: false
required: required:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment