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] [day] [month] [year] [list]
Message-ID: <20251113-risk-doorstop-4ec156b58d0a@spud>
Date: Thu, 13 Nov 2025 19:16:18 +0000
From: Conor Dooley <conor@...nel.org>
To: "Pandey, Radhey Shyam" <radhey.shyam.pandey@....com>
Cc: "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"robh@...nel.org" <robh@...nel.org>,
	"krzk+dt@...nel.org" <krzk+dt@...nel.org>,
	"conor+dt@...nel.org" <conor+dt@...nel.org>,
	"Simek, Michal" <michal.simek@....com>,
	"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"git (AMD-Xilinx)" <git@....com>
Subject: Re: [PATCH] dt-bindings: usb: dwc3-xilinx: Describe the reset
 constraint for the versal platform

On Thu, Nov 13, 2025 at 12:15:02PM +0000, Pandey, Radhey Shyam wrote:
> [Public]
> 
> > -----Original Message-----
> > From: Conor Dooley <conor@...nel.org>
> > Sent: Thursday, November 13, 2025 12:38 AM
> > To: Pandey, Radhey Shyam <radhey.shyam.pandey@....com>
> > Cc: gregkh@...uxfoundation.org; robh@...nel.org; krzk+dt@...nel.org;
> > conor+dt@...nel.org; Simek, Michal <michal.simek@....com>; linux-
> > usb@...r.kernel.org; devicetree@...r.kernel.org; linux-arm-
> > kernel@...ts.infradead.org; linux-kernel@...r.kernel.org; git (AMD-Xilinx)
> > <git@....com>
> > Subject: Re: [PATCH] dt-bindings: usb: dwc3-xilinx: Describe the reset constraint for
> > the versal platform
> >
> > On Wed, Nov 12, 2025 at 09:24:30PM +0530, Radhey Shyam Pandey wrote:
> > > AMD Versal platform USB 2.0 IP controller receives one reset input
> > > from the SoC controlled by the CRL.RST_USB [RESET] register so
> > > accordingly describe reset constraints.
> > >
> > > Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@....com>
> > > ---
> > >  .../devicetree/bindings/usb/dwc3-xilinx.yaml  | 43
> > > +++++++++++++++----
> > >  1 file changed, 34 insertions(+), 9 deletions(-)
> > >
> > > diff --git a/Documentation/devicetree/bindings/usb/dwc3-xilinx.yaml
> > > b/Documentation/devicetree/bindings/usb/dwc3-xilinx.yaml
> > > index 36f5c644d959..cd0cc9da242f 100644
> > > --- a/Documentation/devicetree/bindings/usb/dwc3-xilinx.yaml
> > > +++ b/Documentation/devicetree/bindings/usb/dwc3-xilinx.yaml
> > > @@ -50,17 +50,22 @@ properties:
> > >      description:
> > >        A list of phandles for resets listed in reset-names.
> > >
> > > -    items:
> > > -      - description: USB core reset
> > > -      - description: USB hibernation reset
> > > -      - description: USB APB reset
> > > +    oneOf:
> > > +      - items:
> > > +          - description: USB controller reset
> > > +      - items:
> > > +          - description: USB core reset
> > > +          - description: USB hibernation reset
> > > +          - description: USB APB reset
> > >
> > >    reset-names:
> > > -    items:
> > > -      - const: usb_crst
> > > -      - const: usb_hibrst
> > > -      - const: usb_apbrst
> > > -
> > > +    oneOf:
> > > +      - items:
> > > +          - const: usb_crst
> >
> > Why do we need all this oneOf stuff if both have the same first reset?
> > Can't you just set minItems: 1?
> 
> Thanks. I have now set minItems:1 and defined compatible based
> reset min/max constraints. Doing some more validation and
> will send out the v2.
> 
> Example:
> --- a/Documentation/devicetree/bindings/usb/dwc3-xilinx.yaml
> +++ b/Documentation/devicetree/bindings/usb/dwc3-xilinx.yaml
> @@ -47,6 +47,7 @@ properties:
>        - const: ref_clk
> 
>    resets:
> +    minItems: 1
>      description:
>        A list of phandles for resets listed in reset-names.
> 
> @@ -56,6 +57,7 @@ properties:
>        - description: USB APB reset
> 
>    reset-names:
> +    minItems: 1
>      items:
>        - const: usb_crst
>        - const: usb_hibrst
> @@ -95,6 +97,28 @@ required:
>    - resets
>    - reset-names
> 
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - xlnx,versal-dwc3
> +    then:
> +      properties:
> +        resets:
> +          maxItems: 1
> +        reset-names:
> +          maxItems: 1
> +    else:
> +      properties:
> +        resets:
> +          minItems: 3
> +          maxItems: 3

FWIW, this maxItems is not needed as it matches the number in the list.

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