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

From: zl020895

Date: Fri Sep 18 2026 - 04:35:34 EST


Hi Krzysztof,

Thanks for the review, will fix the commit message and YAML order in v8.

The AMBA core matches the PL061 driver by PrimeCell ID, not by the DT compatible string. These banks do not implement the standard PL061 ID (0x00041061), so arm,primecell-periphid must be set; 0x000e8061 is the ID the driver uses for the Ambarella layout.

They sit on the PrimeCell bus but are not register-compatible with arm,pl061 (32-bit, 32 lines, extra mask/enable), so arm,pl061 is not a fallback. I will spell that out in the commit message.

allOf will move after the required: block.

Best regards,
Long Zhao

At 2026-09-18 15:15:21, "Krzysztof Kozlowski" <krzk@xxxxxxxxxx> wrote:
>On Tue, Sep 15, 2026 at 07:15:35PM +0800, Long Zhao wrote:
>> Add ambarella,cv75-gpio as a PrimeCell-compatible PL061 variant, with
>> arm,primecell-periphid and gpio-ranges required. Reference
>
>You just described the diff, but this should explain why you do these
>changes. Why a fixed periphid is needed? Isn't it implied by compatible?
>
>> primecell.yaml and use unevaluatedProperties.
>>
>> Signed-off-by: Long Zhao <longzhao@xxxxxxxxxxxxx>
>> ---
>> .../devicetree/bindings/gpio/pl061-gpio.yaml | 25 +++++++++++++++++++---
>> 1 file changed, 22 insertions(+), 3 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/gpio/pl061-gpio.yaml b/Documentation/devicetree/bindings/gpio/pl061-gpio.yaml
>> index 4d970e55104b..00d0d8ddd2c9 100644
>> --- a/Documentation/devicetree/bindings/gpio/pl061-gpio.yaml
>> +++ b/Documentation/devicetree/bindings/gpio/pl061-gpio.yaml
>> @@ -15,17 +15,36 @@ select:
>> properties:
>> compatible:
>> contains:
>> - const: arm,pl061
>> + enum:
>> + - arm,pl061
>> + - ambarella,cv75-gpio
>> required:
>> - compatible
>>
>> +allOf:
>
>allOf should be placed after "required:" block.
>
>> + - $ref: /schemas/arm/primecell.yaml#
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + const: ambarella,cv75-gpio
>> + then:
>> + properties:
>> + arm,primecell-periphid:
>> + const: 0x000e8061
>> + required:
>> + - arm,primecell-periphid
>> + - gpio-ranges
>> +
>> properties:
>> $nodename:
>> pattern: "^gpio@[0-9a-f]+$"
>>
>> compatible:
>> items:
>> - - const: arm,pl061
>> + - enum:
>> + - ambarella,cv75-gpio
>> + - arm,pl061
>
>So a PrimeCell-compatible PL061 variant which is not compatible with
>PL061? You have entire commit msg to explain that and say something
>non-obvious about the hardware.
>
>> - const: arm,primecell
>>
>
>Best regards,
>Krzysztof