Re: [PATCH v5 05/12] dt-bindings: gpio: pl061: add Ambarella CV75 variant

[email protected]
Newsgroups dev.linux.lists.mfd,org.kernel.vger.linux-clk,org.kernel.vger.linux-devicetree
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The required `arm,primecell-periphid` value of `0x00000061` for the `ambarella,cv75-gpio` variant conflicts with the ID required by the `gpio-pl061` driver, preventing probing.
--

--- Patch [5]: [PATCH v5 05/12] dt-bindings: gpio: pl061: add Ambarella CV75 variant ---
commit 788e96b7a4c4ea1764ff5dc908fde736c8cb17ba
Author: Long Zhao <[email protected]>

dt-bindings: gpio: pl061: add Ambarella CV75 variant

This commit documents the Ambarella CV75 GPIO bank compatible for the
PL061 binding. It adds a requirement for a synthetic arm,primecell-periphid
override because the hardware lacks a discoverable ID.

> diff --git a/Documentation/devicetree/bindings/gpio/pl061-gpio.yaml b/Documentation/devicetree/bindings/gpio/pl061-gpio.yaml
> --- a/Documentation/devicetree/bindings/gpio/pl061-gpio.yaml
> +++ b/Documentation/devicetree/bindings/gpio/pl061-gpio.yaml
[ ... ]
> @@ -57,6 +70,20 @@ properties:
>      minItems: 1
>      maxItems: 8
>  
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: ambarella,cv75-gpio
> +    then:
> +      properties:
> +        arm,primecell-periphid:
> +          const: 0x00000061

[Severity: High]
Will this synthetic ID value prevent the gpio-pl061 driver from probing?

During device initialization, the amba bus subsystem reads the
arm,primecell-periphid property from the device tree and attempts to match
it against registered drivers. The gpio-pl061 driver expects an amba
ID of 0x00041061 with a mask of 0x000fffff.

Since 0x00000061 masked with 0x000fffff does not equal 0x00041061, the match
will fail and the driver will not bind to the device on Ambarella CV75
platforms.

Should this value be 0x00041061 to match the driver's expected ID table?

> +      required:
> +        - arm,primecell-periphid
> +        - gpio-ranges
>
>  required:
>    - compatible
>    - reg

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=5
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.