summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/iio/adc/rohm,bd79104.yaml
blob: 2a8ad4fdfc6b12573486e9ad5383c5edd39fb688 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/rohm,bd79104.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: ROHM Semiconductor BD79104 ADC

maintainers:
  - Matti Vaittinen <mazziesaccount@gmail.com>

description: |
  12 bit SPI ADC with 8 channels.

properties:
  compatible:
    const: rohm,bd79104

  reg:
    maxItems: 1

  vdd-supply: true
  iovdd-supply: true

# The component data-sheet says the frequency is 20M. I, however, found
# that the ROHM evaluation board BD79104FV-EVK-001 had problems with 20M.
# I have successfully used it with 4M. My _assumption_ is that this is not
# the limitation of the component itself, but a limitation of the EVK.
  spi-max-frequency:
    maximum: 20000000

  "#io-channel-cells":
    const: 1

  spi-cpha: true
  spi-cpol: true

required:
  - compatible
  - reg
  - vdd-supply
  - iovdd-supply
  - spi-cpha
  - spi-cpol

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    spi {
        #address-cells = <1>;
        #size-cells = <0>;

        adc@0 {
            compatible = "rohm,bd79104";
            reg = <0>;
            vdd-supply = <&vdd_supply>;
            iovdd-supply = <&iovdd_supply>;
            spi-max-frequency = <4000000>;
            spi-cpha;
            spi-cpol;
            #io-channel-cells = <1>;
        };
    };
...