mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: iio: adc: rockchip-saradc: Fix RV1106 compatible
@ 2026-08-16 11:36 Vladislav Leonov
  2026-08-19  6:52 ` Joshua Crofts
  2026-08-21  7:27 ` Krzysztof Kozlowski
  0 siblings, 2 replies; 6+ messages in thread
From: Vladislav Leonov @ 2026-08-16 11:36 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Heiko Stuebner, Andy Shevchenko, David Lechner, Conor Dooley,
	Krzysztof Kozlowski, Nuno Sá,
	Rob Herring, Jonas Karlman, Simon Glass, linux-iio, devicetree,
	linux-rockchip, linux-arm-kernel, linux-kernel, Vladislav Leonov

rockchip,rv1106-saradc was folded into the fallback enum together
with rockchip,rk3576-saradc, falling back to rockchip,rk3588-saradc.
The two IP blocks are not equivalent, though: per the RV1106 TRM v0.3,
chapter 20 (SAR-ADC), RV1106 only has 2 channels at 10-bit resolution,
versus 8 channels at 12-bit on RK3588. Documenting it as falling back
to rk3588-saradc allows device trees that would bind against the wrong
channel table and report an incorrect voltage scale.

Remove rockchip,rv1106-saradc from the RK3588 fallback enum and give
it its own standalone compatible entry, matching the dedicated match
table entry added by the driver patch.

Fixes: bdba14f6122c ("dt-bindings: iio: adc: rockchip-saradc: Add RV1106 compatible")
Link: https://lore.kernel.org/all/20260810090826.146758-1-vlad@zlab.su
Signed-off-by: Vladislav Leonov <vlad@zlab.su>
---
 .../devicetree/bindings/iio/adc/rockchip-saradc.yaml         | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.yaml b/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.yaml
index f0551d665916..dc56855527b8 100644
--- a/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.yaml
@@ -22,9 +22,7 @@ properties:
       - const: rockchip,rk3562-saradc
       - const: rockchip,rk3588-saradc
       - items:
-          - enum:
-              - rockchip,rk3576-saradc
-              - rockchip,rv1106-saradc
+          - const: rockchip,rk3576-saradc
           - const: rockchip,rk3588-saradc
       - items:
           - enum:
@@ -35,6 +33,7 @@ properties:
               - rockchip,rv1108-saradc
               - rockchip,rv1126-saradc
           - const: rockchip,rk3399-saradc
+      - const: rockchip,rv1106-saradc
 
   reg:
     maxItems: 1
-- 
2.47.3


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] dt-bindings: iio: adc: rockchip-saradc: Fix RV1106 compatible
  2026-08-16 11:36 [PATCH] dt-bindings: iio: adc: rockchip-saradc: Fix RV1106 compatible Vladislav Leonov
@ 2026-08-19  6:52 ` Joshua Crofts
  2026-08-19  7:59   ` Vladislav Leonov
  2026-08-21  7:27 ` Krzysztof Kozlowski
  1 sibling, 1 reply; 6+ messages in thread
From: Joshua Crofts @ 2026-08-19  6:52 UTC (permalink / raw)
  To: Vladislav Leonov
  Cc: Jonathan Cameron, Heiko Stuebner, Andy Shevchenko, David Lechner,
	Conor Dooley, Krzysztof Kozlowski, Nuno Sá,
	Rob Herring, Jonas Karlman, Simon Glass, linux-iio, devicetree,
	linux-rockchip, linux-arm-kernel, linux-kernel

On Sun, 16 Aug 2026 14:36:36 +0300
Vladislav Leonov <vlad@zlab.su> wrote:

> rockchip,rv1106-saradc was folded into the fallback enum together
> with rockchip,rk3576-saradc, falling back to rockchip,rk3588-saradc.
> The two IP blocks are not equivalent, though: per the RV1106 TRM v0.3,
> chapter 20 (SAR-ADC), RV1106 only has 2 channels at 10-bit resolution,
> versus 8 channels at 12-bit on RK3588. Documenting it as falling back
> to rk3588-saradc allows device trees that would bind against the wrong
> channel table and report an incorrect voltage scale.
> 
> Remove rockchip,rv1106-saradc from the RK3588 fallback enum and give
> it its own standalone compatible entry, matching the dedicated match
> table entry added by the driver patch.
> 
> Fixes: bdba14f6122c ("dt-bindings: iio: adc: rockchip-saradc: Add RV1106 compatible")
> Link: https://lore.kernel.org/all/20260810090826.146758-1-vlad@zlab.su
> Signed-off-by: Vladislav Leonov <vlad@zlab.su>
> ---

Looking at the link provided, it seems that there should be a Suggested-by
tag for Jonathan?

Otherwise LGTM

Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>

-- 
Kind regards,
Joshua Crofts

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] dt-bindings: iio: adc: rockchip-saradc: Fix RV1106 compatible
  2026-08-19  6:52 ` Joshua Crofts
