On Thu, 5 May 2022 19:40:36 +0100 Biju Das <biju.das.jz@xxxxxxxxxxxxxx> wrote: > Document Renesas RZ/G2UL ADC bindings. RZ/G2UL ADC is almost identical > to RZ/G2L, but it has 2 analog input channels compared to 8 channels > on the RZ/G2L. > > Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx> > --- > v1->v2: > * Started using generic compatible for RZ/G2UL and added SoC specific validation > for channels. > --- > .../bindings/iio/adc/renesas,rzg2l-adc.yaml | 45 ++++++++++++++++--- > 1 file changed, 38 insertions(+), 7 deletions(-) > > diff --git a/Documentation/devicetree/bindings/iio/adc/renesas,rzg2l-adc.yaml b/Documentation/devicetree/bindings/iio/adc/renesas,rzg2l-adc.yaml > index d66c24cae1e1..2da3538a3543 100644 > --- a/Documentation/devicetree/bindings/iio/adc/renesas,rzg2l-adc.yaml > +++ b/Documentation/devicetree/bindings/iio/adc/renesas,rzg2l-adc.yaml > @@ -19,6 +19,7 @@ properties: > compatible: > items: > - enum: > + - renesas,r9a07g043-adc # RZ/G2UL > - renesas,r9a07g044-adc # RZ/G2L > - renesas,r9a07g054-adc # RZ/V2L > - const: renesas,rzg2l-adc > @@ -74,18 +75,48 @@ patternProperties: > Represents the external channels which are connected to the ADC. > > properties: > - reg: > - description: | > - The channel number. It can have up to 8 channels numbered from 0 to 7. Leave description: | The channel number. here. The rest of this description is obvious from the below schema so doesn't need to also be in the descriptions. > - items: > - - minimum: 0 > - maximum: 7 > - > + reg: true > required: > - reg > > additionalProperties: false > > +allOf: > + - if: > + properties: > + compatible: > + contains: > + const: renesas,r9a07g043-adc > + then: > + patternProperties: > + "^channel@[0-7]$": > + type: object > + properties: > + reg: > + description: | > + The channel number. It can have up to 2 channels numbered from 0 to 1. > + items: > + - minimum: 0 > + maximum: 1 > + - if: > + properties: > + compatible: > + contains: > + enum: > + - renesas,r9a07g044-adc > + - renesas,r9a07g054-adc > + then: > + patternProperties: > + "^channel@[0-7]$": > + type: object > + properties: > + reg: > + description: | > + The channel number. It can have up to 8 channels numbered from 0 to 7. > + items: > + - minimum: 0 > + maximum: 7 > + > additionalProperties: false > > examples: