diff mbox series

[1/1] dt-bindings: iio: adc: add missing vref-supply

Message ID 20230131101323.606931-1-alexander.stein@ew.tq-group.com (mailing list archive)
State New, archived
Headers show
Series [1/1] dt-bindings: iio: adc: add missing vref-supply | expand

Commit Message

Alexander Stein Jan. 31, 2023, 10:13 a.m. UTC
Although this property is used right now for IIO_CHAN_INFO_SCALE,
this ADC has two internal reference voltages, which the driver currently
doesn't make use of.

Fixes: db73419d8c06 ("dt-bindings: iio: adc: Add binding documentation for NXP IMX8QXP ADC")
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
 .../devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml          | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Marco Felsch Jan. 31, 2023, 10:48 a.m. UTC | #1
Hi Alexander,

On 23-01-31, Alexander Stein wrote:
> Although this property is used right now for IIO_CHAN_INFO_SCALE,
> this ADC has two internal reference voltages, which the driver currently
> doesn't make use of.
> 
> Fixes: db73419d8c06 ("dt-bindings: iio: adc: Add binding documentation for NXP IMX8QXP ADC")
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---
>  .../devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml          | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml b/Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml
> index 63369ba388e4..879768af0303 100644
> --- a/Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml
> @@ -39,6 +39,9 @@ properties:
>    power-domains:
>      maxItems: 1
>  
> +  vref-supply:
> +    description: External ADC reference voltage supply on VREFH pad.

Please add it to the list of required properties, we can remove it as
soon as the driver has support for the internal reference voltages.

Regards,
  Marco

> +
>    "#io-channel-cells":
>      const: 1
>  
> @@ -72,6 +75,7 @@ examples:
>              assigned-clocks = <&clk IMX_SC_R_ADC_0>;
>              assigned-clock-rates = <24000000>;
>              power-domains = <&pd IMX_SC_R_ADC_0>;
> +            vref-supply = <&reg_1v8>;
>              #io-channel-cells = <1>;
>          };
>      };
> -- 
> 2.34.1
> 
> 
>
Alexander Stein Jan. 31, 2023, 12:14 p.m. UTC | #2
Hi Marco,

thanks for the feedback.

Am Dienstag, 31. Januar 2023, 11:48:16 CET schrieb Marco Felsch:
> Hi Alexander,
> 
> On 23-01-31, Alexander Stein wrote:
> > Although this property is used right now for IIO_CHAN_INFO_SCALE,
> > this ADC has two internal reference voltages, which the driver currently
> > doesn't make use of.
> > 
> > Fixes: db73419d8c06 ("dt-bindings: iio: adc: Add binding documentation for
> > NXP IMX8QXP ADC") Signed-off-by: Alexander Stein
> > <alexander.stein@ew.tq-group.com>
> > ---
> > 
> >  .../devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml          | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git
> > a/Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml
> > b/Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml index
> > 63369ba388e4..879768af0303 100644
> > --- a/Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml
> > +++ b/Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml
> > 
> > @@ -39,6 +39,9 @@ properties:
> >    power-domains:
> >      maxItems: 1
> > 
> > +  vref-supply:
> > +    description: External ADC reference voltage supply on VREFH pad.
> 
> Please add it to the list of required properties, we can remove it as
> soon as the driver has support for the internal reference voltages.

I was thinking in doing so before as well. But DT describes the hardware, and 
this ADC apparently would be functioning without a reference voltage on that 
pad, using a different one. What the driver actual does is a different matter.

Best regards,
Alexander

> Regards,
>   Marco
> 
> > +
> > 
> >    "#io-channel-cells":
> >      const: 1
> > 
> > @@ -72,6 +75,7 @@ examples:
> >              assigned-clocks = <&clk IMX_SC_R_ADC_0>;
> >              assigned-clock-rates = <24000000>;
> >              power-domains = <&pd IMX_SC_R_ADC_0>;
> > 
> > +            vref-supply = <&reg_1v8>;
> > 
> >              #io-channel-cells = <1>;
> >          
> >          };
> >      
> >      };
Fabio Estevam Jan. 31, 2023, 12:16 p.m. UTC | #3
Hi Alexander,