@ 2026-08-19  7:59   ` Vladislav Leonov
  2026-08-19  8:02     ` Joshua Crofts
  0 siblings, 1 reply; 6+ messages in thread
From: Vladislav Leonov @ 2026-08-19  7:59 UTC (permalink / raw)
  To: joshua.crofts1
  Cc: andy, conor+dt, devicetree, dlechner, heiko, jic23, jonas,
	krzk+dt, linux-arm-kernel, linux-iio, linux-kernel,
	linux-rockchip, nuno.sa, robh, sjg, vlad

Hi Joshua,

Sorry, I forgot the Suggested-by tag. Should I send a v2, or can the tag be added when applying the patch?

Regards,
Vladislav

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] dt-bindings: iio: adc: rockchip-saradc: Fix RV1106 compatible
  2026-08-19  7:59   ` Vladislav Leonov
@ 2026-08-19  8:02     ` Joshua Crofts
  0 siblings, 0 replies; 6+ messages in thread
From: Joshua Crofts @ 2026-08-19  8:02 UTC (permalink / raw)
  To: Vladislav Leonov
  Cc: andy, conor+dt, devicetree, dlechner, heiko, jic23, jonas,
	krzk+dt, linux-arm-kernel, linux-iio, linux-kernel,
	linux-rockchip, nuno.sa, robh, sjg

On Wed, 19 Aug 2026 10:59:21 +0300
Vladislav Leonov <vlad@zlab.su> wrote:

> Hi Joshua,
> 
> Sorry, I forgot the Suggested-by tag. Should I send a v2, or can the tag be added when applying the patch?
> 
> Regards,
> Vladislav

I think that Jonathan can just add it while applying. No need to
send a v2 unless explicitly asked.

-- 
Kind regards,
Joshua Crofts

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] dt-bindings: iio: adc: rockchip-saradc: Fix RV1106 compatible
  2026-08-16 11:36 [PATCH] dt-bindings: iio: adc: rockchip-saradc: Fix RV1106 compatible Vladislav Leonov
  2026-08-19  6:52 ` Joshua Crofts
@ 2026-08-21  7:27 ` Krzysztof Kozlowski
  2026-08-21  9:30   ` Vladislav Leonov
  1 sibling, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2026-08-21  7:27 UTC (permalink / raw)
  To: Vladislav Leonov
  Cc: Jonathan Cameron, Heiko Stuebner, Andy Shevchenko, David Lechner,
	Conor Dooley, Krzysztof Kozlowski, Nuno Sá,
	Rob Herring, Jonas Karlman, Simon Glass, linux-iio, devicetree,
	linux-rockchip, linux-arm-kernel, linux-kernel

On Sun, Aug 16, 2026 at 02:36:36PM +0300, Vladislav Leonov wrote:
> rockchip,rv1106-saradc was folded into the fallback enum together
> with rockchip,rk3576-saradc, falling back to rockchip,rk3588-saradc.
> The two IP blocks are not equivalent, though: per the RV1106 TRM v0.3,
> chapter 20 (SAR-ADC), RV1106 only has 2 channels at 10-bit resolution,
> versus 8 channels at 12-bit on RK3588. Documenting it as falling back
> to rk3588-saradc allows device trees that would bind against the wrong
> channel table and report an incorrect voltage scale.
> 
> Remove rockchip,rv1106-saradc from the RK3588 fallback enum and give
> it its own standalone compatible entry, matching the dedicated match
> table entry added by the driver patch.
> 
> Fixes: bdba14f6122c ("dt-bindings: iio: adc: rockchip-saradc: Add RV1106 compatible")
> Link: https://lore.kernel.org/all/20260810090826.146758-1-vlad@zlab.su
> Signed-off-by: Vladislav Leonov <vlad@zlab.su>
> ---
>  .../devicetree/bindings/iio/adc/rockchip-saradc.yaml         | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.yaml b/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.yaml
> index f0551d665916..dc56855527b8 100644
> --- a/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.yaml
> @@ -22,9 +22,7 @@ properties:
>        - const: rockchip,rk3562-saradc
>        - const: rockchip,rk3588-saradc
>        - items:
> -          - enum:
> -              - rockchip,rk3576-saradc
> -              - rockchip,rv1106-saradc
> +          - const: rockchip,rk3576-saradc
>            - const: rockchip,rk3588-saradc
>        - items:
>            - enum:
> @@ -35,6 +33,7 @@ properties:
>                - rockchip,rv1108-saradc
>                - rockchip,rv1126-saradc
>            - const: rockchip,rk3399-saradc
> +      - const: rockchip,rv1106-saradc

So this goes to an enum with all the other single-entries.

Anyway, where is a driver binding to above compatible (see DT submitting
patches). git grep on a week old next gave me nothing.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] dt-bindings: iio: adc: rockchip-saradc: Fix RV1106 compatible
  2026-08-21  7:27 ` Krzysztof Kozlowski
