1*8cc087a1SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2*8cc087a1SEmmanuel Vadot%YAML 1.2
3*8cc087a1SEmmanuel Vadot---
4*8cc087a1SEmmanuel Vadot$id: http://devicetree.org/schemas/iio/adc/aspeed,ast2600-adc.yaml#
5*8cc087a1SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*8cc087a1SEmmanuel Vadot
7*8cc087a1SEmmanuel Vadottitle: ADC that forms part of an ASPEED server management processor.
8*8cc087a1SEmmanuel Vadot
9*8cc087a1SEmmanuel Vadotmaintainers:
10*8cc087a1SEmmanuel Vadot  - Billy Tsai <billy_tsai@aspeedtech.com>
11*8cc087a1SEmmanuel Vadot
12*8cc087a1SEmmanuel Vadotdescription: |
13*8cc087a1SEmmanuel Vadot  • 10-bits resolution for 16 voltage channels.
14*8cc087a1SEmmanuel Vadot  • The device split into two individual engine and each contains 8 voltage
15*8cc087a1SEmmanuel Vadot  channels.
16*8cc087a1SEmmanuel Vadot  • Channel scanning can be non-continuous.
17*8cc087a1SEmmanuel Vadot  • Programmable ADC clock frequency.
18*8cc087a1SEmmanuel Vadot  • Programmable upper and lower threshold for each channels.
19*8cc087a1SEmmanuel Vadot  • Interrupt when larger or less than threshold for each channels.
20*8cc087a1SEmmanuel Vadot  • Support hysteresis for each channels.
21*8cc087a1SEmmanuel Vadot  • Built-in a compensating method.
22*8cc087a1SEmmanuel Vadot  • Built-in a register to trim internal reference voltage.
23*8cc087a1SEmmanuel Vadot  • Internal or External reference voltage.
24*8cc087a1SEmmanuel Vadot  • Support 2 Internal reference voltage 1.2v or 2.5v.
25*8cc087a1SEmmanuel Vadot  • Integrate dividing circuit for battery sensing.
26*8cc087a1SEmmanuel Vadot
27*8cc087a1SEmmanuel Vadotproperties:
28*8cc087a1SEmmanuel Vadot  compatible:
29*8cc087a1SEmmanuel Vadot    enum:
30*8cc087a1SEmmanuel Vadot      - aspeed,ast2600-adc0
31*8cc087a1SEmmanuel Vadot      - aspeed,ast2600-adc1
32*8cc087a1SEmmanuel Vadot    description:
33*8cc087a1SEmmanuel Vadot      Their trimming data, which is used to calibrate internal reference volage,
34*8cc087a1SEmmanuel Vadot      locates in different address of OTP.
35*8cc087a1SEmmanuel Vadot
36*8cc087a1SEmmanuel Vadot  reg:
37*8cc087a1SEmmanuel Vadot    maxItems: 1
38*8cc087a1SEmmanuel Vadot
39*8cc087a1SEmmanuel Vadot  clocks:
40*8cc087a1SEmmanuel Vadot    maxItems: 1
41*8cc087a1SEmmanuel Vadot    description:
42*8cc087a1SEmmanuel Vadot      Input clock used to derive the sample clock. Expected to be the
43*8cc087a1SEmmanuel Vadot      SoC's APB clock.
44*8cc087a1SEmmanuel Vadot
45*8cc087a1SEmmanuel Vadot  resets:
46*8cc087a1SEmmanuel Vadot    maxItems: 1
47*8cc087a1SEmmanuel Vadot
48*8cc087a1SEmmanuel Vadot  "#io-channel-cells":
49*8cc087a1SEmmanuel Vadot    const: 1
50*8cc087a1SEmmanuel Vadot
51*8cc087a1SEmmanuel Vadot  vref-supply:
52*8cc087a1SEmmanuel Vadot    description:
53*8cc087a1SEmmanuel Vadot      The external regulator supply ADC reference voltage.
54*8cc087a1SEmmanuel Vadot
55*8cc087a1SEmmanuel Vadot  aspeed,int-vref-microvolt:
56*8cc087a1SEmmanuel Vadot    enum: [1200000, 2500000]
57*8cc087a1SEmmanuel Vadot    description:
58*8cc087a1SEmmanuel Vadot      ADC internal reference voltage in microvolts.
59*8cc087a1SEmmanuel Vadot
60*8cc087a1SEmmanuel Vadot  aspeed,battery-sensing:
61*8cc087a1SEmmanuel Vadot    type: boolean
62*8cc087a1SEmmanuel Vadot    description:
63*8cc087a1SEmmanuel Vadot      Inform the driver that last channel will be used to sensor battery.
64*8cc087a1SEmmanuel Vadot
65*8cc087a1SEmmanuel Vadotrequired:
66*8cc087a1SEmmanuel Vadot  - compatible
67*8cc087a1SEmmanuel Vadot  - reg
68*8cc087a1SEmmanuel Vadot  - clocks
69*8cc087a1SEmmanuel Vadot  - resets
70*8cc087a1SEmmanuel Vadot  - "#io-channel-cells"
71*8cc087a1SEmmanuel Vadot
72*8cc087a1SEmmanuel VadotadditionalProperties: false
73*8cc087a1SEmmanuel Vadot
74*8cc087a1SEmmanuel Vadotexamples:
75*8cc087a1SEmmanuel Vadot  - |
76*8cc087a1SEmmanuel Vadot    #include <dt-bindings/clock/ast2600-clock.h>
77*8cc087a1SEmmanuel Vadot    adc0: adc@1e6e9000 {
78*8cc087a1SEmmanuel Vadot        compatible = "aspeed,ast2600-adc0";
79*8cc087a1SEmmanuel Vadot        reg = <0x1e6e9000 0x100>;
80*8cc087a1SEmmanuel Vadot        clocks = <&syscon ASPEED_CLK_APB2>;
81*8cc087a1SEmmanuel Vadot        resets = <&syscon ASPEED_RESET_ADC>;
82*8cc087a1SEmmanuel Vadot        #io-channel-cells = <1>;
83*8cc087a1SEmmanuel Vadot        aspeed,int-vref-microvolt = <2500000>;
84*8cc087a1SEmmanuel Vadot    };
85*8cc087a1SEmmanuel Vadot    adc1: adc@1e6e9100 {
86*8cc087a1SEmmanuel Vadot        compatible = "aspeed,ast2600-adc1";
87*8cc087a1SEmmanuel Vadot        reg = <0x1e6e9100 0x100>;
88*8cc087a1SEmmanuel Vadot        clocks = <&syscon ASPEED_CLK_APB2>;
89*8cc087a1SEmmanuel Vadot        resets = <&syscon ASPEED_RESET_ADC>;
90*8cc087a1SEmmanuel Vadot        #io-channel-cells = <1>;
91*8cc087a1SEmmanuel Vadot        aspeed,int-vref-microvolt = <2500000>;
92*8cc087a1SEmmanuel Vadot    };
93*8cc087a1SEmmanuel Vadot...
94