0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/iio/adc/nuvoton,npcm750-adc.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Nuvoton NPCM BMC Analog to Digital Converter (ADC)
0008
0009 maintainers:
0010 - Tomer Maimon <tmaimon77@gmail.com>
0011
0012 description:
0013 The NPCM7XX ADC is a 10-bit converter and NPCM8XX ADC is a 12-bit converter,
0014 both have eight channel inputs.
0015
0016 properties:
0017 compatible:
0018 enum:
0019 - nuvoton,npcm750-adc
0020 - nuvoton,npcm845-adc
0021
0022 reg:
0023 maxItems: 1
0024
0025 interrupts:
0026 maxItems: 1
0027 description: ADC interrupt, should be set for falling edge.
0028
0029 resets:
0030 maxItems: 1
0031
0032 clocks:
0033 maxItems: 1
0034 description: If not provided the defulat ADC sample rate will be used.
0035
0036 vref-supply:
0037 description: If not supplied, the internal voltage reference will be used.
0038
0039 "#io-channel-cells":
0040 const: 1
0041
0042 required:
0043 - compatible
0044 - reg
0045 - interrupts
0046 - resets
0047
0048 additionalProperties: false
0049
0050 examples:
0051 - |
0052 #include <dt-bindings/interrupt-controller/irq.h>
0053 #include <dt-bindings/interrupt-controller/arm-gic.h>
0054 #include <dt-bindings/clock/nuvoton,npcm7xx-clock.h>
0055 #include <dt-bindings/reset/nuvoton,npcm7xx-reset.h>
0056 soc {
0057 #address-cells = <1>;
0058 #size-cells = <1>;
0059 adc@f000c000 {
0060 compatible = "nuvoton,npcm750-adc";
0061 reg = <0xf000c000 0x8>;
0062 interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
0063 clocks = <&clk NPCM7XX_CLK_ADC>;
0064 resets = <&rstc NPCM7XX_RESET_IPSRST1 NPCM7XX_RESET_ADC>;
0065 };
0066 };
0067 ...