On Tue, Jan 31, 2023 at 7:13 AM Alexander Stein
<alexander.stein@ew.tq-group.com> wrote:
>
> Although this property is used right now for IIO_CHAN_INFO_SCALE,
> this ADC has two internal reference voltages, which the driver currently
> doesn't make use of.
>
> Fixes: db73419d8c06 ("dt-bindings: iio: adc: Add binding documentation for NXP IMX8QXP ADC")
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>

In the Subject, it would be better to mention imx8qxp-adc.

dt-bindings: iio: imx8qxp-adc: add missing vref-supply
Alexander Stein Jan. 31, 2023, 1:20 p.m. UTC | #4
Hi Fabio,

Am Dienstag, 31. Januar 2023, 13:16:11 CET schrieb Fabio Estevam:
> Hi Alexander,
> 
> On Tue, Jan 31, 2023 at 7:13 AM Alexander Stein
> 
> <alexander.stein@ew.tq-group.com> wrote:
> > Although this property is used right now for IIO_CHAN_INFO_SCALE,
> > this ADC has two internal reference voltages, which the driver currently
> > doesn't make use of.
> > 
> > Fixes: db73419d8c06 ("dt-bindings: iio: adc: Add binding documentation for
> > NXP IMX8QXP ADC") Signed-off-by: Alexander Stein
> > <alexander.stein@ew.tq-group.com>
> 
> In the Subject, it would be better to mention imx8qxp-adc.
> 
> dt-bindings: iio: imx8qxp-adc: add missing vref-supply

Nice, that's a good idea. Will change it.

Thanks and best regards,
Alexander
Marco Felsch Feb. 1, 2023, 12:13 p.m. UTC | #5
Hi Alexander,

On 23-01-31, Alexander Stein wrote:
> Hi Marco,
> 
> thanks for the feedback.
> 
> Am Dienstag, 31. Januar 2023, 11:48:16 CET schrieb Marco Felsch:
> > Hi Alexander,
> > 
> > On 23-01-31, Alexander Stein wrote:
> > > Although this property is used right now for IIO_CHAN_INFO_SCALE,
> > > this ADC has two internal reference voltages, which the driver currently
> > > doesn't make use of.
> > > 
> > > Fixes: db73419d8c06 ("dt-bindings: iio: adc: Add binding documentation for
> > > NXP IMX8QXP ADC") Signed-off-by: Alexander Stein
> > > <alexander.stein@ew.tq-group.com>
> > > ---
> > > 
> > >  .../devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml          | 4 ++++
> > >  1 file changed, 4 insertions(+)
> > > 
> > > diff --git
> > > a/Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml
> > > b/Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml index
> > > 63369ba388e4..879768af0303 100644
> > > --- a/Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml
> > > +++ b/Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml
> > > 
> > > @@ -39,6 +39,9 @@ properties:
> > >    power-domains:
> > >      maxItems: 1
> > > 
> > > +  vref-supply:
> > > +    description: External ADC reference voltage supply on VREFH pad.
> > 
> > Please add it to the list of required properties, we can remove it as
> > soon as the driver has support for the internal reference voltages.
> 
> I was thinking in doing so before as well. But DT describes the hardware, and 
> this ADC apparently would be functioning without a reference voltage on that 
> pad, using a different one. What the driver actual does is a different matter.

I have also thought about it first but than I checked the RM which says
that "multi-reference selection" is chip dependent.

Regards,
  Marco


> 
> Best regards,
> Alexander
> 
> > Regards,
> >   Marco
> > 
> > > +
> > > 
> > >    "#io-channel-cells":
> > >      const: 1
> > > 
> > > @@ -72,6 +75,7 @@ examples:
> > >              assigned-clocks = <&clk IMX_SC_R_ADC_0>;
> > >              assigned-clock-rates = <24000000>;
> > >              power-domains = <&pd IMX_SC_R_ADC_0>;
> > > 
> > > +            vref-supply = <&reg_1v8>;
> > > 
> > >              #io-channel-cells = <1>;
> > >          
> > >          };
> > >      
> > >      };
> 
> 
> 
> 
>
Jonathan Cameron Feb. 2, 2023, 5:10 p.m. UTC | #6
On Wed, 1 Feb 2023 13:13:43 +0100
Marco Felsch <m.felsch@pengutronix.de> wrote:

