Devicetree
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Fix RV1106 SAR-ADC support
@ 2026-08-23 12:20 Vladislav Leonov
  2026-08-23 12:20 ` [PATCH v2 2/3] dt-bindings: iio: adc: rockchip-saradc: Group single-entries into an enum list Vladislav Leonov
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Vladislav Leonov @ 2026-08-23 12:20 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Vladislav Leonov, David Lechner, Nuno Sá, Andy Shevchenko,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Joshua Crofts, Simon Glass, linux-iio, devicetree,
	linux-arm-kernel, linux-rockchip, linux-kernel

This series fixes the support for the RV1106 SAR-ADC in the
rockchip_saradc driver and its device tree bindings.

Changes in v2:
- Combined the driver patch and the dt-binding fix into a series, as
  requested by Jonathan.
- Introduced a new patch (2/3) to group single-entries into an enum list,
  as suggested by Krzysztof.
- Added missing Suggested-by tag to the patch 3/3
- rockchip,rv1106-saradc compatible moved from the
  single-entry to enum list in the patch 3/3

Vladislav Leonov (3):
  iio: adc: rockchip_saradc: Add support for RV1106
  dt-bindings: iio: adc: rockchip-saradc: Group single-entries into an
    enum list
  dt-bindings: iio: adc: rockchip-saradc: Fix RV1106 compatible

 .../bindings/iio/adc/rockchip-saradc.yaml      | 18 +++++++++---------
 drivers/iio/adc/rockchip_saradc.c              | 16 ++++++++++++++++
 2 files changed, 25 insertions(+), 9 deletions(-)

-- 
2.47.3


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

* [PATCH v2 2/3] dt-bindings: iio: adc: rockchip-saradc: Group single-entries into an enum list
  2026-08-23 12:20 [PATCH v2 0/3] Fix RV1106 SAR-ADC support Vladislav Leonov
@ 2026-08-23 12:20 ` Vladislav Leonov
  2026-08-24 16:38   ` Conor Dooley
  2026-08-23 12:20 ` [PATCH v2 3/3] dt-bindings: iio: adc: rockchip-saradc: Fix RV1106 compatible Vladislav Leonov
  2026-08-31  1:55 ` [PATCH v2 0/3] Fix RV1106 SAR-ADC support Jonathan Cameron
  2 siblings, 1 reply; 8+ messages in thread
From: Vladislav Leonov @ 2026-08-23 12:20 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Vladislav Leonov, David Lechner, Nuno Sá, Andy Shevchenko,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Joshua Crofts, Simon Glass, linux-iio, devicetree,
	linux-arm-kernel, linux-rockchip, linux-kernel,
	Krzysztof Kozlowski

Group single-entries into an enum list

Suggested-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Vladislav Leonov <vlad@zlab.su>
---

Changes in v2:
- Patch introduced in v2.

 .../bindings/iio/adc/rockchip-saradc.yaml           | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.yaml b/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.yaml
index f0551d665916..78ec9a33da24 100644
--- a/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.yaml
@@ -12,15 +12,16 @@ maintainers:
 properties:
   compatible:
     oneOf:
-      - const: rockchip,saradc
-      - const: rockchip,rk3066-tsadc
-      - const: rockchip,rk3399-saradc
-      - const: rockchip,rk3528-saradc
+      - enum:
+          - rockchip,saradc
+          - rockchip,rk3066-tsadc
+          - rockchip,rk3399-saradc
+          - rockchip,rk3528-saradc
+          - rockchip,rk3562-saradc
+          - rockchip,rk3588-saradc
       - items:
           - const: rockchip,rk3506-saradc
           - const: rockchip,rk3528-saradc
-      - const: rockchip,rk3562-saradc
-      - const: rockchip,rk3588-saradc
       - items:
           - enum:
               - rockchip,rk3576-saradc
-- 
2.47.3


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

* [PATCH v2 3/3] dt-bindings: iio: adc: rockchip-saradc: Fix RV1106 compatible
  2026-08-23 12:20 [PATCH v2 0/3] Fix RV1106 SAR-ADC support Vladislav Leonov
  2026-08-23 12:20 ` [PATCH v2 2/3] dt-bindings: iio: adc: rockchip-saradc: Group single-entries into an enum list Vladislav Leonov
