mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-17 22:23:45 -04:00
There are ADCs that are differential but support to measure single-ended signals on the same channels by connecting a constant voltage to the negative input pin. This property allows to properly define a single-ended channel that requires two inputs to be specified. Software can use the presence of this property to mark the channel as not differential. Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com> Reviewed-by: Nuno Sa <nuno.sa@analog.com> Reviewed-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20240607-ad4111-v7-1-97e3855900a0@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
84 lines
2.5 KiB
YAML
84 lines
2.5 KiB
YAML
# SPDX-License-Identifier: GPL-2.0
|
|
%YAML 1.2
|
|
---
|
|
$id: http://devicetree.org/schemas/iio/adc/adc.yaml#
|
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
|
|
|
title: IIO Common Properties for ADC Channels
|
|
|
|
maintainers:
|
|
- Jonathan Cameron <jic23@kernel.org>
|
|
|
|
description:
|
|
A few properties are defined in a common way ADC channels.
|
|
|
|
properties:
|
|
$nodename:
|
|
pattern: "^channel(@[0-9a-f]+)?$"
|
|
description:
|
|
A channel index should match reg.
|
|
|
|
reg:
|
|
maxItems: 1
|
|
|
|
label:
|
|
description: Unique name to identify which channel this is.
|
|
|
|
bipolar:
|
|
$ref: /schemas/types.yaml#/definitions/flag
|
|
description: If provided, the channel is to be used in bipolar mode.
|
|
|
|
diff-channels:
|
|
$ref: /schemas/types.yaml#/definitions/uint32-array
|
|
maxItems: 2
|
|
minItems: 2
|
|
description:
|
|
Many ADCs have dual Muxes to allow different input pins to be routed
|
|
to both the positive and negative inputs of a differential ADC.
|
|
The first value specifies the positive input pin, the second
|
|
specifies the negative input pin.
|
|
|
|
single-channel:
|
|
$ref: /schemas/types.yaml#/definitions/uint32
|
|
description:
|
|
When devices combine single-ended and differential channels, allow the
|
|
channel for a single element to be specified, independent of reg (as for
|
|
differential channels). If this and diff-channels are not present reg
|
|
shall be used instead.
|
|
|
|
common-mode-channel:
|
|
$ref: /schemas/types.yaml#/definitions/uint32
|
|
description:
|
|
Some ADCs have differential input pins that can be used to measure
|
|
single-ended or pseudo-differential inputs. This property can be used
|
|
in addition to single-channel to signal software that this channel is
|
|
not differential but still specify two inputs.
|
|
|
|
The input pair is specified by setting single-channel to the positive
|
|
input pin and common-mode-channel to the negative pin.
|
|
|
|
settling-time-us:
|
|
description:
|
|
Time between enabling the channel and first stable readings.
|
|
|
|
oversampling-ratio:
|
|
$ref: /schemas/types.yaml#/definitions/uint32
|
|
description:
|
|
Oversampling is used as replacement of or addition to the low-pass filter.
|
|
In some cases, the desired filtering characteristics are a function the
|
|
device design and can interact with other characteristics such as
|
|
settling time.
|
|
|
|
anyOf:
|
|
- oneOf:
|
|
- required:
|
|
- reg
|
|
- diff-channels
|
|
- required:
|
|
- reg
|
|
- single-channel
|
|
- required:
|
|
- reg
|
|
|
|
additionalProperties: true
|