> Hi Alexander,
> 
> On 23-01-31, Alexander Stein wrote:
> > Hi Marco,
> > 
> > thanks for the feedback.
> > 
> > Am Dienstag, 31. Januar 2023, 11:48:16 CET schrieb Marco Felsch:  
> > > Hi Alexander,
> > > 
> > > On 23-01-31, Alexander Stein wrote:  
> > > > Although this property is used right now for IIO_CHAN_INFO_SCALE,
> > > > this ADC has two internal reference voltages, which the driver currently
> > > > doesn't make use of.
> > > > 
> > > > Fixes: db73419d8c06 ("dt-bindings: iio: adc: Add binding documentation for
> > > > NXP IMX8QXP ADC") Signed-off-by: Alexander Stein
> > > > <alexander.stein@ew.tq-group.com>
> > > > ---
> > > > 
> > > >  .../devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml          | 4 ++++
> > > >  1 file changed, 4 insertions(+)
> > > > 
> > > > diff --git
> > > > a/Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml
> > > > b/Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml index
> > > > 63369ba388e4..879768af0303 100644
> > > > --- a/Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml
> > > > +++ b/Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml
> > > > 
> > > > @@ -39,6 +39,9 @@ properties:
> > > >    power-domains:
> > > >      maxItems: 1
> > > > 
> > > > +  vref-supply:
> > > > +    description: External ADC reference voltage supply on VREFH pad.  
> > > 
> > > Please add it to the list of required properties, we can remove it as
> > > soon as the driver has support for the internal reference voltages.  
> > 
> > I was thinking in doing so before as well. But DT describes the hardware, and 
> > this ADC apparently would be functioning without a reference voltage on that 
> > pad, using a different one. What the driver actual does is a different matter.  
> 
> I have also thought about it first but than I checked the RM which says
> that "multi-reference selection" is chip dependent.

Oh goody. So is it detectable?

If we are going to stick to a single compatible rather than adding them for
the variants with and without this feature, should probably add a note at least
to say it is required for some parts.

Also, link if public would be good for purposes of discussion as my google
fu didn't find relevant doc. (assuming it's public)


Jonathan


> 
> Regards,
>   Marco
> 
> 
> > 
> > Best regards,
> > Alexander
> >   
> > > Regards,
> > >   Marco
> > >   
> > > > +
> > > > 
> > > >    "#io-channel-cells":
> > > >      const: 1
> > > > 
> > > > @@ -72,6 +75,7 @@ examples:
> > > >              assigned-clocks = <&clk IMX_SC_R_ADC_0>;
> > > >              assigned-clock-rates = <24000000>;
> > > >              power-domains = <&pd IMX_SC_R_ADC_0>;
> > > > 
> > > > +            vref-supply = <&reg_1v8>;
> > > > 
> > > >              #io-channel-cells = <1>;
> > > >          
> > > >          };
> > > >      
> > > >      };  
> > 
> > 
> > 
> > 
> >
Alexander Stein Feb. 3, 2023, 7:03 a.m. UTC | #7
Hi,