@ 2026-08-23 12:20 ` Vladislav Leonov
  2026-08-24 16:38   ` Conor Dooley
  2026-08-31  1:55 ` [PATCH v2 0/3] Fix RV1106 SAR-ADC support Jonathan Cameron
  2 siblings, 1 reply; 8+ messages in thread
From: Vladislav Leonov @ 2026-08-23 12:20 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Vladislav Leonov, David Lechner, Nuno Sá, Andy Shevchenko,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Joshua Crofts, Simon Glass, linux-iio, devicetree,
	linux-arm-kernel, linux-rockchip, linux-kernel

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")
Suggested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Vladislav Leonov <vlad@zlab.su>
---

Changes in v2:
- Added missing Suggested-by tag.
- rockchip,rv1106-saradc compatible moved from the single-entry to enum list.

v1 https://lore.kernel.org/all/20260816113636.33635-1-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 78ec9a33da24..0cce357cb01d 100644
--- a/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.yaml
@@ -19,13 +19,12 @@ properties:
           - rockchip,rk3528-saradc
           - rockchip,rk3562-saradc
           - rockchip,rk3588-saradc
+          - rockchip,rv1106-saradc
       - items:
           - const: rockchip,rk3506-saradc
           - const: rockchip,rk3528-saradc
       - items:
-          - enum:
-              - rockchip,rk3576-saradc
-              - rockchip,rv1106-saradc
+          - const: rockchip,rk3576-saradc
           - const: rockchip,rk3588-saradc
       - items:
           - enum:
-- 
2.47.3


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

* Re: [PATCH v2 3/3] dt-bindings: iio: adc: rockchip-saradc: Fix RV1106 compatible
  2026-08-23 12:20 ` [PATCH v2 3/3] dt-bindings: iio: adc: rockchip-saradc: Fix RV1106 compatible Vladislav Leonov
@ 2026-08-24 16:38   ` Conor Dooley
  0 siblings, 0 replies; 8+ messages in thread
From: Conor Dooley @ 2026-08-24 16:38 UTC (permalink / raw)
  To: Vladislav Leonov
  Cc: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Joshua Crofts, Simon Glass, linux-iio, devicetree,
	linux-arm-kernel, linux-rockchip, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 75 bytes --]

Acked-by: Conor Dooley <conor.dooley@microchip.com>
pw-bot: not-applicable

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH v2 2/3] dt-bindings: iio: adc: rockchip-saradc: Group single-entries into an enum list
  2026-08-23 12:20 ` [PATCH v2 2/3] dt-bindings: iio: adc: rockchip-saradc: Group single-entries into an enum list Vladislav Leonov
