On 06/19, David Lechner wrote: > On 6/18/24 6:12 PM, Marcelo Schmitt wrote: > > Add device tree documentation for AD4000 series of ADC devices. > > > > Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/ad4000-4004-4008.pdf > > Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/ad4001-4005.pdf > > Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/ad4002-4006-4010.pdf > > Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/ad4003-4007-4011.pdf > > Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/ad4020-4021-4022.pdf > > Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/adaq4001.pdf > > Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/adaq4003.pdf > > Datasheets URLs are listed in the patch, so probably don't need them > in the commit message too. okay, removed them for v5. > ... > > There are data sheets listed for adaq400x but no compatibles. Ah, that's correct. I missed - const: adi,adaq4001 - const: adi,adaq4003 thanks > ... > > + > > + adi,gain-milli: > > + description: | > > + The hardware gain applied to the ADC input (in milli units). > > + The gain provided by the ADC input scaler is defined by the hardware > > + connections between chip pins OUT+, R1K-, R1K1-, R1K+, R1K1+, and OUT-. > > + If not present, default to 1000 (no actual gain applied). > > + $ref: /schemas/types.yaml#/definitions/uint16 > > Any particular reason why this needs to be uint16 instead of the more > common uint32? The values fit into 16 bits and Nuno asked to make it a 16-bit property. > > > + enum: [454, 909, 1000, 1900] > > + default: 1000 > > + ... > > + # The configuration register can only be accessed in '3-wire' mode > > + - if: > > + not: > > + properties: > > + adi,spi-mode: > > + contains: > > + enum: > > + - single > > adi,spi-mode is not an array and we are only checking for one value, > so this could be simplified to: > > properties: > adi,spi-mode: > const: single > ok, changed to do the check that way. ... > > +examples: > > + - | > > + #include <dt-bindings/gpio/gpio.h> > > + spi { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + /* Example for a AD devices */ > > Comments are a bit redundant since it says "examples:" above and > the type of the chip in the compatible string. > I like the comments. I think it makes clear we have AD and ADAQ devices but ok, removing them for v5. > > + adc@0 { > > + compatible = "adi,ad4020"; > > + reg = <0>; > > + spi-max-frequency = <71000000>; > > + vdd-supply = <&supply_1_8V>; > > + vio-supply = <&supply_1_8V>; > > + ref-supply = <&supply_5V>; > > + cnv-gpios = <&gpio0 88 GPIO_ACTIVE_HIGH>; > > + }; > > + }; > > + - | > > + spi { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + /* Example for a ADAQ devices */ > > + adc@0 { > > + compatible = "adi,adaq4003"; > > + reg = <0>; > > + spi-max-frequency = <80000000>; > > + vdd-supply = <&supply_1_8V>; > > + vio-supply = <&supply_1_8V>; > > + ref-supply = <&supply_5V>; > > + adi,high-z-input; > > + adi,gain-milli = /bits/ 16 <454>; > > + adi,spi-mode = "single"; > > + }; > > + };