Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Patrice Chotard" <patrice.chotard@foss.st.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v6 02/10] dt-bindings: arm: stm32: allow TAMP nvram child node for syscon
Date: Tue, 24 Nov 2026 16:55:26 +0000	[thread overview]
Message-ID: <sashiko-outbox-231620@kernel.org> (raw)
In-Reply-To: <20261124-upstream_nvram_reworked-v6-2-ea0cfccc20b0@foss.st.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] dt-bindings: arm: stm32: requiring address/size cells breaks
  childless tamp
--

commit ecaee20f976bb2eae8b98a614ee17d74f8f0700e
Author: Patrice Chotard <patrice.chotard@foss.st.com>

dt-bindings: arm: stm32: allow TAMP nvram child node for syscon

This commit updates the st,stm32-syscon binding to allow #address-cells,
#size-cells, ranges, and an nvram child node on st,stm32-tamp nodes.

> diff --git a/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml b/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml
> index a559f8b03b842..70266070c57ba 100644
> --- a/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml
> +++ b/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml

[ ... ]

> @@ -76,6 +82,9 @@ allOf:
>                - st,stm32mp23-syscfg
>                - st,stm32mp25-syscfg
>      then:
> +      properties:
> +        "#size-cells":
> +          const: 1
>        required:
>          - "#address-cells"
>          - "#clock-cells"
> @@ -84,11 +93,39 @@ allOf:
>          - phy@2800
>      else:
>        properties:
> -        '#address-cells': false
>          '#clock-cells': false
> -        '#size-cells': false
>          phy@2400: false
>          phy@2800: false
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: st,stm32-tamp
> +    then:
> +      properties:
> +        "#size-cells":
> +          enum: [1, 2]
> +    else:
> +      properties:
> +        ranges: false
> +      patternProperties:
> +        "^nvram@[0-9a-f]+$": false
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - st,stm32-tamp
> +              - st,stm32mp23-syscfg
> +              - st,stm32mp25-syscfg
> +    then:
> +      required:
> +        - "#address-cells"
> +        - "#size-cells"
> +    else:
> +      properties:
> +        '#address-cells': false
> +        '#size-cells': false
>  
>  additionalProperties: false
>  

[Severity: Medium]
As reported by Krzysztof Kozlowski on v4 [1], does requiring
#address-cells and #size-cells for st,stm32-tamp break validation for
childless TAMP nodes?

The nvram child node is optional and the schema also permits
st,stm32-tamp with only syscon (without simple-mfd or subnodes), so
existing device trees with a childless tamp node (such as tamp@5c00a000
in arch/arm/boot/dts/st/stm32mp151.dtsi) fail dtbs_check when these
properties are required unconditionally.  Since st,stm32mp23-syscfg and
st,stm32mp25-syscfg already require #address-cells and #size-cells in
their own if/then block above, dropping this then branch while keeping
the else branch allows the properties on st,stm32-tamp without making
them mandatory.  Also, the then branch in the st,stm32-tamp block above
repeats the top-level #size-cells enum: [1, 2] definition.

[1] https://lore.kernel.org/r/20261106-tireless-cobra-of-passion-1fca1d@quoll

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261124-upstream_nvram_reworked-v6-0-ea0cfccc20b0@foss.st.com?part=2

  reply	other threads:[~2026-11-24 16:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 16:47 [PATCH v6 00/10] Add STM32 TAMP nvram driver support Patrice Chotard
2026-11-24 16:47 ` [PATCH v6 01/10] dt-bindings: nvmem: add STM32MPX TAMP backup registers Patrice Chotard
2026-11-24 16:47 ` [PATCH v6 02/10] dt-bindings: arm: stm32: allow TAMP nvram child node for syscon Patrice Chotard
2026-11-24 16:55   ` sashiko-bot [this message]
2026-11-24 16:47 ` [PATCH v6 03/10] nvmem: stm32: add TAMP nvmem driver Patrice Chotard
2026-11-24 17:05   ` sashiko-bot
2026-11-24 16:47 ` [PATCH v6 04/10] ARM: dts: stm32: add TAMP backup register in stm32mp131.dtsi Patrice Chotard
2026-11-24 16:47 ` [PATCH v6 05/10] ARM: dts: stm32: add TAMP backup register in stm32mp151.dtsi Patrice Chotard
2026-11-24 16:47 ` [PATCH v6 06/10] arm64: dts: st: add TAMP backup register in stm32mp211.dtsi Patrice Chotard
2026-11-24 16:47 ` [PATCH v6 07/10] arm64: dts: st: add TAMP backup register in stm32mp231.dtsi Patrice Chotard
2026-11-24 16:47 ` [PATCH v6 08/10] arm64: dts: st: add TAMP backup register in stm32mp251.dtsi Patrice Chotard
2026-11-24 16:47 ` [PATCH v6 09/10] ARM: multi_v7_defconfig: Enable NVMEM_STM32_TAMP Patrice Chotard
2026-11-24 16:47 ` [PATCH v6 10/10] ARM: arm64: defconfig: " Patrice Chotard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-231620@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=patrice.chotard@foss.st.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox