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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 16 Jan 2024 12:00:39 -0600
From: Rob Herring <robh@...nel.org>
To: Michal Simek <michal.simek@....com>
Cc: linux-kernel@...r.kernel.org, monstr@...str.eu, michal.simek@...inx.com,
	git@...inx.com, Conor Dooley <conor+dt@...nel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" <devicetree@...r.kernel.org>,
	"moderated list:ARM/ZYNQ ARCHITECTURE" <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v2] dt-bindings: soc: xilinx: Add support for K26 rev2
 SOMs

On Fri, Jan 12, 2024 at 10:20:29AM +0100, Michal Simek wrote:
> Revision 2 is SW compatible with revision 1 but it is necessary to reflect
> it in model and compatible properties which are parsed by user space.
> Rev 2 has improved a power on boot reset and MIO34 shutdown glich
> improvement done via an additional filter in the GreenPak chip.
> 
> Signed-off-by: Michal Simek <michal.simek@....com>
> ---
> 
> Changes in v2:
> - Support older combinations
> 
> I want to support all versions we created:
> All of them:
> -rev2, -rev1, -revB, -revA, "xlnx,zynqmp-smk-k26", "xlnx,zynqmp"
> 
> rev1:
> -rev1, -revB, -revA, "xlnx,zynqmp-smk-k26", "xlnx,zynqmp"
> 
> revB:
> -revB, -revA, "xlnx,zynqmp-smk-k26", "xlnx,zynqmp"
> 
> revA:
> -revA, "xlnx,zynqmp-smk-k26", "xlnx,zynqmp"
> 
> And also single one are permitted:
> -revB, "xlnx,zynqmp-smk-k26", "xlnx,zynqmp"
> -rev1, "xlnx,zynqmp-smk-k26", "xlnx,zynqmp"
> -rev2, "xlnx,zynqmp-smk-k26", "xlnx,zynqmp"
> 
> I didn't find a way to pretty much all the time force that there must be
> both "xlnx,zynqmp-smk-k26", "xlnx,zynqmp" that's why there is only
> requested to have xlnx,zynqmp. If you find a way how to encode it please
> let me know.
> 
> ---
>  .../bindings/soc/xilinx/xilinx.yaml           | 32 +++++++++++++------
>  1 file changed, 22 insertions(+), 10 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/soc/xilinx/xilinx.yaml b/Documentation/devicetree/bindings/soc/xilinx/xilinx.yaml
> index d4c0fe1fe435..39242efeec47 100644
> --- a/Documentation/devicetree/bindings/soc/xilinx/xilinx.yaml
> +++ b/Documentation/devicetree/bindings/soc/xilinx/xilinx.yaml
> @@ -117,20 +117,32 @@ properties:
>            - const: xlnx,zynqmp
>  
>        - description: Xilinx Kria SOMs
> +        additionalItems: true
> +        maxItems: 6
> +        minItems: 3
>          items:
> -          - const: xlnx,zynqmp-sm-k26-rev1
> -          - const: xlnx,zynqmp-sm-k26-revB
> -          - const: xlnx,zynqmp-sm-k26-revA
> -          - const: xlnx,zynqmp-sm-k26
> -          - const: xlnx,zynqmp
> +          - enum:
> +              - xlnx,zynqmp-sm-k26-rev2
> +              - xlnx,zynqmp-sm-k26-rev1
> +              - xlnx,zynqmp-sm-k26-revB
> +              - xlnx,zynqmp-sm-k26-revA
> +              - xlnx,zynqmp-sm-k26
> +        contains:
> +          const: xlnx,zynqmp

This allows:

xlnx,zynqmp-sm-k26-rev2, foo, xlnx,zynqmp, bar

You need the schema form of 'items' (no '-'). For multiple contains, you 
need 'allOf'. Like this:

items:
  enum: [ all of them ]
allOf:
  - contains:
      const: xlnx,zynqmp
  - contains:
      const: xlnx,zynqmp-sm-k26


This of course has no enforcement of the order. Just no sane way to do 
that in json-schema.

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