@ 2026-08-21  9:30   ` Vladislav Leonov
  0 siblings, 0 replies; 6+ messages in thread
From: Vladislav Leonov @ 2026-08-21  9:30 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Jonathan Cameron, Heiko Stuebner, Andy Shevchenko, David Lechner,
	Conor Dooley, Krzysztof Kozlowski, Nuno Sá,
	Rob Herring, Jonas Karlman, Simon Glass, linux-iio, devicetree,
	linux-rockchip, linux-arm-kernel, linux-kernel,
	Владислав
	Леонов

On Friday, August 21, 2026 10:27 MSK, Krzysztof Kozlowski <krzk@kernel.org> wrote:

> On Sun, Aug 16, 2026 at 02:36:36PM +0300, Vladislav Leonov wrote:
> > rockchip,rv1106-saradc was folded into the fallback enum together
> > with rockchip,rk3576-saradc, falling back to rockchip,rk3588-saradc.
> > The two IP blocks are not equivalent, though: per the RV1106 TRM v0.3,
> > chapter 20 (SAR-ADC), RV1106 only has 2 channels at 10-bit resolution,
> > versus 8 channels at 12-bit on RK3588. Documenting it as falling back
> > to rk3588-saradc allows device trees that would bind against the wrong
> > channel table and report an incorrect voltage scale.
> > 
> > Remove rockchip,rv1106-saradc from the RK3588 fallback enum and give
> > it its own standalone compatible entry, matching the dedicated match
> > table entry added by the driver patch.
> > 
> > Fixes: bdba14f6122c ("dt-bindings: iio: adc: rockchip-saradc: Add RV1106 compatible")
> > Link: https://lore.kernel.org/all/20260810090826.146758-1-vlad@zlab.su
> > Signed-off-by: Vladislav Leonov <vlad@zlab.su>
> > ---
> >  .../devicetree/bindings/iio/adc/rockchip-saradc.yaml         | 5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.yaml b/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.yaml
> > index f0551d665916..dc56855527b8 100644
> > --- a/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.yaml
> > +++ b/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.yaml
> > @@ -22,9 +22,7 @@ properties:
> >        - const: rockchip,rk3562-saradc
> >        - const: rockchip,rk3588-saradc
> >        - items:
> > -          - enum:
> > -              - rockchip,rk3576-saradc
> > -              - rockchip,rv1106-saradc
> > +          - const: rockchip,rk3576-saradc
> >            - const: rockchip,rk3588-saradc
> >        - items:
> >            - enum:
> > @@ -35,6 +33,7 @@ properties:
> >                - rockchip,rv1108-saradc
> >                - rockchip,rv1126-saradc
> >            - const: rockchip,rk3399-saradc
> > +      - const: rockchip,rv1106-saradc
> 
> So this goes to an enum with all the other single-entries.
> 
> Anyway, where is a driver binding to above compatible (see DT submitting
> patches). git grep on a week old next gave me nothing.
> 
> Best regards,
> Krzysztof
> 

Hi Krzysztof,

I will combine it into a single enum in v2.

The driver patch adding this compatible has been sent but is not merged yet:
Link: https://lore.kernel.org/all/20260810090826.146758-1-vlad@zlab.su

-- 
Regards,
Vladislav


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-08-21  9:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-16 11:36 [PATCH] dt-bindings: iio: adc: rockchip-saradc: Fix RV1106 compatible Vladislav Leonov
2026-08-19  6:52 ` Joshua Crofts
2026-08-19  7:59   ` Vladislav Leonov
2026-08-19  8:02     ` Joshua Crofts
2026-08-21  7:27 ` Krzysztof Kozlowski
2026-08-21  9:30   ` Vladislav Leonov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®