From: Kurt Borja <kuurtb@gmail.com> Date: 2026-06-19 00:33:16
Hi all,
After submitting a patch series adding support for TI ADS126X ADCs [1],
I was made aware by David [2] that at least two more chip families,
ads1220 [3] and ads1x2c14, share very similar features (though these
chips are not really compatible between them). After that, I found one
more chip with the same features which is already upstream, the
AD4170-4.
As David explained in [2], these chips are intended to be used with
RTDs, thermocouples or other resistive sensors so they share the
following per-channel features:
- Configurable reference selection
- Burn-out Current Sources (BOCS) for diagnostic purpuses
- Excitation current sources (usually called IDACs TI) for sensor
current biasing
Given that these three features are present in all four devices and
three of these drivers are still under review, my proposal is to have
these features be described in adc.yaml and have this series merged
before the three others [1] [2] [3].
This series is sent as RFC because I still don't have much experience
with dt-bindings and I don't know if this approach or the properties are
general enough to be described like this.
No dependencies between properties were provided because not all devices
may be able to configure each one of them.
[1] https://lore.kernel.org/linux-iio/20260612-ads126x-v1-0-894c788d03ed@gmail.com/
[2] https://lore.kernel.org/linux-iio/20260615-iio-adc-ti-ads122c14-v1-0-e6bdadf7cb2b@baylibre.com/
[3] https://lore.kernel.org/linux-iio/20260610151342.44274-1-zizuzacker@gmail.com/
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
---
Kurt Borja (3):
dt-bindings: iio: adc: Add reference-source property
dt-bindings: iio: adc: Add excitation current sources properties
dt-bindings: iio: adc: Add burn-out current properties
Documentation/devicetree/bindings/iio/adc/adc.yaml | 47 ++++++++++++++++++++++
1 file changed, 47 insertions(+)
---
base-commit: a50909aa46dec46de3c73235fc15a7d6f763d996
change-id: 20260618-new-channel-props-4fbd52020da2
--
Thanks,
~ Kurt
From: Kurt Borja <kuurtb@gmail.com> Date: 2026-06-19 00:33:18
Some ADCs have configurable voltage reference sources for each channel.
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
---
Documentation/devicetree/bindings/iio/adc/adc.yaml | 10 ++++++++++
1 file changed, 10 insertions(+)
@@ -73,6 +73,16 @@ properties:device design and can interact with other characteristics such assettling time.+reference-source:+$ref:/schemas/types.yaml#/definitions/uint32-array+maxItems:2+minItems:1+description:+Indicates the voltage reference source or sources for this channel.++This array describes either a single reference source or a positive and+negative reference sources.+anyOf:-oneOf:-required:
From: Kurt Borja <kuurtb@gmail.com> Date: 2026-06-19 00:33:20
Some ADCs incorporate current sources that provide excitation current to
resistive temperature devices (RTDs), thermistors diodes and other
resistive sensors that require constant current biasing.
The maxItems constraint of 16 is arbitrary but should be big enough for
most devices.
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
---
Documentation/devicetree/bindings/iio/adc/adc.yaml | 23 ++++++++++++++++++++++
1 file changed, 23 insertions(+)
@@ -83,6 +83,29 @@ properties:This array describes either a single reference source or a positive andnegative reference sources.+excitation-channels:+$ref:/schemas/types.yaml#/definitions/uint32-array+maxItems:16+minItems:1+description:+Excitation current sources provide current to resistive temperature+devices (RTDs), thermistors diodes and other resistive sensors that+require constant current biasing.++This array describes the mux configuration of the excitation current+sources.++excitation-current-microamp:+maxItems:16+minItems:1+description:+Excitation current sources provide current to resistive temperature+devices (RTDs), thermistors diodes and other resistive sensors that+require constant current biasing.++This array describes the current configuration of the excitation current+sources or the single matched current for all sources.+anyOf:-oneOf:-required:
From: Kurt Borja <kuurtb@gmail.com> Date: 2026-06-19 00:33:22
Some ADCs incorporate burn-out current sources that provide current to
the channel's input pins for open-circuit or short-circuit detection.
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
---
Documentation/devicetree/bindings/iio/adc/adc.yaml | 14 ++++++++++++++
1 file changed, 14 insertions(+)
@@ -106,6 +106,20 @@ properties:This array describes the current configuration of the excitation currentsources or the single matched current for all sources.+burn-out-current-microamp:+description:+Burn-out current sources provide current to the channel's input pins for+open-circuit or short-circuit detection.++burn-out-current-polarity:+$ref:/schemas/types.yaml#/definitions/string+description:+Burn-out current sources provide current to the channel's input pins for+open-circuit or short-circuit detection.+enum:+-pull-up+-pull-down+anyOf:-oneOf:-required:
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The `reference-source` property lacks specification for the order of positive and negative reference sources when two items are provided.
--
commit 5840bfcda5df91dc955f660547ba3a189d50489a
Author: Kurt Borja [off-list ref]
dt-bindings: iio: adc: Add reference-source property
This commit adds a new reference-source property to the IIO ADC bindings
to allow configuring the voltage reference source or sources for each channel.
@@ -73,6 +73,16 @@ properties:device design and can interact with other characteristics such assettling time.+reference-source:+$ref:/schemas/types.yaml#/definitions/uint32-array+maxItems:2+minItems:1+description:+Indicates the voltage reference source or sources for this channel.++This array describes either a single reference source or a positive and+negative reference sources.
[Severity: Medium]
When two items are provided, how do we know which index corresponds to the
positive source and which to the negative source?
Without defining the order explicitly (for example, whether the first value
is positive and the second is negative), could this ambiguity lead to
inconsistent interpretations across different drivers and device trees?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260618-new-channel-props-v1-0-963c1b5cf40a@gmail.com?part=1
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The `burn-out-current-microamp` property lacks array bounds (e.g., `maxItems`), allowing unbounded arrays to silently pass schema validation.
- [Low] The description for `burn-out-current-polarity` is incorrectly copy-pasted from `burn-out-current-microamp` and fails to describe the polarity property itself.
--
commit a77887c22cdfb0d199c09b61e65157768374c14a
Author: Kurt Borja [off-list ref]
dt-bindings: iio: adc: Add burn-out current properties
This commit adds the burn-out-current-microamp and burn-out-current-polarity
properties to the generic IIO ADC bindings to allow configuration of burn-out
current sources.
@@ -106,6 +106,20 @@ properties:This array describes the current configuration of the excitation currentsources or the single matched current for all sources.+burn-out-current-microamp:+description:+Burn-out current sources provide current to the channel's input pins for+open-circuit or short-circuit detection.
[Severity: Medium]
Since standard device tree schema tools automatically map properties ending in
"-microamp" to an array structure, does this property need an array bound like
maxItems? Without bounds, the schema validator might incorrectly accept an
array of arbitrary size instead of enforcing a single configuration value per
channel.
quoted hunk
++ burn-out-current-polarity:+ $ref: /schemas/types.yaml#/definitions/string+ description:+ Burn-out current sources provide current to the channel's input pins for+ open-circuit or short-circuit detection.
[Severity: Low]
This isn't a bug, but it looks like this description was copy-pasted from
burn-out-current-microamp. Could the description be updated to explain what
the polarity configuration (pull-up/pull-down) actually does?
On Thu, Jun 18, 2026 at 07:33:01PM -0500, Kurt Borja wrote:
quoted hunk
Some ADCs have configurable voltage reference sources for each channel.
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
---
Documentation/devicetree/bindings/iio/adc/adc.yaml | 10 ++++++++++
1 file changed, 10 insertions(+)
@@ -73,6 +73,16 @@ properties:device design and can interact with other characteristics such assettling time.+reference-source:+$ref:/schemas/types.yaml#/definitions/uint32-array+maxItems:2+minItems:1+description:+Indicates the voltage reference source or sources for this channel.++This array describes either a single reference source or a positive and+negative reference sources.
I have no idea from this description what this actually refers to. Is it
a pin? A supply? A channel?
From: David Lechner <dlechner@baylibre.com> Date: 2026-06-19 14:23:29
On 6/18/26 7:33 PM, Kurt Borja wrote:
Hi all,
After submitting a patch series adding support for TI ADS126X ADCs [1],
I was made aware by David [2] that at least two more chip families,
ads1220 [3] and ads1x2c14, share very similar features (though these
chips are not really compatible between them). After that, I found one
more chip with the same features which is already upstream, the
AD4170-4.
As David explained in [2], these chips are intended to be used with
RTDs, thermocouples or other resistive sensors so they share the
following per-channel features:
- Configurable reference selection
- Burn-out Current Sources (BOCS) for diagnostic purpuses
- Excitation current sources (usually called IDACs TI) for sensor
current biasing
Given that these three features are present in all four devices and
three of these drivers are still under review, my proposal is to have
these features be described in adc.yaml and have this series merged
before the three others [1] [2] [3].
This series is sent as RFC because I still don't have much experience
with dt-bindings and I don't know if this approach or the properties are
general enough to be described like this.
Generally, we don't propose bindings without users in the same series.
I was going to wait to see what feedback Jonathan gave on my series
before proposing this.
From: David Lechner <dlechner@baylibre.com> Date: 2026-06-19 14:24:58
On 6/18/26 7:33 PM, Kurt Borja wrote:
quoted hunk
Some ADCs have configurable voltage reference sources for each channel.
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
---
Documentation/devicetree/bindings/iio/adc/adc.yaml | 10 ++++++++++
1 file changed, 10 insertions(+)
@@ -73,6 +73,16 @@ properties:device design and can interact with other characteristics such assettling time.+reference-source:+$ref:/schemas/types.yaml#/definitions/uint32-array+maxItems:2+minItems:1+description:+Indicates the voltage reference source or sources for this channel.++This array describes either a single reference source or a positive and+negative reference sources.
Do you actually know of any devices that allow independently selecting
the positive and negative sources? I don't think I've ever seen anything
like that.
Also, this should be string, not uint32.
From: David Lechner <dlechner@baylibre.com> Date: 2026-06-19 14:27:12
On 6/18/26 7:33 PM, Kurt Borja wrote:
Some ADCs incorporate current sources that provide excitation current to
resistive temperature devices (RTDs), thermistors diodes and other
resistive sensors that require constant current biasing.
The maxItems constraint of 16 is arbitrary but should be big enough for
most devices.
I wouldn't put an arbitrary limit here. The bindings that include it
can extend it to add a limit that makes sense instead.
@@ -83,6 +83,29 @@ properties:This array describes either a single reference source or a positive andnegative reference sources.+excitation-channels:+$ref:/schemas/types.yaml#/definitions/uint32-array+maxItems:16+minItems:1+description:+Excitation current sources provide current to resistive temperature+devices (RTDs), thermistors diodes and other resistive sensors that+require constant current biasing.++This array describes the mux configuration of the excitation current+sources.++excitation-current-microamp:+maxItems:16+minItems:1+description:+Excitation current sources provide current to resistive temperature+devices (RTDs), thermistors diodes and other resistive sensors that+require constant current biasing.++This array describes the current configuration of the excitation current+sources or the single matched current for all sources.+anyOf:-oneOf:-required:
From: David Lechner <dlechner@baylibre.com> Date: 2026-06-19 14:28:42
On 6/18/26 7:33 PM, Kurt Borja wrote:
quoted hunk
Some ADCs incorporate burn-out current sources that provide current to
the channel's input pins for open-circuit or short-circuit detection.
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
---
Documentation/devicetree/bindings/iio/adc/adc.yaml | 14 ++++++++++++++
1 file changed, 14 insertions(+)
@@ -106,6 +106,20 @@ properties:This array describes the current configuration of the excitation currentsources or the single matched current for all sources.+burn-out-current-microamp:+description:+Burn-out current sources provide current to the channel's input pins for+open-circuit or short-circuit detection.++burn-out-current-polarity:+$ref:/schemas/types.yaml#/definitions/string+description:+Burn-out current sources provide current to the channel's input pins for+open-circuit or short-circuit detection.+enum:+-pull-up+-pull-down+anyOf:-oneOf:-required:
This doesn't really work with chips that just have and enable bit to
enable or disable the feature.
Hi Conor,
On Fri Jun 19, 2026 at 9:14 AM -05, Conor Dooley wrote:
On Thu, Jun 18, 2026 at 07:33:01PM -0500, Kurt Borja wrote:
quoted
Some ADCs have configurable voltage reference sources for each channel.
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
---
Documentation/devicetree/bindings/iio/adc/adc.yaml | 10 ++++++++++
1 file changed, 10 insertions(+)
@@ -73,6 +73,16 @@ properties:device design and can interact with other characteristics such assettling time.+reference-source:+$ref:/schemas/types.yaml#/definitions/uint32-array+maxItems:2+minItems:1+description:+Indicates the voltage reference source or sources for this channel.++This array describes either a single reference source or a positive and+negative reference sources.
I have no idea from this description what this actually refers to. Is it
a pin? A supply? A channel?
It can be pins but also can be internal vref sources. Not always a
supply though, in some applications a resistor is connected to the
reference source pins.
If there is a next version I'll clarify it.
On Fri Jun 19, 2026 at 9:23 AM -05, David Lechner wrote:
On 6/18/26 7:33 PM, Kurt Borja wrote:
quoted
Hi all,
After submitting a patch series adding support for TI ADS126X ADCs [1],
I was made aware by David [2] that at least two more chip families,
ads1220 [3] and ads1x2c14, share very similar features (though these
chips are not really compatible between them). After that, I found one
more chip with the same features which is already upstream, the
AD4170-4.
As David explained in [2], these chips are intended to be used with
RTDs, thermocouples or other resistive sensors so they share the
following per-channel features:
- Configurable reference selection
- Burn-out Current Sources (BOCS) for diagnostic purpuses
- Excitation current sources (usually called IDACs TI) for sensor
current biasing
Given that these three features are present in all four devices and
three of these drivers are still under review, my proposal is to have
these features be described in adc.yaml and have this series merged
before the three others [1] [2] [3].
This series is sent as RFC because I still don't have much experience
with dt-bindings and I don't know if this approach or the properties are
general enough to be described like this.
Generally, we don't propose bindings without users in the same series.
I was going to wait to see what feedback Jonathan gave on my series
before proposing this.
Makes sense. In this case I think it would be useful for the three
series to have this first, but not up to me.
On Fri Jun 19, 2026 at 9:24 AM -05, David Lechner wrote:
On 6/18/26 7:33 PM, Kurt Borja wrote:
quoted
Some ADCs have configurable voltage reference sources for each channel.
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
---
Documentation/devicetree/bindings/iio/adc/adc.yaml | 10 ++++++++++
1 file changed, 10 insertions(+)
@@ -73,6 +73,16 @@ properties:device design and can interact with other characteristics such assettling time.+reference-source:+$ref:/schemas/types.yaml#/definitions/uint32-array+maxItems:2+minItems:1+description:+Indicates the voltage reference source or sources for this channel.++This array describes either a single reference source or a positive and+negative reference sources.
Do you actually know of any devices that allow independently selecting
the positive and negative sources? I don't think I've ever seen anything
like that.
The ADS1262 allows it, check the REFMUX register. Only ADC1 allows it
though, ADC2 has a single reference select.
Maybe I can get away with only one for both ADCs without restricting too
much.
On Fri Jun 19, 2026 at 9:27 AM -05, David Lechner wrote:
On 6/18/26 7:33 PM, Kurt Borja wrote:
quoted
Some ADCs incorporate current sources that provide excitation current to
resistive temperature devices (RTDs), thermistors diodes and other
resistive sensors that require constant current biasing.
The maxItems constraint of 16 is arbitrary but should be big enough for
most devices.
I wouldn't put an arbitrary limit here. The bindings that include it
can extend it to add a limit that makes sense instead.
I agree.
This was partly a misunderstanding. I thought -microamp properties fall
back to uint32 not uint32-array but it's the other way around right?
@@ -83,6 +83,29 @@ properties:This array describes either a single reference source or a positive andnegative reference sources.+excitation-channels:+$ref:/schemas/types.yaml#/definitions/uint32-array+maxItems:16+minItems:1+description:+Excitation current sources provide current to resistive temperature+devices (RTDs), thermistors diodes and other resistive sensors that+require constant current biasing.++This array describes the mux configuration of the excitation current+sources.++excitation-current-microamp:+maxItems:16+minItems:1+description:+Excitation current sources provide current to resistive temperature+devices (RTDs), thermistors diodes and other resistive sensors that+require constant current biasing.++This array describes the current configuration of the excitation current+sources or the single matched current for all sources.+anyOf:-oneOf:-required:
On Fri Jun 19, 2026 at 9:28 AM -05, David Lechner wrote:
On 6/18/26 7:33 PM, Kurt Borja wrote:
quoted
Some ADCs incorporate burn-out current sources that provide current to
the channel's input pins for open-circuit or short-circuit detection.
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
---
Documentation/devicetree/bindings/iio/adc/adc.yaml | 14 ++++++++++++++
1 file changed, 14 insertions(+)
@@ -106,6 +106,20 @@ properties:This array describes the current configuration of the excitation currentsources or the single matched current for all sources.+burn-out-current-microamp:+description:+Burn-out current sources provide current to the channel's input pins for+open-circuit or short-circuit detection.++burn-out-current-polarity:+$ref:/schemas/types.yaml#/definitions/string+description:+Burn-out current sources provide current to the channel's input pins for+open-circuit or short-circuit detection.+enum:+-pull-up+-pull-down+anyOf:-oneOf:-required:
This doesn't really work with chips that just have and enable bit to
enable or disable the feature.
Maybe those devices can use burn-out-current-microamp with a const
value? Is that okay or should another approach be taken?
--
Thanks,
~ Kurt
From: David Lechner <dlechner@baylibre.com> Date: 2026-06-20 15:55:08
On 6/19/26 11:44 AM, Kurt Borja wrote:
On Fri Jun 19, 2026 at 9:27 AM -05, David Lechner wrote:
quoted
On 6/18/26 7:33 PM, Kurt Borja wrote:
quoted
Some ADCs incorporate current sources that provide excitation current to
resistive temperature devices (RTDs), thermistors diodes and other
resistive sensors that require constant current biasing.
The maxItems constraint of 16 is arbitrary but should be big enough for
most devices.
I wouldn't put an arbitrary limit here. The bindings that include it
can extend it to add a limit that makes sense instead.
I agree.
This was partly a misunderstanding. I thought -microamp properties fall
back to uint32 not uint32-array but it's the other way around right?
From: David Lechner <dlechner@baylibre.com> Date: 2026-06-20 15:57:57
On 6/19/26 11:46 AM, Kurt Borja wrote:
On Fri Jun 19, 2026 at 9:28 AM -05, David Lechner wrote:
quoted
On 6/18/26 7:33 PM, Kurt Borja wrote:
quoted
Some ADCs incorporate burn-out current sources that provide current to
the channel's input pins for open-circuit or short-circuit detection.
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
---
Documentation/devicetree/bindings/iio/adc/adc.yaml | 14 ++++++++++++++
1 file changed, 14 insertions(+)
@@ -106,6 +106,20 @@ properties:This array describes the current configuration of the excitation currentsources or the single matched current for all sources.+burn-out-current-microamp:+description:+Burn-out current sources provide current to the channel's input pins for+open-circuit or short-circuit detection.++burn-out-current-polarity:+$ref:/schemas/types.yaml#/definitions/string+description:+Burn-out current sources provide current to the channel's input pins for+open-circuit or short-circuit detection.+enum:+-pull-up+-pull-down+anyOf:-oneOf:-required:
This doesn't really work with chips that just have and enable bit to
enable or disable the feature.
Maybe those devices can use burn-out-current-microamp with a const
value? Is that okay or should another approach be taken?
Maybe better to just leave this one out of the common file?
Hi David,
On Sat Jun 20, 2026 at 10:57 AM -05, David Lechner wrote:
On 6/19/26 11:46 AM, Kurt Borja wrote:
quoted
On Fri Jun 19, 2026 at 9:28 AM -05, David Lechner wrote:
quoted
On 6/18/26 7:33 PM, Kurt Borja wrote:
quoted
Some ADCs incorporate burn-out current sources that provide current to
the channel's input pins for open-circuit or short-circuit detection.
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
---
Documentation/devicetree/bindings/iio/adc/adc.yaml | 14 ++++++++++++++
1 file changed, 14 insertions(+)
@@ -106,6 +106,20 @@ properties:This array describes the current configuration of the excitation currentsources or the single matched current for all sources.+burn-out-current-microamp:+description:+Burn-out current sources provide current to the channel's input pins for+open-circuit or short-circuit detection.++burn-out-current-polarity:+$ref:/schemas/types.yaml#/definitions/string+description:+Burn-out current sources provide current to the channel's input pins for+open-circuit or short-circuit detection.+enum:+-pull-up+-pull-down+anyOf:-oneOf:-required:
This doesn't really work with chips that just have and enable bit to
enable or disable the feature.
Maybe those devices can use burn-out-current-microamp with a const
value? Is that okay or should another approach be taken?
Maybe better to just leave this one out of the common file?
IMO burn-out-current-microamp would be nice to have. I don't know how
common it is for bindings to describe this kind of properties with a
single const value though.
On the other hand I do think we should drop burn-out-current-polarity,
maybe it's too specific.
--
Thanks,
~ Kurt