Re: [PATCH v3 0/3] iio: adc: aspeed: Fix SCU lookup for multi-SCU AST2700
From: Jonathan Cameron
Date: Sun Oct 18 2026 - 18:56:36 EST
On Mon, 5 Oct 2026 18:22:52 +0800
Billy Tsai <billy_tsai@xxxxxxxxxxxxxx> wrote:
> 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.
For now I've applied 1 and 2 to the testing branch of iio.git.
Whilst it is a fix, there is little point in rushing it unless
patch 3 also goes and that one isn't tagged as a fix..
If you want me to move it over to the fixes-togreg branch and
get it in asap, then reply to this to say so.
Thanks,
Jonathan
>
> 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: LLM
> Signed-off-by: Billy Tsai <billy_tsai@xxxxxxxxxxxxxx>
> ---
> Changes in v3:
> - Switch the LLM attribution trailer to "Assisted-by: LLM", the format
> required by Documentation/process/coding-assistants.rst, instead of
> naming the specific tool/model
> - Move each patch's Signed-off-by to be the last trailer, after
> Assisted-by
> - In patch 2, use dev_of_node() instead of dereferencing
> data->dev->of_node, and check the new property with
> of_property_present() before calling the non-optional
> syscon_regmap_lookup_by_phandle()
> - Link to v2: https://lore.kernel.org/r/20261001-ast27xx-adc-upstream-v2-0-2f9c15cc0064@xxxxxxxxxxxxxx
>
> 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@xxxxxxxxxxxxxx
>
> ---
> 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 | 25 ++++++++++++++++------
> 3 files changed, 37 insertions(+), 7 deletions(-)
> ---
> base-commit: a3b3580713f3ac5a32dc2874ee546828977a1d68
> change-id: 20261001-ast27xx-adc-upstream-34b3d9e8e27b
>
> Best regards,