@ 2026-08-24 16:38   ` Conor Dooley
  0 siblings, 0 replies; 8+ messages in thread
From: Conor Dooley @ 2026-08-24 16:38 UTC (permalink / raw)
  To: Vladislav Leonov
  Cc: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Joshua Crofts, Simon Glass, linux-iio, devicetree,
	linux-arm-kernel, linux-rockchip, linux-kernel,
	Krzysztof Kozlowski

[-- Attachment #1: Type: text/plain, Size: 75 bytes --]

Acked-by: Conor Dooley <conor.dooley@microchip.com>
pw-bot: not-applicable

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH v2 0/3] Fix RV1106 SAR-ADC support
  2026-08-23 12:20 [PATCH v2 0/3] Fix RV1106 SAR-ADC support Vladislav Leonov
  2026-08-23 12:20 ` [PATCH v2 2/3] dt-bindings: iio: adc: rockchip-saradc: Group single-entries into an enum list Vladislav Leonov
  2026-08-23 12:20 ` [PATCH v2 3/3] dt-bindings: iio: adc: rockchip-saradc: Fix RV1106 compatible Vladislav Leonov
@ 2026-08-31  1:55 ` Jonathan Cameron
  2026-08-31  8:17   ` Heiko Stübner
  2 siblings, 1 reply; 8+ messages in thread
From: Jonathan Cameron @ 2026-08-31  1:55 UTC (permalink / raw)
  To: Vladislav Leonov
  Cc: David Lechner, Nuno Sá, Andy Shevchenko, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Joshua Crofts,
	Simon Glass, linux-iio, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel

On Sun, 23 Aug 2026 15:20:31 +0300
Vladislav Leonov <vlad@zlab.su> wrote:

> This series fixes the support for the RV1106 SAR-ADC in the
> rockchip_saradc driver and its device tree bindings.

I debated how to apply this.  Technically patch 3 is a fix, 2 is an enabler
and 1 is also a fix, but one for something that we just effectively patched
out from running in patch 3.

So in the end I'm thinking take this the slow path for next cycle.  Shout
if anyone thinks this should go in during the -RCs and whether all 3
should do so or just patches 2 and 3 (leaving us without driver support for
now).

Applied to the testing branch of iio.git

Thanks,

Jonathan

> 
> Changes in v2:
> - Combined the driver patch and the dt-binding fix into a series, as
>   requested by Jonathan.
> - Introduced a new patch (2/3) to group single-entries into an enum list,
>   as suggested by Krzysztof.
> - Added missing Suggested-by tag to the patch 3/3
> - rockchip,rv1106-saradc compatible moved from the
>   single-entry to enum list in the patch 3/3
> 
> Vladislav Leonov (3):
>   iio: adc: rockchip_saradc: Add support for RV1106
>   dt-bindings: iio: adc: rockchip-saradc: Group single-entries into an
>     enum list
>   dt-bindings: iio: adc: rockchip-saradc: Fix RV1106 compatible
> 
>  .../bindings/iio/adc/rockchip-saradc.yaml      | 18 +++++++++---------
>  drivers/iio/adc/rockchip_saradc.c              | 16 ++++++++++++++++
>  2 files changed, 25 insertions(+), 9 deletions(-)
> 


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

* Re: [PATCH v2 0/3] Fix RV1106 SAR-ADC support
  2026-08-31  1:55 ` [PATCH v2 0/3] Fix RV1106 SAR-ADC support Jonathan Cameron
@ 2026-08-31  8:17   ` Heiko Stübner
  2026-09-01  1:18     ` Jonathan Cameron
  0 siblings, 1 reply; 8+ messages in thread
From: Heiko Stübner @ 2026-08-31  8:17 UTC (permalink / raw)
  To: Vladislav Leonov, Jonathan Cameron
  Cc: David Lechner, Nuno Sá, Andy Shevchenko, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Joshua Crofts, Simon Glass,
	linux-iio, devicetree, linux-arm-kernel, linux-rockchip,
	linux-kernel

Hi Jonathan,

Am Montag, 31. August 2026, 03:55:57 Mitteleuropäische Sommerzeit schrieb Jonathan Cameron:
> On Sun, 23 Aug 2026 15:20:31 +0300
> Vladislav Leonov <vlad@zlab.su> wrote:
> 
> > This series fixes the support for the RV1106 SAR-ADC in the
> > rockchip_saradc driver and its device tree bindings.
> 
> I debated how to apply this.  Technically patch 3 is a fix, 2 is an enabler
> and 1 is also a fix, but one for something that we just effectively patched
> out from running in patch 3.
> 
> So in the end I'm thinking take this the slow path for next cycle.  Shout
> if anyone thinks this should go in during the -RCs and whether all 3
> should do so or just patches 2 and 3 (leaving us without driver support for
> now).
> 
> Applied to the testing branch of iio.git

I guess I should shout then ;-) .

DT-Binding patches are sort of independent of the driver change and
are considered API which should not change after the fact.

Our DTs (but also ones possibly contained in firmware somewhere) are
validated against the binding and it seems the correct compartible goes
from 
    "rockchip,rv1106-saradc", " rockchip,rk3588-saradc"
to
    "rockchip,rv1106-saradc"

As the fixed commit is part of 7.3-rc1, I guess it would be nice to
have patches 2+3 in 7.3 and patch 1 can wait for 7.4 .

We don't need the driver support (dt-nodes just doesn't bind to
anything), but it would be nice to not proliferate the wrong binding in
an actual release.


my 2ct :-)
Heiko




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

* Re: [PATCH v2 0/3] Fix RV1106 SAR-ADC support
  2026-08-31  8:17   ` Heiko Stübner
@ 2026-09-01  1:18     ` Jonathan Cameron
  0 siblings, 0 replies; 8+ messages in thread
From: Jonathan Cameron @ 2026-09-01  1:18 UTC (permalink / raw)
  To: Heiko Stübner
  Cc: Vladislav Leonov, David Lechner, Nuno Sá, Andy Shevchenko,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Joshua Crofts,
	Simon Glass, linux-iio, devicetree, linux-arm-kernel,
	linux-rockchip, linux-kernel

On Mon, 31 Aug 2026 10:17:17 +0200
Heiko Stübner <heiko@sntech.de> wrote:

> Hi Jonathan,
> 
> Am Montag, 31. August 2026, 03:55:57 Mitteleuropäische Sommerzeit schrieb Jonathan Cameron:
> > On Sun, 23 Aug 2026 15:20:31 +0300
> > Vladislav Leonov <vlad@zlab.su> wrote:
> >   
> > > This series fixes the support for the RV1106 SAR-ADC in the
> > > rockchip_saradc driver and its device tree bindings.  
> > 
> > I debated how to apply this.  Technically patch 3 is a fix, 2 is an enabler
> > and 1 is also a fix, but one for something that we just effectively patched
> > out from running in patch 3.
> > 
> > So in the end I'm thinking take this the slow path for next cycle.  Shout
> > if anyone thinks this should go in during the -RCs and whether all 3
> > should do so or just patches 2 and 3 (leaving us without driver support for
> > now).
> > 
> > Applied to the testing branch of iio.git  
> 
> I guess I should shout then ;-) .
> 
> DT-Binding patches are sort of independent of the driver change and
> are considered API which should not change after the fact.
> 
> Our DTs (but also ones possibly contained in firmware somewhere) are
> validated against the binding and it seems the correct compartible goes
> from 
>     "rockchip,rv1106-saradc", " rockchip,rk3588-saradc"
> to
>     "rockchip,rv1106-saradc"
> 
> As the fixed commit is part of 7.3-rc1, I guess it would be nice to
> have patches 2+3 in 7.3 and patch 1 can wait for 7.4 .
> 
> We don't need the driver support (dt-nodes just doesn't bind to
> anything), but it would be nice to not proliferate the wrong binding in
> an actual release.

Ah. I should have checked when the original bug went in.
As it's this current cycle, what you say is indeed an easy fix.

Applied 2-3 to the fixes-togreg branch and left 1 in the testing
branch for 7.4.

Thanks

Jonathan

> 
> 
> my 2ct :-)
> Heiko
> 
> 
> 


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

end of thread, other threads:[~2026-09-01  1:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-23 12:20 [PATCH v2 0/3] Fix RV1106 SAR-ADC support Vladislav Leonov
2026-08-23 12:20 ` [PATCH v2 2/3] dt-bindings: iio: adc: rockchip-saradc: Group single-entries into an enum list Vladislav Leonov
2026-08-24 16:38   ` Conor Dooley
2026-08-23 12:20 ` [PATCH v2 3/3] dt-bindings: iio: adc: rockchip-saradc: Fix RV1106 compatible Vladislav Leonov
2026-08-24 16:38   ` Conor Dooley
2026-08-31  1:55 ` [PATCH v2 0/3] Fix RV1106 SAR-ADC support Jonathan Cameron
2026-08-31  8:17   ` Heiko Stübner
2026-09-01  1:18     ` Jonathan Cameron

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