mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/3] iio: adc: aspeed: Fix SCU lookup for multi-SCU AST2700
@ 2026-10-01  9:50 Billy Tsai
  2026-10-01  9:50 ` [PATCH v2 1/3] dt-bindings: iio: adc: Add syscon property for multi-SCU SoCs Billy Tsai
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Billy Tsai @ 2026-10-01  9:50 UTC (permalink / raw)
  To: Jonathan Cameron, David Lechner, Nuno Sá,
	Andy Shevchenko, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Joel Stanley, Andrew Jeffery, Ryan Chen
  Cc: linux-iio, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel, Billy Tsai, Jonathan Cameron

The ADC's reference-voltage trimming data lives in a SCU register. The
driver has always located that SCU with a global, name-based
device-tree search, which works as long as a platform only has a
single node named "syscon". AST2700 splits its SCU into two
instances, syscon0 and syscon1, that share that same node name and
differ only by label and unit address, so the lookup always resolves
to syscon0 even when the ADC's trimming data lives in syscon1.

This series adds an explicit "aspeed,trim-syscon" phandle property so multi-SCU
platforms can point the ADC at the right SCU, keeps the existing
global lookup as a fallback for single-SCU platforms and already
deployed device trees, and wires the new property up on AST2700.

Patch summary:
1. dt-bindings: iio: adc: Add syscon property for multi-SCU SoCs
2. iio: adc: aspeed: Use syscon phandle for trimming data when available
3. arm64: dts: aspeed: Add syscon phandle to AST2700 ADC nodes

Assisted-by: Claude:claude-sonnet-5
Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
---
Changes in v2:
- Rename the new property to "aspeed,trim-syscon": a bare "syscon" is
  not a generic property per writing-bindings.rst, so follow its
  vendor,type-syscon convention
- Reword the property's description to state its purpose instead of
  restating the schema's required condition in prose
- Drop the extra AST2700 example added for the one new property
- Link to v1: https://lore.kernel.org/r/20261001-ast27xx-adc-upstream-v1-0-5ace57533418@aspeedtech.com

---
Billy Tsai (3):
      dt-bindings: iio: adc: Add syscon property for multi-SCU SoCs
      iio: adc: aspeed: Use syscon phandle for trimming data when available
      arm64: dts: aspeed: Add syscon phandle to AST2700 ADC nodes

 .../bindings/iio/adc/aspeed,ast2600-adc.yaml         | 17 +++++++++++++++++
 arch/arm64/boot/dts/aspeed/aspeed-g7-soc1.dtsi       |  2 ++
 drivers/iio/adc/aspeed_adc.c                         | 20 ++++++++++++++------
 3 files changed, 33 insertions(+), 6 deletions(-)
---
base-commit: a3b3580713f3ac5a32dc2874ee546828977a1d68
change-id: 20261001-ast27xx-adc-upstream-34b3d9e8e27b

Best regards,
-- 
Billy Tsai <billy_tsai@aspeedtech.com>


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

end of thread, other threads:[~2026-10-02  9:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-01  9:50 [PATCH v2 0/3] iio: adc: aspeed: Fix SCU lookup for multi-SCU AST2700 Billy Tsai
2026-10-01  9:50 ` [PATCH v2 1/3] dt-bindings: iio: adc: Add syscon property for multi-SCU SoCs Billy Tsai
2026-10-02  9:03   ` Krzysztof Kozlowski
2026-10-02  9:15     ` Joshua Crofts
2026-10-01  9:50 ` [PATCH v2 2/3] iio: adc: aspeed: Use syscon phandle for trimming data when available Billy Tsai
2026-10-02  8:34   ` Andy Shevchenko
2026-10-01  9:50 ` [PATCH v2 3/3] arm64: dts: aspeed: Add syscon phandle to AST2700 ADC nodes Billy Tsai
2026-10-02  9:23 ` [PATCH v2 0/3] iio: adc: aspeed: Fix SCU lookup for multi-SCU AST2700 Andy Shevchenko

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®