0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: "http://devicetree.org/schemas/iio/dac/st,stm32-dac.yaml#"
0005 $schema: "http://devicetree.org/meta-schemas/core.yaml#"
0006
0007 title: STMicroelectronics STM32 DAC bindings
0008
0009 description: |
0010 The STM32 DAC is a 12-bit voltage output digital-to-analog converter. The DAC
0011 may be configured in 8 or 12-bit mode. It has two output channels, each with
0012 its own converter.
0013 It has built-in noise and triangle waveform generator and supports external
0014 triggers for conversions. The DAC's output buffer allows a high drive output
0015 current.
0016
0017 maintainers:
0018 - Fabrice Gasnier <fabrice.gasnier@foss.st.com>
0019
0020 properties:
0021 compatible:
0022 enum:
0023 - st,stm32f4-dac-core
0024 - st,stm32h7-dac-core
0025
0026 reg:
0027 maxItems: 1
0028
0029 resets:
0030 maxItems: 1
0031
0032 clocks:
0033 maxItems: 1
0034
0035 clock-names:
0036 items:
0037 - const: pclk
0038
0039 vref-supply:
0040 description: Phandle to the vref input analog reference voltage.
0041
0042 '#address-cells':
0043 const: 1
0044
0045 '#size-cells':
0046 const: 0
0047
0048 additionalProperties: false
0049
0050 required:
0051 - compatible
0052 - reg
0053 - clocks
0054 - clock-names
0055 - vref-supply
0056 - '#address-cells'
0057 - '#size-cells'
0058
0059 patternProperties:
0060 "^dac@[1-2]+$":
0061 type: object
0062 description:
0063 A DAC block node should contain at least one subnode, representing an
0064 DAC instance/channel available on the machine.
0065
0066 properties:
0067 compatible:
0068 const: st,stm32-dac
0069
0070 reg:
0071 description: Must be either 1 or 2, to define (single) channel in use
0072 enum: [1, 2]
0073
0074 '#io-channel-cells':
0075 const: 1
0076
0077 additionalProperties: false
0078
0079 required:
0080 - compatible
0081 - reg
0082 - '#io-channel-cells'
0083
0084 examples:
0085 - |
0086 // Example on stm32mp157c
0087 #include <dt-bindings/clock/stm32mp1-clks.h>
0088 dac: dac@40017000 {
0089 compatible = "st,stm32h7-dac-core";
0090 reg = <0x40017000 0x400>;
0091 clocks = <&rcc DAC12>;
0092 clock-names = "pclk";
0093 vref-supply = <&vref>;
0094 #address-cells = <1>;
0095 #size-cells = <0>;
0096
0097 dac@1 {
0098 compatible = "st,stm32-dac";
0099 #io-channel-cells = <1>;
0100 reg = <1>;
0101 };
0102
0103 dac@2 {
0104 compatible = "st,stm32-dac";
0105 #io-channel-cells = <1>;
0106 reg = <2>;
0107 };
0108 };
0109
0110 ...