[PATCH v2 1/4] spi: dt-bindings: amlogic: spisg: Document A9-specific properties

sashiko-bot at kernel.org sashiko-bot at kernel.org
Wed Jul 22 23:51:44 PDT 2026


Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Setting `default` values on properties that are conditionally forbidden (`false`) causes device tree schema validation to fail on valid older nodes.
--

--- Patch [1]: [PATCH v2 1/4] spi: dt-bindings: amlogic: spisg: Document A9-specific properties ---
commit 5cdfe189c3095f9606a5c72f8f2856e0d4d26388
Author: Xianwei Zhao <xianwei.zhao at amlogic.com>

spi: dt-bindings: amlogic: spisg: Document A9-specific properties

This commit documents the Amlogic A9 SPISG controller and adds the
"amlogic,a9-spisg" compatible string. It also defines the A9-specific
"amlogic,mo-idle-output" and "amlogic,word-gap" properties.

> diff --git a/Documentation/devicetree/bindings/spi/amlogic,a4-spisg.yaml b/Documentation/devicetree/bindings/spi/amlogic,a4-spisg.yaml
> index 9bfb8089f7ea2..ddef92f3f3b66 100644
> --- a/Documentation/devicetree/bindings/spi/amlogic,a4-spisg.yaml
> +++ b/Documentation/devicetree/bindings/spi/amlogic,a4-spisg.yaml
[ ... ]
> @@ -35,6 +34,23 @@ properties:
>    resets:
>      maxItems: 1
>  
> +  amlogic,mo-idle-output:
[ ... ]
> +    enum: [0, 1, 2]
> +    default: 0
> +
> +  amlogic,word-gap:
[ ... ]
> +    enum: [0, 1, 2, 3]
> +    default: 1
> +
[ ... ]
> +allOf:
> +  - $ref: spi-controller.yaml#
> +  - if:
> +      not:
> +        properties:
> +          compatible:
> +            contains:
> +              enum:
> +                - amlogic,a9-spisg
> +    then:
> +      properties:
> +        amlogic,mo-idle-output: false
> +        amlogic,word-gap: false

[Severity: Medium]
Does setting a default value on properties that are conditionally forbidden
cause device tree schema validation to fail on valid older nodes?

The dtschema validation tool injects top-level default properties into a
parsed node before evaluating allOf blocks. For the amlogic,a4-spisg
compatible, it will inject the defaults (0 and 1) for the missing
properties. 

Then the allOf block will enforce the false schema constraint. Since the
properties were injected, the schema evaluates to false, causing validation
errors for any existing or example a4-spisg node.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260723-a9-spisg-v2-0-9fc39106b7e2@amlogic.com?part=1



More information about the linux-amlogic mailing list