Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/iio/adc/aspeed,ast2600-adc.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: ADC that forms part of an ASPEED server management processor.
0008 
0009 maintainers:
0010   - Billy Tsai <billy_tsai@aspeedtech.com>
0011 
0012 description: |
0013   • 10-bits resolution for 16 voltage channels.
0014   • The device split into two individual engine and each contains 8 voltage
0015   channels.
0016   • Channel scanning can be non-continuous.
0017   • Programmable ADC clock frequency.
0018   • Programmable upper and lower threshold for each channels.
0019   • Interrupt when larger or less than threshold for each channels.
0020   • Support hysteresis for each channels.
0021   • Built-in a compensating method.
0022   • Built-in a register to trim internal reference voltage.
0023   • Internal or External reference voltage.
0024   • Support 2 Internal reference voltage 1.2v or 2.5v.
0025   • Integrate dividing circuit for battery sensing.
0026 
0027 properties:
0028   compatible:
0029     enum:
0030       - aspeed,ast2600-adc0
0031       - aspeed,ast2600-adc1
0032     description:
0033       Their trimming data, which is used to calibrate internal reference volage,
0034       locates in different address of OTP.
0035 
0036   reg:
0037     maxItems: 1
0038 
0039   clocks:
0040     maxItems: 1
0041     description:
0042       Input clock used to derive the sample clock. Expected to be the
0043       SoC's APB clock.
0044 
0045   resets:
0046     maxItems: 1
0047 
0048   "#io-channel-cells":
0049     const: 1
0050 
0051   vref-supply:
0052     description:
0053       The external regulator supply ADC reference voltage.
0054 
0055   aspeed,int-vref-microvolt:
0056     enum: [1200000, 2500000]
0057     description:
0058       ADC internal reference voltage in microvolts.
0059 
0060   aspeed,battery-sensing:
0061     type: boolean
0062     description:
0063       Inform the driver that last channel will be used to sensor battery.
0064 
0065   aspeed,trim-data-valid:
0066     type: boolean
0067     description: |
0068       The ADC reference voltage can be calibrated to obtain the trimming
0069       data which will be stored in otp. This property informs the driver that
0070       the data store in the otp is valid.
0071 
0072 required:
0073   - compatible
0074   - reg
0075   - clocks
0076   - resets
0077   - "#io-channel-cells"
0078 
0079 additionalProperties: false
0080 
0081 examples:
0082   - |
0083     #include <dt-bindings/clock/ast2600-clock.h>
0084     adc0: adc@1e6e9000 {
0085         compatible = "aspeed,ast2600-adc0";
0086         reg = <0x1e6e9000 0x100>;
0087         clocks = <&syscon ASPEED_CLK_APB2>;
0088         resets = <&syscon ASPEED_RESET_ADC>;
0089         #io-channel-cells = <1>;
0090         aspeed,int-vref-microvolt = <2500000>;
0091     };
0092     adc1: adc@1e6e9100 {
0093         compatible = "aspeed,ast2600-adc1";
0094         reg = <0x1e6e9100 0x100>;
0095         clocks = <&syscon ASPEED_CLK_APB2>;
0096         resets = <&syscon ASPEED_RESET_ADC>;
0097         #io-channel-cells = <1>;
0098         aspeed,int-vref-microvolt = <2500000>;
0099     };
0100 ...