adc.yaml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # SPDX-License-Identifier: GPL-2.0
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/iio/adc/adc.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: IIO Common Properties for ADC Channels
  7. maintainers:
  8. - Jonathan Cameron <jic23@kernel.org>
  9. description:
  10. A few properties are defined in a common way ADC channels.
  11. properties:
  12. $nodename:
  13. pattern: "^channel(@[0-9a-f]+)?$"
  14. description:
  15. A channel index should match reg.
  16. reg:
  17. maxItems: 1
  18. label:
  19. description: Unique name to identify which channel this is.
  20. bipolar:
  21. $ref: /schemas/types.yaml#/definitions/flag
  22. description: If provided, the channel is to be used in bipolar mode.
  23. diff-channels:
  24. $ref: /schemas/types.yaml#/definitions/uint32-array
  25. maxItems: 2
  26. minItems: 2
  27. description:
  28. Many ADCs have dual Muxes to allow different input pins to be routed
  29. to both the positive and negative inputs of a differential ADC.
  30. The first value specifies the positive input pin, the second
  31. specifies the negative input pin.
  32. There are also some ADCs, where the differential channel has dedicated
  33. positive and negative inputs which can be used to measure differential
  34. voltage levels. For those setups, this property can be configured with
  35. the 'reg' property for both inputs (i.e. diff-channels = <reg reg>).
  36. single-channel:
  37. $ref: /schemas/types.yaml#/definitions/uint32
  38. description:
  39. When devices combine single-ended and differential channels, allow the
  40. channel for a single element to be specified, independent of reg (as for
  41. differential channels). If this and diff-channels are not present reg
  42. shall be used instead.
  43. common-mode-channel:
  44. $ref: /schemas/types.yaml#/definitions/uint32
  45. description:
  46. Some ADCs have differential input pins that can be used to measure
  47. single-ended or pseudo-differential inputs. This property can be used
  48. in addition to single-channel to signal software that this channel is
  49. not differential but still specify two inputs.
  50. The input pair is specified by setting single-channel to the positive
  51. input pin and common-mode-channel to the negative pin.
  52. settling-time-us:
  53. description:
  54. Time between enabling the channel and first stable readings.
  55. oversampling-ratio:
  56. $ref: /schemas/types.yaml#/definitions/uint32
  57. description:
  58. Oversampling is used as replacement of or addition to the low-pass filter.
  59. In some cases, the desired filtering characteristics are a function the
  60. device design and can interact with other characteristics such as
  61. settling time.
  62. anyOf:
  63. - oneOf:
  64. - required:
  65. - reg
  66. - diff-channels
  67. - required:
  68. - reg
  69. - single-channel
  70. - required:
  71. - reg
  72. additionalProperties: true