lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4dd4fade-1ea4-48aa-bc89-4299c70bdb86@kernel.org>
Date: Fri, 10 Jan 2025 15:07:47 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: ao.xu@...ogic.com, Neil Armstrong <neil.armstrong@...aro.org>,
 Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
 Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
 David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
 Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
 Conor Dooley <conor+dt@...nel.org>, Kevin Hilman <khilman@...libre.com>,
 Jerome Brunet <jbrunet@...libre.com>,
 Martin Blumenstingl <martin.blumenstingl@...glemail.com>
Cc: dri-devel@...ts.freedesktop.org, linux-amlogic@...ts.infradead.org,
 devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH 02/11] dt-bindings: display: meson-vpu: Add compatible for
 S4 display controller

On 10/01/2025 06:39, Ao Xu via B4 Relay wrote:
> From: Ao Xu <ao.xu@...ogic.com>
> 
> Add devicetree document for S4 VPU
> 
> Signed-off-by: Ao Xu <ao.xu@...ogic.com>
> ---
>  .../bindings/display/amlogic,meson-vpu.yaml        | 48 ++++++++++++++++++++--
>  1 file changed, 44 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/display/amlogic,meson-vpu.yaml b/Documentation/devicetree/bindings/display/amlogic,meson-vpu.yaml
> index cb0a90f0232190031430c08f936b8f0d3b217601..3d7eceb3724e81d9c911039507df072d332a028f 100644
> --- a/Documentation/devicetree/bindings/display/amlogic,meson-vpu.yaml
> +++ b/Documentation/devicetree/bindings/display/amlogic,meson-vpu.yaml
> @@ -66,14 +66,13 @@ properties:
>            - const: amlogic,meson-gx-vpu
>        - enum:
>            - amlogic,meson-g12a-vpu # G12A (S905X2, S905Y2, S905D2)
> +          - amlogic,meson-s4-vpu # S4 (S905Y4)
>  
>    reg:
> -    maxItems: 2
> +    minItems: 2

Missing maxItems

>  
>    reg-names:
> -    items:
> -      - const: vpu
> -      - const: hhi
> +    minItems: 2

Just grow the list here with minItems

>  
>    interrupts:
>      maxItems: 1
> @@ -117,6 +116,47 @@ required:
>    - "#size-cells"
>    - amlogic,canvas
>  
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: amlogic,meson-s4-vpu
> +    then:
> +      properties:
> +        reg:
> +          items:
> +            - description: vcbus registers
> +            - description: hhi registers
> +            - description: clkctrl registers
> +            - description: power control registers
> +            - description: sysctrl registers
> +        reg-names:
> +          items:
> +            - const: vpu
> +            - const: hhi
> +            - const: clkctrl
> +            - const: pwctrl
> +            - const: sysctrl

and here min/maxItems

> +        clocks:
> +          items:
> +            - description: vpu clock
> +            - description: vapb clock
> +        clock-names:
> +          items:
> +            - const: vpu
> +            - const: vapb

All properties must be defined in top-level. Just disallow it :false for
other variants.

> +    else:
> +      properties:
> +        reg:
> +          items:
> +            - description: vcbus registers
> +            - description: hhi registers
> +        reg-names:
> +          items:
> +            - const: vpu
> +            - const: hhi

maxItems: 2


Look how other bindings are doing it for lists with common parts.

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