Add compatibles for supported parts in the ad7768-1 family:
ADAQ7767-1, ADAQ7768-1 and ADAQ7769-1
Add property and checks for AFF gain, supported by ADAQ7767-1
and ADAQ7769-1 parts:
adi,aaf-gain
Signed-off-by: Jonathan Santos <Jonathan.Santos@analog.com>
---
.../bindings/iio/adc/adi,ad7768-1.yaml | 48 +++++++++++++++++--
1 file changed, 44 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml
index c06d0fc791d3..568a85e0d052 100644
--- a/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml
@@ -4,18 +4,26 @@
$id: http://devicetree.org/schemas/iio/adc/adi,ad7768-1.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: Analog Devices AD7768-1 ADC device driver
+title: Analog Devices AD7768-1 ADC family device driver
maintainers:
- Michael Hennerich <michael.hennerich@analog.com>
description: |
- Datasheet at:
- https://www.analog.com/media/en/technical-documentation/data-sheets/ad7768-1.pdf
+ Analog Devices AD7768-1 24-Bit Single Channel Low Power sigma-delta ADC family
+
+ https://www.analog.com/media/en/technical-documentation/data-sheets/ad7768-1.pdf
+ https://www.analog.com/media/en/technical-documentation/data-sheets/adaq7767-1.pdf
+ https://www.analog.com/media/en/technical-documentation/data-sheets/adaq7768-1.pdf
+ https://www.analog.com/media/en/technical-documentation/data-sheets/adaq7769-1.pdf
properties:
compatible:
- const: adi,ad7768-1
+ enum:
+ - adi,ad7768-1
+ - adi,adaq7767-1
+ - adi,adaq7768-1
+ - adi,adaq7769-1
reg:
maxItems: 1
@@ -58,6 +66,23 @@ properties:
description:
ADC reference voltage supply
+ adi,aaf-gain:
+ description: |
+ Specifies the gain of the Analog Anti-Aliasing Filter (AAF) applied to the
+ ADC input, measured in milli-units. The AAF provides additional signal
+ rejection within the frequency range of fs ± f3dB, where fs is the sampling
+ frequency, and f3dB is the -3dB cutoff frequency. The specific values of
+ fs and f3dB, as well as the rejection intensity, depend on the digital
+ filter configuration.
+
+ This parameter is required for the ADAQ7767-1 and ADAQ7769-1 devices.
+ The gain is determined by the selected input pin:
+ * For the ADAQ7767-1: The input selection of IN1±, IN2± or IN3±.
+ * For the ADAQ7769-1: The connections of OUT_PGA to IN1_AAF+, IN2_AAF+,
+ or IN3_AAF+.
+ $ref: /schemas/types.yaml#/definitions/uint16
+ enum: [143, 364, 1000]
+
adi,sync-in-gpios:
maxItems: 1
description:
@@ -147,6 +172,21 @@ patternProperties:
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
+ # AAF Gain property only applies to ADAQ7767-1 and ADAQ7769-1 devices
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - adi,adaq7767-1
+ - adi,adaq7769-1
+ then:
+ required:
+ - adi,aaf-gain
+ else:
+ properties:
+ adi,aaf-gain: false
+
unevaluatedProperties: false
examples:
--
2.34.1
On 13/08/2025 04:48, Jonathan Santos wrote: > Add compatibles for supported parts in the ad7768-1 family: > ADAQ7767-1, ADAQ7768-1 and ADAQ7769-1 > > Add property and checks for AFF gain, supported by ADAQ7767-1 > and ADAQ7769-1 parts: > adi,aaf-gain > > Signed-off-by: Jonathan Santos <Jonathan.Santos@analog.com> > --- > .../bindings/iio/adc/adi,ad7768-1.yaml | 48 +++++++++++++++++-- > 1 file changed, 44 insertions(+), 4 deletions(-) > > diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml > index c06d0fc791d3..568a85e0d052 100644 > --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml > +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml > @@ -4,18 +4,26 @@ > $id: http://devicetree.org/schemas/iio/adc/adi,ad7768-1.yaml# > $schema: http://devicetree.org/meta-schemas/core.yaml# > > -title: Analog Devices AD7768-1 ADC device driver > +title: Analog Devices AD7768-1 ADC family device driver If doing this, drop device driver. It should not be here in the first place. > > maintainers: > - Michael Hennerich <michael.hennerich@analog.com> > > description: | > - Datasheet at: > - https://www.analog.com/media/en/technical-documentation/data-sheets/ad7768-1.pdf > + Analog Devices AD7768-1 24-Bit Single Channel Low Power sigma-delta ADC family > + > + https://www.analog.com/media/en/technical-documentation/data-sheets/ad7768-1.pdf > + https://www.analog.com/media/en/technical-documentation/data-sheets/adaq7767-1.pdf > + https://www.analog.com/media/en/technical-documentation/data-sheets/adaq7768-1.pdf > + https://www.analog.com/media/en/technical-documentation/data-sheets/adaq7769-1.pdf > > properties: > compatible: > - const: adi,ad7768-1 > + enum: > + - adi,ad7768-1 > + - adi,adaq7767-1 > + - adi,adaq7768-1 > + - adi,adaq7769-1 > > reg: > maxItems: 1 > @@ -58,6 +66,23 @@ properties: > description: > ADC reference voltage supply > > + adi,aaf-gain: > + description: | > + Specifies the gain of the Analog Anti-Aliasing Filter (AAF) applied to the > + ADC input, measured in milli-units. The AAF provides additional signal What is milli unit? Isn't gain in dB, so maybe you want mB? Quite unpopular to see mB, but we cannot use 1/100 of dB, so I could understand it. > + rejection within the frequency range of fs ± f3dB, where fs is the sampling > + frequency, and f3dB is the -3dB cutoff frequency. The specific values of > + fs and f3dB, as well as the rejection intensity, depend on the digital > + filter configuration. Best regards, Krzysztof
On 08/13, Krzysztof Kozlowski wrote: > On 13/08/2025 04:48, Jonathan Santos wrote: > > Add compatibles for supported parts in the ad7768-1 family: > > ADAQ7767-1, ADAQ7768-1 and ADAQ7769-1 > > > > Add property and checks for AFF gain, supported by ADAQ7767-1 > > and ADAQ7769-1 parts: > > adi,aaf-gain > > > > Signed-off-by: Jonathan Santos <Jonathan.Santos@analog.com> > > --- > > .../bindings/iio/adc/adi,ad7768-1.yaml | 48 +++++++++++++++++-- > > 1 file changed, 44 insertions(+), 4 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml > > index c06d0fc791d3..568a85e0d052 100644 > > --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml > > +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml > > @@ -4,18 +4,26 @@ > > $id: http://devicetree.org/schemas/iio/adc/adi,ad7768-1.yaml# > > $schema: http://devicetree.org/meta-schemas/core.yaml# > > > > -title: Analog Devices AD7768-1 ADC device driver > > +title: Analog Devices AD7768-1 ADC family device driver > > If doing this, drop device driver. It should not be here in the first place. > Noted. > > > > maintainers: > > - Michael Hennerich <michael.hennerich@analog.com> > > > > description: | > > - Datasheet at: > > - https://www.analog.com/media/en/technical-documentation/data-sheets/ad7768-1.pdf > > + Analog Devices AD7768-1 24-Bit Single Channel Low Power sigma-delta ADC family > > + > > + https://www.analog.com/media/en/technical-documentation/data-sheets/ad7768-1.pdf > > + https://www.analog.com/media/en/technical-documentation/data-sheets/adaq7767-1.pdf > > + https://www.analog.com/media/en/technical-documentation/data-sheets/adaq7768-1.pdf > > + https://www.analog.com/media/en/technical-documentation/data-sheets/adaq7769-1.pdf > > > > properties: > > compatible: > > - const: adi,ad7768-1 > > + enum: > > + - adi,ad7768-1 > > + - adi,adaq7767-1 > > + - adi,adaq7768-1 > > + - adi,adaq7769-1 > > > > reg: > > maxItems: 1 > > @@ -58,6 +66,23 @@ properties: > > description: > > ADC reference voltage supply > > > > + adi,aaf-gain: > > + description: | > > + Specifies the gain of the Analog Anti-Aliasing Filter (AAF) applied to the > > + ADC input, measured in milli-units. The AAF provides additional signal > > What is milli unit? Isn't gain in dB, so maybe you want mB? Quite > unpopular to see mB, but we cannot use 1/100 of dB, so I could > understand it. > Actually, the gain is expressed in V/V, not in dB. I may have phrased it poorly, but since there are fractional values like 0.364 and 0.143, I chose to represent it in milli-units. > > + rejection within the frequency range of fs ± f3dB, where fs is the sampling > > + frequency, and f3dB is the -3dB cutoff frequency. The specific values of > > + fs and f3dB, as well as the rejection intensity, depend on the digital > > + filter configuration. > Best regards, > Krzysztof
On 14/08/2025 00:39, Jonathan Santos wrote: >>> >>> + adi,aaf-gain: >>> + description: | >>> + Specifies the gain of the Analog Anti-Aliasing Filter (AAF) applied to the >>> + ADC input, measured in milli-units. The AAF provides additional signal >> >> What is milli unit? Isn't gain in dB, so maybe you want mB? Quite >> unpopular to see mB, but we cannot use 1/100 of dB, so I could >> understand it. >> > > Actually, the gain is expressed in V/V, not in dB. I may have phrased it poorly, but since > there are fractional values like 0.364 and 0.143, I chose to represent it > in milli-units. Why your reply to is corrupted: "c3cf9b97-3883-4ebb-a2ed-0033adebda87@kernel.org"? What sort of unit is milli-unit? Isn't this 1/1000 of some BASE unit, but you do not have here a base? I think you want just basis point if this is V/V (already in common property suffixes) Best regards, Krzysztof
On Thu, 14 Aug 2025 08:03:23 +0200 Krzysztof Kozlowski <krzk@kernel.org> wrote: > On 14/08/2025 00:39, Jonathan Santos wrote: > >>> > >>> + adi,aaf-gain: > >>> + description: | > >>> + Specifies the gain of the Analog Anti-Aliasing Filter (AAF) applied to the > >>> + ADC input, measured in milli-units. The AAF provides additional signal > >> > >> What is milli unit? Isn't gain in dB, so maybe you want mB? Quite > >> unpopular to see mB, but we cannot use 1/100 of dB, so I could > >> understand it. > >> > > > > Actually, the gain is expressed in V/V, not in dB. I may have phrased it poorly, but since > > there are fractional values like 0.364 and 0.143, I chose to represent it > > in milli-units. > > Why your reply to is corrupted: > "c3cf9b97-3883-4ebb-a2ed-0033adebda87@kernel.org"? > > > What sort of unit is milli-unit? Isn't this 1/1000 of some BASE unit, > but you do not have here a base? > > I think you want just basis point if this is V/V (already in common > property suffixes) Nice. I didn't know about -bp. That does sound like a good choice for ratio stuff and here would be 100x larger actual values which is fine. > > Best regards, > Krzysztof >
On 08/16, Jonathan Cameron wrote: > On Thu, 14 Aug 2025 08:03:23 +0200 > Krzysztof Kozlowski <krzk@kernel.org> wrote: > > > On 14/08/2025 00:39, Jonathan Santos wrote: > > >>> > > >>> + adi,aaf-gain: > > >>> + description: | > > >>> + Specifies the gain of the Analog Anti-Aliasing Filter (AAF) applied to the > > >>> + ADC input, measured in milli-units. The AAF provides additional signal > > >> > > >> What is milli unit? Isn't gain in dB, so maybe you want mB? Quite > > >> unpopular to see mB, but we cannot use 1/100 of dB, so I could > > >> understand it. > > >> > > > > > > Actually, the gain is expressed in V/V, not in dB. I may have phrased it poorly, but since > > > there are fractional values like 0.364 and 0.143, I chose to represent it > > > in milli-units. > > > > Why your reply to is corrupted: > > "c3cf9b97-3883-4ebb-a2ed-0033adebda87@kernel.org"? > > > > > > What sort of unit is milli-unit? Isn't this 1/1000 of some BASE unit, > > but you do not have here a base? > > > > I think you want just basis point if this is V/V (already in common > > property suffixes) > Nice. I didn't know about -bp. That does sound like a good choice for ratio > stuff and here would be 100x larger actual values which is fine. > Yes, it would be, but the here it is 1000x larger than the actual value (1/1000 V/V). I don't see another unit in property-units.yaml for this specifc case. Maybe using -milli suffix like in 'adi,ad4000.yaml' and 'adi,ad7380.yaml'? > > > > Best regards, > > Krzysztof > >
© 2016 - 2025 Red Hat, Inc.