Re: [PATCH 2/4] dt-bindings: iio: adc: Add adi,ad4052

Jorge Marques
2025-03-09T20:11:35Z

> > + https://www.analog.com/media/en/technical-documentation/data-sheets/ad4050.pdf
> > + https://www.analog.com/media/en/technical-documentation/data-sheets/ad4052.pdf
>
> The links above don't work for me. Instead...
>
> https://www.analog.com/media/en/technical-documentation/data-sheets/ad4050-ad4056.pdf
> https://www.analog.com/media/en/technical-documentation/data-sheets/ad4052-ad4058.pdf
Thanks!

> > + clocks:
> > + description:
> > + Reference clock
> > + maxItems: 1
>
> I don't see any pins in the datasheet about a "reference clock" input.
> Is this for the CNV pin? If this is for the internal clock, then we
> don't need a property for it.
Indeed, this will be removed.

>
> > +
> > + interrupts:
> > + items:
> > + - description: threshold events.
> > + - description: device ready and data ready.
> > +
>
> Since there are multiple interrupts, we should also have an
> interrupt-names property. Also, the interrupts should be named after
> the pin they are connected to, not the function. So the interrupt
> names should be "rdy", "gp0", and "gp1".
Agreed.

>
> > + cnv-gpios:
> > + maxItems: 1
>
> Not necessary, but I would not mind having a description that says
> that the CNV pin may also be connected to the CS line of the SPI
> controller if it is not connected to a GPIO.
Included.

>
> > +
> > + spi-max-frequency:
> > + maximum: 62500000
> > +
> > + vdd-supply: true
>
> > + vdd_1_8-supply: true
>
> This one seems redundant and should be dropped.
>
> But there is also a possible separate reference voltage supply, so we
> should have a ref-supply property.
>
> > + vio-supply: true
Yes, I overlooked the supplies, vio, vdd are mandatory, and vref is optional.
Also noted Jonathan's comment that the aim is to reflect what should
be provided, not what Linux does with it.

>
> These chips also have GPIO pins, so we can add the gpio-controller and
> #gpio-cells properties to the bindings even if we don't implement this
> in the driver.
Good to know, added as suggested.

>
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - interrupts
>
> The chip won't work without vcc-supply and vio-supply so they should
> be required. ref-supply is clearly optional though.
Aggreed.