summaryrefslogtreecommitdiff
path: root/zephyr/dts/bindings/adc/named-adc.yaml
blob: 6f06d73b86d975f10fecb665a5524fba8d4dee87 (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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Copyright 2021 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

description: ADC parent node

compatible: "named-adc-channels"

child-binding:
  description: Named ADCs child node
  properties:
    label:
      required: true
      type: string
      description:
        Human-readable string describing the device (used as
        device_get_binding() argument)
    channel:
      required: true
      type: int
      description: ADC channel used
    mul:
      required: false
      type: int
      default: 1
      description: Multiplication factor of ADC measurement
    div:
      required: false
      type: int
      default: 1
      description: Division factor of ADC measurement
    gain:
      required: false
      type: string
      description:
        Gain selection for the ADC channel. Source of valid gain settings is
        "enum adc_gain" found in <zephyr-base>/include/drivers/adc.h
      enum:
        - ADC_GAIN_1_6
        - ADC_GAIN_1_5
        - ADC_GAIN_1_4
        - ADC_GAIN_1_3
        - ADC_GAIN_1_2
        - ADC_GAIN_2_3
        - ADC_GAIN_1
        - ADC_GAIN_2
        - ADC_GAIN_3
        - ADC_GAIN_4
        - ADC_GAIN_8
        - ADC_GAIN_16
        - ADC_GAIN_32
        - ADC_GAIN_64
        - ADC_GAIN_128
      default: ADC_GAIN_1
    reference:
      required: false
      type: string
      description:
        Sets the reference voltage for the ADC channel. Source of valid
        reference voltages is "enum adc_reference" found in
        <zephyr-base>/include/drivers/adc.
      enum:
        - ADC_REF_VDD_1
        - ADC_REF_VDD_1_2
        - ADC_REF_VDD_1_3
        - ADC_REF_VDD_1_4
        - ADC_REF_INTERNAL
        - ADC_REF_EXTERNAL0
        - ADC_REF_EXTERNAL1
      default: ADC_REF_INTERNAL
    acquisition-time:
      required: false
      type: int
      description:
        Set the acquisition time for ADC conversion. Use the ADC_ACQ_TIME macro
        to compose this value. If the hardware doesn't support a configurable
        acquisition time, use ADC_ACQ_TIME_DEFAULT (0).
      default: 0
    differential:
      required: false
      type: boolean
      description:
        Set the ADC acquisition mode to differential. Default mode is
        single-ended acquisition.
    enum-name:
      type: string
      required: true
      description:
        Enum values used in the source code to refer to the ADC channels
      enum:
      - ADC_AMON_BMON
      - ADC_BOARD_ID_0
      - ADC_BOARD_ID_1
      - ADC_PMON
      - ADC_PSYS
      - ADC_TEMP_SENSOR_CHARGER
      - ADC_TEMP_SENSOR_DDR_SOC
      - ADC_TEMP_SENSOR_FAN
      - ADC_TEMP_SENSOR_PP3300_REGULATOR
      - ADC_VBUS
      - ADC_VBUS_C0
      - ADC_VBUS_C1
      - ADC_EVB_CH_0
      - ADC_EVB_CH_1
      - ADC_EVB_CH_2
      - ADC_EVB_CH_3
      - ADC_EVB_CH_4