Am Donnerstag, 2. Februar 2023, 18:10:52 CET schrieb Jonathan Cameron:
> On Wed, 1 Feb 2023 13:13:43 +0100
> 
> Marco Felsch <m.felsch@pengutronix.de> wrote:
> > Hi Alexander,
> > 
> > On 23-01-31, Alexander Stein wrote:
> > > Hi Marco,
> > > 
> > > thanks for the feedback.
> > > 
> > > Am Dienstag, 31. Januar 2023, 11:48:16 CET schrieb Marco Felsch:
> > > > Hi Alexander,
> > > > 
> > > > On 23-01-31, Alexander Stein wrote:
> > > > > Although this property is used right now for IIO_CHAN_INFO_SCALE,
> > > > > this ADC has two internal reference voltages, which the driver
> > > > > currently
> > > > > doesn't make use of.
> > > > > 
> > > > > Fixes: db73419d8c06 ("dt-bindings: iio: adc: Add binding
> > > > > documentation for
> > > > > NXP IMX8QXP ADC") Signed-off-by: Alexander Stein
> > > > > <alexander.stein@ew.tq-group.com>
> > > > > ---
> > > > > 
> > > > >  .../devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml          | 4
> > > > >  ++++
> > > > >  1 file changed, 4 insertions(+)
> > > > > 
> > > > > diff --git
> > > > > a/Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml
> > > > > b/Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml
> > > > > index
> > > > > 63369ba388e4..879768af0303 100644
> > > > > --- a/Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml
> > > > > +++ b/Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml
> > > > > 
> > > > > @@ -39,6 +39,9 @@ properties:
> > > > >    power-domains:
> > > > >      maxItems: 1
> > > > > 
> > > > > +  vref-supply:
> > > > > +    description: External ADC reference voltage supply on VREFH
> > > > > pad.
> > > > 
> > > > Please add it to the list of required properties, we can remove it as
> > > > soon as the driver has support for the internal reference voltages.
> > > 
> > > I was thinking in doing so before as well. But DT describes the
> > > hardware, and this ADC apparently would be functioning without a
> > > reference voltage on that pad, using a different one. What the driver
> > > actual does is a different matter.> 
> > I have also thought about it first but than I checked the RM which says
> > that "multi-reference selection" is chip dependent.

Nice for pointing this out. I wasn't aware that there are differences.

> Oh goody. So is it detectable?

That's my problem. I didn't find any source of information which chips do 
support multiple references and which don't.
Marco, do you have some information on this?

> If we are going to stick to a single compatible rather than adding them for
> the variants with and without this feature, should probably add a note at
> least to say it is required for some parts.

That's a good idea. I'm okay with that, until there is more information 
available.

Best regards
Alexander

> Also, link if public would be good for purposes of discussion as my google
> fu didn't find relevant doc. (assuming it's public)
> 
> 
> Jonathan
> 
> > Regards,
> > 
> >   Marco
> >   
> > > Best regards,
> > > Alexander
> > > 
> > > > Regards,
> > > > 
> > > >   Marco
> > > >   
> > > > > +
> > > > > 
> > > > >    "#io-channel-cells":
> > > > >      const: 1
> > > > > 
> > > > > @@ -72,6 +75,7 @@ examples:
> > > > >              assigned-clocks = <&clk IMX_SC_R_ADC_0>;
> > > > >              assigned-clock-rates = <24000000>;
> > > > >              power-domains = <&pd IMX_SC_R_ADC_0>;
> > > > > 
> > > > > +            vref-supply = <&reg_1v8>;
> > > > > 
> > > > >              #io-channel-cells = <1>;
> > > > >          
> > > > >          };
> > > > >      
> > > > >      };
Marco Felsch Feb. 3, 2023, 2:12 p.m. UTC | #8
Hi,

On 23-02-03, Alexander Stein wrote:

...

> > > > > > +  vref-supply:
> > > > > > +    description: External ADC reference voltage supply on VREFH
> > > > > > pad.
> > > > > 
> > > > > Please add it to the list of required properties, we can remove it as
> > > > > soon as the driver has support for the internal reference voltages.
> > > > 
> > > > I was thinking in doing so before as well. But DT describes the
> > > > hardware, and this ADC apparently would be functioning without a
> > > > reference voltage on that pad, using a different one. What the driver
> > > > actual does is a different matter.> 
> > > I have also thought about it first but than I checked the RM which says
> > > that "multi-reference selection" is chip dependent.
> 
> Nice for pointing this out. I wasn't aware that there are differences.
> 
> > Oh goody. So is it detectable?
> 
> That's my problem. I didn't find any source of information which chips do 
> support multiple references and which don't.
> Marco, do you have some information on this?

You can download the RM from the NXP website but you need an account for
it:
https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-8-applications-processors/i-mx-8-family-arm-cortex-a53-cortex-a72-virtualization-vision-3d-graphics-4k-video:i.MX8

Or is this the wrong model? The naming scheme is quite confusing to me.

> > If we are going to stick to a single compatible rather than adding them for
> > the variants with and without this feature, should probably add a note at
> > least to say it is required for some parts.
> 
> That's a good idea. I'm okay with that, until there is more information 
> available.

According the RM there is a bit which can be read: Multi Vref
Implemented (MVI).

Regards,
  Marco
Alexander Stein Feb. 3, 2023, 2:20 p.m. UTC | #9
Am Freitag, 3. Februar 2023, 15:12:17 CET schrieb Marco Felsch:
> Hi,
> 
> On 23-02-03, Alexander Stein wrote:
> 
> ...
> 
> > > > > > > +  vref-supply:
> > > > > > > +    description: External ADC reference voltage supply on VREFH
> > > > > > > pad.
> > > > > > 
> > > > > > Please add it to the list of required properties, we can remove it
> > > > > > as
> > > > > > soon as the driver has support for the internal reference
> > > > > > voltages.
> > > > > 
> > > > > I was thinking in doing so before as well. But DT describes the
> > > > > hardware, and this ADC apparently would be functioning without a
> > > > > reference voltage on that pad, using a different one. What the
> > > > > driver
> > > > > actual does is a different matter.>
> > > > 
> > > > I have also thought about it first but than I checked the RM which
> > > > says
> > > > that "multi-reference selection" is chip dependent.
> > 
> > Nice for pointing this out. I wasn't aware that there are differences.
> > 
> > > Oh goody. So is it detectable?
> > 
> > That's my problem. I didn't find any source of information which chips do
> > support multiple references and which don't.
> > Marco, do you have some information on this?
> 
> You can download the RM from the NXP website but you need an account for
> it:
> https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/
> i-mx-applications-processors/i-mx-8-applications-processors/i-mx-8-family-ar
> m-cortex-a53-cortex-a72-virtualization-vision-3d-graphics-4k-video:i.MX8
> 
> Or is this the wrong model? The naming scheme is quite confusing to me.

That's i.MX8 (imx8qm), the bindings are for i.MX8X (imx8qxp/imx8dxp). But I 
assume the ADC is similar/identical.

> > > If we are going to stick to a single compatible rather than adding them
> > > for
> > > the variants with and without this feature, should probably add a note
> > > at
> > > least to say it is required for some parts.
> > 
> > That's a good idea. I'm okay with that, until there is more information
> > available.
> 
> According the RM there is a bit which can be read: Multi Vref
> Implemented (MVI).

Ah, nice. So there is a hardware feature. From the RM I have available it is 
set for both imx8qm and imx8qxp. Given that I will not mark this as required, 
but add a comment regarding this feature bit.

Best regards,
Alexander

> Regards,
>   Marco
Marco Felsch Feb. 4, 2023, 12:13 a.m. UTC | #10
HI Alexander,

On 23-02-03, Alexander Stein wrote:
> Am Freitag, 3. Februar 2023, 15:12:17 CET schrieb Marco Felsch:
> > Hi,
> > 
> > On 23-02-03, Alexander Stein wrote:
> > 
> > ...
> > 
> > > > > > > > +  vref-supply:
> > > > > > > > +    description: External ADC reference voltage supply on VREFH
> > > > > > > > pad.
> > > > > > > 
> > > > > > > Please add it to the list of required properties, we can remove it
> > > > > > > as
> > > > > > > soon as the driver has support for the internal reference
> > > > > > > voltages.
> > > > > > 
> > > > > > I was thinking in doing so before as well. But DT describes the
> > > > > > hardware, and this ADC apparently would be functioning without a
> > > > > > reference voltage on that pad, using a different one. What the
> > > > > > driver
> > > > > > actual does is a different matter.>
> > > > > 
> > > > > I have also thought about it first but than I checked the RM which
> > > > > says
> > > > > that "multi-reference selection" is chip dependent.
> > > 
> > > Nice for pointing this out. I wasn't aware that there are differences.
> > > 
> > > > Oh goody. So is it detectable?
> > > 
> > > That's my problem. I didn't find any source of information which chips do
> > > support multiple references and which don't.
> > > Marco, do you have some information on this?
> > 
> > You can download the RM from the NXP website but you need an account for
> > it:
> > https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/
> > i-mx-applications-processors/i-mx-8-applications-processors/i-mx-8-family-ar
> > m-cortex-a53-cortex-a72-virtualization-vision-3d-graphics-4k-video:i.MX8
> > 
> > Or is this the wrong model? The naming scheme is quite confusing to me.
> 
> That's i.MX8 (imx8qm), the bindings are for i.MX8X (imx8qxp/imx8dxp). But I 
> assume the ADC is similar/identical.
> 
> > > > If we are going to stick to a single compatible rather than adding them
> > > > for
> > > > the variants with and without this feature, should probably add a note
> > > > at
> > > > least to say it is required for some parts.
> > > 
> > > That's a good idea. I'm okay with that, until there is more information
> > > available.
> > 
> > According the RM there is a bit which can be read: Multi Vref
> > Implemented (MVI).
> 
> Ah, nice. So there is a hardware feature. From the RM I have available it is 
> set for both imx8qm and imx8qxp. Given that I will not mark this as required, 
> but add a comment regarding this feature bit.

Can you check the comments about the refsel please? Since this is the
important part.  Since the RM above states that this bit will indicate a
multiref device but it can also the case that, you have a chip with just
on ref selection option (external). I can't check this since I don't
have the RM for this. @NXP can you give us more information please?

Regards,
  Marco
Alexander Stein Feb. 6, 2023, 11:54 a.m. UTC | #11
Hi Marco,

Am Samstag, 4. Februar 2023, 01:13:33 CET schrieb Marco Felsch:
> HI Alexander,
> 
> On 23-02-03, Alexander Stein wrote:
> > Am Freitag, 3. Februar 2023, 15:12:17 CET schrieb Marco Felsch:
> > > Hi,
> > > 
> > > On 23-02-03, Alexander Stein wrote:
> > > 
> > > ...
> > > 
> > > > > > > > > +  vref-supply:
> > > > > > > > > +    description: External ADC reference voltage supply on
> > > > > > > > > VREFH
> > > > > > > > > pad.
> > > > > > > > 
> > > > > > > > Please add it to the list of required properties, we can
> > > > > > > > remove it
> > > > > > > > as
> > > > > > > > soon as the driver has support for the internal reference
> > > > > > > > voltages.
> > > > > > > 
> > > > > > > I was thinking in doing so before as well. But DT describes the
> > > > > > > hardware, and this ADC apparently would be functioning without a
> > > > > > > reference voltage on that pad, using a different one. What the
> > > > > > > driver
> > > > > > > actual does is a different matter.>
> > > > > > 
> > > > > > I have also thought about it first but than I checked the RM which
> > > > > > says
> > > > > > that "multi-reference selection" is chip dependent.
> > > > 
> > > > Nice for pointing this out. I wasn't aware that there are differences.
> > > > 
> > > > > Oh goody. So is it detectable?
> > > > 
> > > > That's my problem. I didn't find any source of information which chips
> > > > do
> > > > support multiple references and which don't.
> > > > Marco, do you have some information on this?
> > > 
> > > You can download the RM from the NXP website but you need an account for
> > > it:
> > > https://www.nxp.com/products/processors-and-microcontrollers/arm-process
> > > ors/
> > > i-mx-applications-processors/i-mx-8-applications-processors/i-mx-8-fami
> > > ly-ar
> > > m-cortex-a53-cortex-a72-virtualization-vision-3d-graphics-4k-video:i.MX
> > > 8
> > > 
> > > Or is this the wrong model? The naming scheme is quite confusing to me.
> > 
> > That's i.MX8 (imx8qm), the bindings are for i.MX8X (imx8qxp/imx8dxp). But
> > I
> > assume the ADC is similar/identical.
> > 
> > > > > If we are going to stick to a single compatible rather than adding
> > > > > them
> > > > > for
> > > > > the variants with and without this feature, should probably add a
> > > > > note
> > > > > at
> > > > > least to say it is required for some parts.
> > > > 
> > > > That's a good idea. I'm okay with that, until there is more
> > > > information
> > > > available.
> > > 
> > > According the RM there is a bit which can be read: Multi Vref
> > > Implemented (MVI).
> > 
> > Ah, nice. So there is a hardware feature. From the RM I have available it
> > is set for both imx8qm and imx8qxp. Given that I will not mark this as
> > required, but add a comment regarding this feature bit.
> 
> Can you check the comments about the refsel please? Since this is the
> important part.  Since the RM above states that this bit will indicate a
> multiref device but it can also the case that, you have a chip with just
> on ref selection option (external). I can't check this since I don't
> have the RM for this. @NXP can you give us more information please?

I would assume if MVI is 0 REFSEL should be considered reserved.
Both imx8qm and imx8qxp have MVI set, even imx1170 has this bit set. So I am 
not aware of any SoC with MVI not being set.

Best regards,
Alexander
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml b/Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml
index 63369ba388e4..879768af0303 100644
--- a/Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml
@@ -39,6 +39,9 @@  properties:
   power-domains:
     maxItems: 1
 
+  vref-supply:
+    description: External ADC reference voltage supply on VREFH pad.
+
   "#io-channel-cells":
     const: 1
 
@@ -72,6 +75,7 @@  examples:
             assigned-clocks = <&clk IMX_SC_R_ADC_0>;
             assigned-clock-rates = <24000000>;
             power-domains = <&pd IMX_SC_R_ADC_0>;
+            vref-supply = <&reg_1v8>;
             #io-channel-cells = <1>;
         };
     };