1a8cf1723SFabrice Gasnier# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2a8cf1723SFabrice Gasnier%YAML 1.2 3a8cf1723SFabrice Gasnier--- 46f63c90aSFabrice Gasnier$id: "http://devicetree.org/schemas/iio/adc/st,stm32-adc.yaml#" 5a8cf1723SFabrice Gasnier$schema: "http://devicetree.org/meta-schemas/core.yaml#" 6a8cf1723SFabrice Gasnier 7a8cf1723SFabrice Gasniertitle: STMicroelectronics STM32 ADC bindings 8a8cf1723SFabrice Gasnier 9a8cf1723SFabrice Gasnierdescription: | 10a8cf1723SFabrice Gasnier STM32 ADC is a successive approximation analog-to-digital converter. 11a8cf1723SFabrice Gasnier It has several multiplexed input channels. Conversions can be performed 12a8cf1723SFabrice Gasnier in single, continuous, scan or discontinuous mode. Result of the ADC is 13a8cf1723SFabrice Gasnier stored in a left-aligned or right-aligned 32-bit data register. 14a8cf1723SFabrice Gasnier Conversions can be launched in software or using hardware triggers. 15a8cf1723SFabrice Gasnier 16a8cf1723SFabrice Gasnier The analog watchdog feature allows the application to detect if the input 17a8cf1723SFabrice Gasnier voltage goes beyond the user-defined, higher or lower thresholds. 18a8cf1723SFabrice Gasnier 19a8cf1723SFabrice Gasnier Each STM32 ADC block can have up to 3 ADC instances. 20a8cf1723SFabrice Gasnier 21a8cf1723SFabrice Gasniermaintainers: 22a8cf1723SFabrice Gasnier - Fabrice Gasnier <fabrice.gasnier@st.com> 23a8cf1723SFabrice Gasnier 24a8cf1723SFabrice Gasnierproperties: 25a8cf1723SFabrice Gasnier compatible: 26a8cf1723SFabrice Gasnier enum: 27a8cf1723SFabrice Gasnier - st,stm32f4-adc-core 28a8cf1723SFabrice Gasnier - st,stm32h7-adc-core 29a8cf1723SFabrice Gasnier - st,stm32mp1-adc-core 30a8cf1723SFabrice Gasnier 31a8cf1723SFabrice Gasnier reg: 32a8cf1723SFabrice Gasnier maxItems: 1 33a8cf1723SFabrice Gasnier 34a8cf1723SFabrice Gasnier interrupts: 35a8cf1723SFabrice Gasnier description: | 36a8cf1723SFabrice Gasnier One or more interrupts for ADC block, depending on part used: 37a8cf1723SFabrice Gasnier - stm32f4 and stm32h7 share a common ADC interrupt line. 38a8cf1723SFabrice Gasnier - stm32mp1 has two separate interrupt lines, one for each ADC within 39a8cf1723SFabrice Gasnier ADC block. 40a8cf1723SFabrice Gasnier minItems: 1 41a8cf1723SFabrice Gasnier maxItems: 2 42a8cf1723SFabrice Gasnier 43a8cf1723SFabrice Gasnier clocks: 44*0499220dSRob Herring minItems: 1 45*0499220dSRob Herring maxItems: 2 46a8cf1723SFabrice Gasnier description: | 47a8cf1723SFabrice Gasnier Core can use up to two clocks, depending on part used: 48a8cf1723SFabrice Gasnier - "adc" clock: for the analog circuitry, common to all ADCs. 49a8cf1723SFabrice Gasnier It's required on stm32f4. 50a8cf1723SFabrice Gasnier It's optional on stm32h7 and stm32mp1. 51a8cf1723SFabrice Gasnier - "bus" clock: for registers access, common to all ADCs. 52a8cf1723SFabrice Gasnier It's not present on stm32f4. 53a8cf1723SFabrice Gasnier It's required on stm32h7 and stm32mp1. 54a8cf1723SFabrice Gasnier 55a8cf1723SFabrice Gasnier clock-names: true 56a8cf1723SFabrice Gasnier 57a8cf1723SFabrice Gasnier st,max-clk-rate-hz: 58a8cf1723SFabrice Gasnier description: 59a8cf1723SFabrice Gasnier Allow to specify desired max clock rate used by analog circuitry. 60a8cf1723SFabrice Gasnier 61a8cf1723SFabrice Gasnier vdda-supply: 62a8cf1723SFabrice Gasnier description: Phandle to the vdda input analog voltage. 63a8cf1723SFabrice Gasnier 64a8cf1723SFabrice Gasnier vref-supply: 65a8cf1723SFabrice Gasnier description: Phandle to the vref input analog reference voltage. 66a8cf1723SFabrice Gasnier 67a8cf1723SFabrice Gasnier booster-supply: 68a8cf1723SFabrice Gasnier description: 69a8cf1723SFabrice Gasnier Phandle to the embedded booster regulator that can be used to supply ADC 70a8cf1723SFabrice Gasnier analog input switches on stm32h7 and stm32mp1. 71a8cf1723SFabrice Gasnier 72a8cf1723SFabrice Gasnier vdd-supply: 73a8cf1723SFabrice Gasnier description: 74a8cf1723SFabrice Gasnier Phandle to the vdd input voltage. It can be used to supply ADC analog 75a8cf1723SFabrice Gasnier input switches on stm32mp1. 76a8cf1723SFabrice Gasnier 77a8cf1723SFabrice Gasnier st,syscfg: 78a8cf1723SFabrice Gasnier description: 79a8cf1723SFabrice Gasnier Phandle to system configuration controller. It can be used to control the 80a8cf1723SFabrice Gasnier analog circuitry on stm32mp1. 813d21a460SRob Herring $ref: "/schemas/types.yaml#/definitions/phandle-array" 82a8cf1723SFabrice Gasnier 83a8cf1723SFabrice Gasnier interrupt-controller: true 84a8cf1723SFabrice Gasnier 85a8cf1723SFabrice Gasnier '#interrupt-cells': 86a8cf1723SFabrice Gasnier const: 1 87a8cf1723SFabrice Gasnier 88a8cf1723SFabrice Gasnier '#address-cells': 89a8cf1723SFabrice Gasnier const: 1 90a8cf1723SFabrice Gasnier 91a8cf1723SFabrice Gasnier '#size-cells': 92a8cf1723SFabrice Gasnier const: 0 93a8cf1723SFabrice Gasnier 94a8cf1723SFabrice GasnierallOf: 95a8cf1723SFabrice Gasnier - if: 96a8cf1723SFabrice Gasnier properties: 97a8cf1723SFabrice Gasnier compatible: 98a8cf1723SFabrice Gasnier contains: 99a8cf1723SFabrice Gasnier const: st,stm32f4-adc-core 100a8cf1723SFabrice Gasnier 101a8cf1723SFabrice Gasnier then: 102a8cf1723SFabrice Gasnier properties: 103a8cf1723SFabrice Gasnier clocks: 104a8cf1723SFabrice Gasnier maxItems: 1 105a8cf1723SFabrice Gasnier 106a8cf1723SFabrice Gasnier clock-names: 107a8cf1723SFabrice Gasnier const: adc 108a8cf1723SFabrice Gasnier 109a8cf1723SFabrice Gasnier interrupts: 110a8cf1723SFabrice Gasnier items: 111a8cf1723SFabrice Gasnier - description: interrupt line common for all ADCs 112a8cf1723SFabrice Gasnier 113a8cf1723SFabrice Gasnier st,max-clk-rate-hz: 114a8cf1723SFabrice Gasnier minimum: 600000 115a8cf1723SFabrice Gasnier maximum: 36000000 116a8cf1723SFabrice Gasnier default: 36000000 117a8cf1723SFabrice Gasnier 118a8cf1723SFabrice Gasnier booster-supply: false 119a8cf1723SFabrice Gasnier 120a8cf1723SFabrice Gasnier vdd-supply: false 121a8cf1723SFabrice Gasnier 122a8cf1723SFabrice Gasnier st,syscfg: false 123a8cf1723SFabrice Gasnier 124a8cf1723SFabrice Gasnier - if: 125a8cf1723SFabrice Gasnier properties: 126a8cf1723SFabrice Gasnier compatible: 127a8cf1723SFabrice Gasnier contains: 128a8cf1723SFabrice Gasnier const: st,stm32h7-adc-core 129a8cf1723SFabrice Gasnier 130a8cf1723SFabrice Gasnier then: 131a8cf1723SFabrice Gasnier properties: 132a8cf1723SFabrice Gasnier clocks: 133a8cf1723SFabrice Gasnier minItems: 1 134a8cf1723SFabrice Gasnier maxItems: 2 135a8cf1723SFabrice Gasnier 136a8cf1723SFabrice Gasnier clock-names: 137a8cf1723SFabrice Gasnier items: 138a8cf1723SFabrice Gasnier - const: bus 139a8cf1723SFabrice Gasnier - const: adc 140a8cf1723SFabrice Gasnier minItems: 1 141a8cf1723SFabrice Gasnier maxItems: 2 142a8cf1723SFabrice Gasnier 143a8cf1723SFabrice Gasnier interrupts: 144a8cf1723SFabrice Gasnier items: 145a8cf1723SFabrice Gasnier - description: interrupt line common for all ADCs 146a8cf1723SFabrice Gasnier 147a8cf1723SFabrice Gasnier st,max-clk-rate-hz: 148a8cf1723SFabrice Gasnier minimum: 120000 149a8cf1723SFabrice Gasnier maximum: 36000000 150a8cf1723SFabrice Gasnier default: 36000000 151a8cf1723SFabrice Gasnier 152a8cf1723SFabrice Gasnier vdd-supply: false 153a8cf1723SFabrice Gasnier 154a8cf1723SFabrice Gasnier st,syscfg: false 155a8cf1723SFabrice Gasnier 156a8cf1723SFabrice Gasnier - if: 157a8cf1723SFabrice Gasnier properties: 158a8cf1723SFabrice Gasnier compatible: 159a8cf1723SFabrice Gasnier contains: 160a8cf1723SFabrice Gasnier const: st,stm32mp1-adc-core 161a8cf1723SFabrice Gasnier 162a8cf1723SFabrice Gasnier then: 163a8cf1723SFabrice Gasnier properties: 164a8cf1723SFabrice Gasnier clocks: 165a8cf1723SFabrice Gasnier minItems: 1 166a8cf1723SFabrice Gasnier maxItems: 2 167a8cf1723SFabrice Gasnier 168a8cf1723SFabrice Gasnier clock-names: 169a8cf1723SFabrice Gasnier items: 170a8cf1723SFabrice Gasnier - const: bus 171a8cf1723SFabrice Gasnier - const: adc 172a8cf1723SFabrice Gasnier minItems: 1 173a8cf1723SFabrice Gasnier maxItems: 2 174a8cf1723SFabrice Gasnier 175a8cf1723SFabrice Gasnier interrupts: 176a8cf1723SFabrice Gasnier items: 177a8cf1723SFabrice Gasnier - description: interrupt line for ADC1 178a8cf1723SFabrice Gasnier - description: interrupt line for ADC2 179a8cf1723SFabrice Gasnier 180a8cf1723SFabrice Gasnier st,max-clk-rate-hz: 181a8cf1723SFabrice Gasnier minimum: 120000 182a8cf1723SFabrice Gasnier maximum: 36000000 183a8cf1723SFabrice Gasnier default: 36000000 184a8cf1723SFabrice Gasnier 185a8cf1723SFabrice GasnieradditionalProperties: false 186a8cf1723SFabrice Gasnier 187a8cf1723SFabrice Gasnierrequired: 188a8cf1723SFabrice Gasnier - compatible 189a8cf1723SFabrice Gasnier - reg 190a8cf1723SFabrice Gasnier - interrupts 191a8cf1723SFabrice Gasnier - clocks 192a8cf1723SFabrice Gasnier - clock-names 193a8cf1723SFabrice Gasnier - vdda-supply 194a8cf1723SFabrice Gasnier - vref-supply 195a8cf1723SFabrice Gasnier - interrupt-controller 196a8cf1723SFabrice Gasnier - '#interrupt-cells' 197a8cf1723SFabrice Gasnier - '#address-cells' 198a8cf1723SFabrice Gasnier - '#size-cells' 199a8cf1723SFabrice Gasnier 200a8cf1723SFabrice GasnierpatternProperties: 201a8cf1723SFabrice Gasnier "^adc@[0-9]+$": 202a8cf1723SFabrice Gasnier type: object 203a8cf1723SFabrice Gasnier description: 204a8cf1723SFabrice Gasnier An ADC block node should contain at least one subnode, representing an 205a8cf1723SFabrice Gasnier ADC instance available on the machine. 206a8cf1723SFabrice Gasnier 207a8cf1723SFabrice Gasnier properties: 208a8cf1723SFabrice Gasnier compatible: 209a8cf1723SFabrice Gasnier enum: 210a8cf1723SFabrice Gasnier - st,stm32f4-adc 211a8cf1723SFabrice Gasnier - st,stm32h7-adc 212a8cf1723SFabrice Gasnier - st,stm32mp1-adc 213a8cf1723SFabrice Gasnier 214a8cf1723SFabrice Gasnier reg: 215a8cf1723SFabrice Gasnier description: | 216a8cf1723SFabrice Gasnier Offset of ADC instance in ADC block. Valid values are: 217a8cf1723SFabrice Gasnier - 0x0: ADC1 218a8cf1723SFabrice Gasnier - 0x100: ADC2 219a8cf1723SFabrice Gasnier - 0x200: ADC3 (stm32f4 only) 220a8cf1723SFabrice Gasnier maxItems: 1 221a8cf1723SFabrice Gasnier 222a8cf1723SFabrice Gasnier '#io-channel-cells': 223a8cf1723SFabrice Gasnier const: 1 224a8cf1723SFabrice Gasnier 225a8cf1723SFabrice Gasnier interrupts: 226a8cf1723SFabrice Gasnier description: | 227a8cf1723SFabrice Gasnier IRQ Line for the ADC instance. Valid values are: 228a8cf1723SFabrice Gasnier - 0 for adc@0 229a8cf1723SFabrice Gasnier - 1 for adc@100 230a8cf1723SFabrice Gasnier - 2 for adc@200 (stm32f4 only) 231a8cf1723SFabrice Gasnier maxItems: 1 232a8cf1723SFabrice Gasnier 233a8cf1723SFabrice Gasnier clocks: 234a8cf1723SFabrice Gasnier description: 235a8cf1723SFabrice Gasnier Input clock private to this ADC instance. It's required only on 236a8cf1723SFabrice Gasnier stm32f4, that has per instance clock input for registers access. 237a8cf1723SFabrice Gasnier maxItems: 1 238a8cf1723SFabrice Gasnier 239a8cf1723SFabrice Gasnier dmas: 240a8cf1723SFabrice Gasnier description: RX DMA Channel 241a8cf1723SFabrice Gasnier maxItems: 1 242a8cf1723SFabrice Gasnier 243a8cf1723SFabrice Gasnier dma-names: 244a8cf1723SFabrice Gasnier const: rx 245a8cf1723SFabrice Gasnier 246a8cf1723SFabrice Gasnier assigned-resolution-bits: 247a8cf1723SFabrice Gasnier description: | 248a8cf1723SFabrice Gasnier Resolution (bits) to use for conversions: 249a8cf1723SFabrice Gasnier - can be 6, 8, 10 or 12 on stm32f4 250a8cf1723SFabrice Gasnier - can be 8, 10, 12, 14 or 16 on stm32h7 and stm32mp1 2513d21a460SRob Herring $ref: /schemas/types.yaml#/definitions/uint32 252a8cf1723SFabrice Gasnier 253a8cf1723SFabrice Gasnier st,adc-channels: 254a8cf1723SFabrice Gasnier description: | 255a8cf1723SFabrice Gasnier List of single-ended channels muxed for this ADC. It can have up to: 256a8cf1723SFabrice Gasnier - 16 channels, numbered from 0 to 15 (for in0..in15) on stm32f4 257a8cf1723SFabrice Gasnier - 20 channels, numbered from 0 to 19 (for in0..in19) on stm32h7 and 258a8cf1723SFabrice Gasnier stm32mp1. 2593d21a460SRob Herring $ref: /schemas/types.yaml#/definitions/uint32-array 260a8cf1723SFabrice Gasnier 261a8cf1723SFabrice Gasnier st,adc-diff-channels: 262a8cf1723SFabrice Gasnier description: | 263a8cf1723SFabrice Gasnier List of differential channels muxed for this ADC. Some channels can 264a8cf1723SFabrice Gasnier be configured as differential instead of single-ended on stm32h7 and 265a8cf1723SFabrice Gasnier on stm32mp1. Positive and negative inputs pairs are listed: 266a8cf1723SFabrice Gasnier <vinp vinn>, <vinp vinn>,... vinp and vinn are numbered from 0 to 19. 267a8cf1723SFabrice Gasnier 268a8cf1723SFabrice Gasnier Note: At least one of "st,adc-channels" or "st,adc-diff-channels" is 269a8cf1723SFabrice Gasnier required. Both properties can be used together. Some channels can be 270a8cf1723SFabrice Gasnier used as single-ended and some other ones as differential (mixed). But 271a8cf1723SFabrice Gasnier channels can't be configured both as single-ended and differential. 2723d21a460SRob Herring $ref: /schemas/types.yaml#/definitions/uint32-matrix 2733d21a460SRob Herring items: 274a8cf1723SFabrice Gasnier items: 275a8cf1723SFabrice Gasnier - description: | 276a8cf1723SFabrice Gasnier "vinp" indicates positive input number 277a8cf1723SFabrice Gasnier minimum: 0 278a8cf1723SFabrice Gasnier maximum: 19 279a8cf1723SFabrice Gasnier - description: | 280a8cf1723SFabrice Gasnier "vinn" indicates negative input number 281a8cf1723SFabrice Gasnier minimum: 0 282a8cf1723SFabrice Gasnier maximum: 19 283a8cf1723SFabrice Gasnier 284a8cf1723SFabrice Gasnier st,min-sample-time-nsecs: 285a8cf1723SFabrice Gasnier description: 286a8cf1723SFabrice Gasnier Minimum sampling time in nanoseconds. Depending on hardware (board) 287a8cf1723SFabrice Gasnier e.g. high/low analog input source impedance, fine tune of ADC 288a8cf1723SFabrice Gasnier sampling time may be recommended. This can be either one value or an 289a8cf1723SFabrice Gasnier array that matches "st,adc-channels" and/or "st,adc-diff-channels" 290a8cf1723SFabrice Gasnier list, to set sample time resp. for all channels, or independently for 291a8cf1723SFabrice Gasnier each channel. 2923d21a460SRob Herring $ref: /schemas/types.yaml#/definitions/uint32-array 293a8cf1723SFabrice Gasnier 294a8cf1723SFabrice Gasnier allOf: 295a8cf1723SFabrice Gasnier - if: 296a8cf1723SFabrice Gasnier properties: 297a8cf1723SFabrice Gasnier compatible: 298a8cf1723SFabrice Gasnier contains: 299a8cf1723SFabrice Gasnier const: st,stm32f4-adc 300a8cf1723SFabrice Gasnier 301a8cf1723SFabrice Gasnier then: 302a8cf1723SFabrice Gasnier properties: 303a8cf1723SFabrice Gasnier reg: 304a8cf1723SFabrice Gasnier enum: 305a8cf1723SFabrice Gasnier - 0x0 306a8cf1723SFabrice Gasnier - 0x100 307a8cf1723SFabrice Gasnier - 0x200 308a8cf1723SFabrice Gasnier 309a8cf1723SFabrice Gasnier interrupts: 310a8cf1723SFabrice Gasnier minimum: 0 311a8cf1723SFabrice Gasnier maximum: 2 312a8cf1723SFabrice Gasnier 313a8cf1723SFabrice Gasnier assigned-resolution-bits: 314a8cf1723SFabrice Gasnier enum: [6, 8, 10, 12] 315a8cf1723SFabrice Gasnier default: 12 316a8cf1723SFabrice Gasnier 317a8cf1723SFabrice Gasnier st,adc-channels: 318a8cf1723SFabrice Gasnier minItems: 1 319a8cf1723SFabrice Gasnier maxItems: 16 320a8cf1723SFabrice Gasnier items: 321a8cf1723SFabrice Gasnier minimum: 0 322a8cf1723SFabrice Gasnier maximum: 15 323a8cf1723SFabrice Gasnier 324a8cf1723SFabrice Gasnier st,adc-diff-channels: false 325a8cf1723SFabrice Gasnier 326a8cf1723SFabrice Gasnier st,min-sample-time-nsecs: 327a8cf1723SFabrice Gasnier minItems: 1 328a8cf1723SFabrice Gasnier maxItems: 16 329a8cf1723SFabrice Gasnier items: 330a8cf1723SFabrice Gasnier minimum: 80 331a8cf1723SFabrice Gasnier 332a8cf1723SFabrice Gasnier required: 333a8cf1723SFabrice Gasnier - clocks 334a8cf1723SFabrice Gasnier 335a8cf1723SFabrice Gasnier - if: 336a8cf1723SFabrice Gasnier properties: 337a8cf1723SFabrice Gasnier compatible: 338a8cf1723SFabrice Gasnier contains: 339a8cf1723SFabrice Gasnier enum: 340a8cf1723SFabrice Gasnier - st,stm32h7-adc 341a8cf1723SFabrice Gasnier - st,stm32mp1-adc 342a8cf1723SFabrice Gasnier 343a8cf1723SFabrice Gasnier then: 344a8cf1723SFabrice Gasnier properties: 345a8cf1723SFabrice Gasnier reg: 346a8cf1723SFabrice Gasnier enum: 347a8cf1723SFabrice Gasnier - 0x0 348a8cf1723SFabrice Gasnier - 0x100 349a8cf1723SFabrice Gasnier 350a8cf1723SFabrice Gasnier interrupts: 351a8cf1723SFabrice Gasnier minimum: 0 352a8cf1723SFabrice Gasnier maximum: 1 353a8cf1723SFabrice Gasnier 354a8cf1723SFabrice Gasnier assigned-resolution-bits: 355a8cf1723SFabrice Gasnier enum: [8, 10, 12, 14, 16] 356a8cf1723SFabrice Gasnier default: 16 357a8cf1723SFabrice Gasnier 358a8cf1723SFabrice Gasnier st,adc-channels: 359a8cf1723SFabrice Gasnier minItems: 1 360a8cf1723SFabrice Gasnier maxItems: 20 361a8cf1723SFabrice Gasnier items: 362a8cf1723SFabrice Gasnier minimum: 0 363a8cf1723SFabrice Gasnier maximum: 19 364a8cf1723SFabrice Gasnier 365a8cf1723SFabrice Gasnier st,min-sample-time-nsecs: 366a8cf1723SFabrice Gasnier minItems: 1 367a8cf1723SFabrice Gasnier maxItems: 20 368a8cf1723SFabrice Gasnier items: 369a8cf1723SFabrice Gasnier minimum: 40 370a8cf1723SFabrice Gasnier 371a8cf1723SFabrice Gasnier additionalProperties: false 372a8cf1723SFabrice Gasnier 373a8cf1723SFabrice Gasnier anyOf: 374a8cf1723SFabrice Gasnier - required: 375a8cf1723SFabrice Gasnier - st,adc-channels 376a8cf1723SFabrice Gasnier - required: 377a8cf1723SFabrice Gasnier - st,adc-diff-channels 378a8cf1723SFabrice Gasnier 379a8cf1723SFabrice Gasnier required: 380a8cf1723SFabrice Gasnier - compatible 381a8cf1723SFabrice Gasnier - reg 382a8cf1723SFabrice Gasnier - interrupts 383a8cf1723SFabrice Gasnier - '#io-channel-cells' 384a8cf1723SFabrice Gasnier 385a8cf1723SFabrice Gasnierexamples: 386a8cf1723SFabrice Gasnier - | 387a8cf1723SFabrice Gasnier // Example 1: with stm32f429, ADC1, single-ended channel 8 388a8cf1723SFabrice Gasnier adc123: adc@40012000 { 389a8cf1723SFabrice Gasnier compatible = "st,stm32f4-adc-core"; 390a8cf1723SFabrice Gasnier reg = <0x40012000 0x400>; 391a8cf1723SFabrice Gasnier interrupts = <18>; 392a8cf1723SFabrice Gasnier clocks = <&rcc 0 168>; 393a8cf1723SFabrice Gasnier clock-names = "adc"; 394a8cf1723SFabrice Gasnier st,max-clk-rate-hz = <36000000>; 395a8cf1723SFabrice Gasnier vdda-supply = <&vdda>; 396a8cf1723SFabrice Gasnier vref-supply = <&vref>; 397a8cf1723SFabrice Gasnier interrupt-controller; 398a8cf1723SFabrice Gasnier #interrupt-cells = <1>; 399a8cf1723SFabrice Gasnier #address-cells = <1>; 400a8cf1723SFabrice Gasnier #size-cells = <0>; 401a8cf1723SFabrice Gasnier adc@0 { 402a8cf1723SFabrice Gasnier compatible = "st,stm32f4-adc"; 403a8cf1723SFabrice Gasnier #io-channel-cells = <1>; 404a8cf1723SFabrice Gasnier reg = <0x0>; 405a8cf1723SFabrice Gasnier clocks = <&rcc 0 168>; 406a8cf1723SFabrice Gasnier interrupt-parent = <&adc123>; 407a8cf1723SFabrice Gasnier interrupts = <0>; 408a8cf1723SFabrice Gasnier st,adc-channels = <8>; 409a8cf1723SFabrice Gasnier dmas = <&dma2 0 0 0x400 0x0>; 410a8cf1723SFabrice Gasnier dma-names = "rx"; 411a8cf1723SFabrice Gasnier assigned-resolution-bits = <8>; 412a8cf1723SFabrice Gasnier }; 413a8cf1723SFabrice Gasnier // ... 414a8cf1723SFabrice Gasnier // other adc child nodes follow... 415a8cf1723SFabrice Gasnier }; 416a8cf1723SFabrice Gasnier 417a8cf1723SFabrice Gasnier - | 418a8cf1723SFabrice Gasnier // Example 2: with stm32mp157c to setup ADC1 with: 419a8cf1723SFabrice Gasnier // - channels 0 & 1 as single-ended 420a8cf1723SFabrice Gasnier // - channels 2 & 3 as differential (with resp. 6 & 7 negative inputs) 421a8cf1723SFabrice Gasnier #include <dt-bindings/interrupt-controller/arm-gic.h> 422a8cf1723SFabrice Gasnier #include <dt-bindings/clock/stm32mp1-clks.h> 423a8cf1723SFabrice Gasnier adc12: adc@48003000 { 424a8cf1723SFabrice Gasnier compatible = "st,stm32mp1-adc-core"; 425a8cf1723SFabrice Gasnier reg = <0x48003000 0x400>; 426a8cf1723SFabrice Gasnier interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>, 427a8cf1723SFabrice Gasnier <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>; 428a8cf1723SFabrice Gasnier clocks = <&rcc ADC12>, <&rcc ADC12_K>; 429a8cf1723SFabrice Gasnier clock-names = "bus", "adc"; 430a8cf1723SFabrice Gasnier booster-supply = <&booster>; 431a8cf1723SFabrice Gasnier vdd-supply = <&vdd>; 432a8cf1723SFabrice Gasnier vdda-supply = <&vdda>; 433a8cf1723SFabrice Gasnier vref-supply = <&vref>; 434a8cf1723SFabrice Gasnier st,syscfg = <&syscfg>; 435a8cf1723SFabrice Gasnier interrupt-controller; 436a8cf1723SFabrice Gasnier #interrupt-cells = <1>; 437a8cf1723SFabrice Gasnier #address-cells = <1>; 438a8cf1723SFabrice Gasnier #size-cells = <0>; 439a8cf1723SFabrice Gasnier adc@0 { 440a8cf1723SFabrice Gasnier compatible = "st,stm32mp1-adc"; 441a8cf1723SFabrice Gasnier #io-channel-cells = <1>; 442a8cf1723SFabrice Gasnier reg = <0x0>; 443a8cf1723SFabrice Gasnier interrupt-parent = <&adc12>; 444a8cf1723SFabrice Gasnier interrupts = <0>; 445a8cf1723SFabrice Gasnier st,adc-channels = <0 1>; 446a8cf1723SFabrice Gasnier st,adc-diff-channels = <2 6>, <3 7>; 447a8cf1723SFabrice Gasnier st,min-sample-time-nsecs = <5000>; 448a8cf1723SFabrice Gasnier dmas = <&dmamux1 9 0x400 0x05>; 449a8cf1723SFabrice Gasnier dma-names = "rx"; 450a8cf1723SFabrice Gasnier }; 451a8cf1723SFabrice Gasnier // ... 452a8cf1723SFabrice Gasnier // other adc child node follow... 453a8cf1723SFabrice Gasnier }; 454a8cf1723SFabrice Gasnier 455a8cf1723SFabrice Gasnier... 456