On Wed, 17 Apr 2024 12:04:22 -0500 Chris Morgan <macroalpha82@xxxxxxxxx> wrote: Hi, > From: Chris Morgan <macromorgan@xxxxxxxxxxx> > > Add support for the GPADC for the Allwinner H616. It is identical to > the existing ADC for the D1/T113s/R329/T507 SoCs. The H616 is using the same die as the T507 and the H700, and since the T507 is already mentioned in the commit message for the original binding, I wonder if we actually need a new compatible? I guess we follow the usual approach and provide this new per-SoC compatible string, since the D1 and H616 SoCs are quite different? Just wanted to point this out... > Signed-off-by: Chris Morgan <macromorgan@xxxxxxxxxxx> > --- > .../bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml b/Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml > index 7ef46c90ebc8..da605a051b94 100644 > --- a/Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml > +++ b/Documentation/devicetree/bindings/iio/adc/allwinner,sun20i-d1-gpadc.yaml > @@ -11,8 +11,13 @@ maintainers: > > properties: > compatible: > - enum: > - - allwinner,sun20i-d1-gpadc > + oneOf: > + - enum: > + - allwinner,sun20i-d1-gpadc > + - items: > + - enum: > + - allwinner,sun50i-h616-gpadc > + - const: allwinner,sun20i-d1-gpadc I think a more compact way to write this would be: oneOf: - const: allwinner,sun20i-d1-gpadc - items: - const: allwinner,sun50i-h616-gpadc - const: allwinner,sun20i-d1-gpadc In general: the description in the T507 manual looks the same as in the D1 manual, just with the former having 4, and the latter 2 channels. If I understand correctly, this difference is not modelled in the binding (or the Linux driver, fwiw), so using the compatible fallback looks good. Cheers, Andre > > "#io-channel-cells": > const: 1