* [PATCH] dt-bindings: usb: dwc3-xilinx: Describe the reset constraint for the versal platform @ 2025-11-12 15:54 Radhey Shyam Pandey 2025-11-12 19:07 ` Conor Dooley 0 siblings, 1 reply; 4+ messages in thread From: Radhey Shyam Pandey @ 2025-11-12 15:54 UTC (permalink / raw) To: gregkh, robh, krzk+dt, conor+dt, michal.simek Cc: linux-usb, devicetree, linux-arm-kernel, linux-kernel, git, Radhey Shyam Pandey 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@amd.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 + - items: + - const: usb_crst + - const: usb_hibrst + - const: usb_apbrst phys: minItems: 1 maxItems: 2 @@ -95,6 +100,26 @@ 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 + reset-names: + minItems: 3 + additionalProperties: false examples: base-commit: b179ce312bafcb8c68dc718e015aee79b7939ff0 -- 2.34.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] dt-bindings: usb: dwc3-xilinx: Describe the reset constraint for the versal platform 2025-11-12 15:54 [PATCH] dt-bindings: usb: dwc3-xilinx: Describe the reset constraint for the versal platform Radhey Shyam Pandey @ 2025-11-12 19:07 ` Conor Dooley 2025-11-13 12:15 ` Pandey, Radhey Shyam 0 siblings, 1 reply; 4+ messages in thread From: Conor Dooley @ 2025-11-12 19:07 UTC (permalink / raw) To: Radhey Shyam Pandey Cc: gregkh, robh, krzk+dt, conor+dt, michal.simek, linux-usb, devicetree, linux-arm-kernel, linux-kernel, git [-- Attachment #1: Type: text/plain, Size: 2372 bytes --] 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@amd.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? > + - items: > + - const: usb_crst > + - const: usb_hibrst > + - const: usb_apbrst > phys: > minItems: 1 > maxItems: 2 > @@ -95,6 +100,26 @@ 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 > + reset-names: > + minItems: 3 > + > additionalProperties: false > > examples: > > base-commit: b179ce312bafcb8c68dc718e015aee79b7939ff0 > -- > 2.34.1 > [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] dt-bindings: usb: dwc3-xilinx: Describe the reset constraint for the versal platform 2025-11-12 19:07 ` Conor Dooley @ 2025-11-13 12:15 ` Pandey, Radhey Shyam 2025-11-13 19:16 ` Conor Dooley 0 siblings, 1 reply; 4+ messages in thread From: Pandey, Radhey Shyam @ 2025-11-13 12:15 UTC (permalink / raw) To: Conor Dooley Cc: gregkh@linuxfoundation.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, Simek, Michal, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, git (AMD-Xilinx) [Public] > -----Original Message----- > From: Conor Dooley <conor@kernel.org> > Sent: Thursday, November 13, 2025 12:38 AM > To: Pandey, Radhey Shyam <radhey.shyam.pandey@amd.com> > Cc: gregkh@linuxfoundation.org; robh@kernel.org; krzk+dt@kernel.org; > conor+dt@kernel.org; Simek, Michal <michal.simek@amd.com>; linux- > usb@vger.kernel.org; devicetree@vger.kernel.org; linux-arm- > kernel@lists.infradead.org; linux-kernel@vger.kernel.org; git (AMD-Xilinx) > <git@amd.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@amd.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 + reset-names: + minItems: 3 + maxItems: 3 + > > > + - items: > > + - const: usb_crst > > + - const: usb_hibrst > > + - const: usb_apbrst > > phys: > > minItems: 1 > > maxItems: 2 > > @@ -95,6 +100,26 @@ 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 > > + reset-names: > > + minItems: 3 > > + > > additionalProperties: false > > > > examples: > > > > base-commit: b179ce312bafcb8c68dc718e015aee79b7939ff0 > > -- > > 2.34.1 > > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dt-bindings: usb: dwc3-xilinx: Describe the reset constraint for the versal platform 2025-11-13 12:15 ` Pandey, Radhey Shyam @ 2025-11-13 19:16 ` Conor Dooley 0 siblings, 0 replies; 4+ messages in thread From: Conor Dooley @ 2025-11-13 19:16 UTC (permalink / raw) To: Pandey, Radhey Shyam Cc: gregkh@linuxfoundation.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, Simek, Michal, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, git (AMD-Xilinx) [-- Attachment #1: Type: text/plain, Size: 3658 bytes --] On Thu, Nov 13, 2025 at 12:15:02PM +0000, Pandey, Radhey Shyam wrote: > [Public] > > > -----Original Message----- > > From: Conor Dooley <conor@kernel.org> > > Sent: Thursday, November 13, 2025 12:38 AM > > To: Pandey, Radhey Shyam <radhey.shyam.pandey@amd.com> > > Cc: gregkh@linuxfoundation.org; robh@kernel.org; krzk+dt@kernel.org; > > conor+dt@kernel.org; Simek, Michal <michal.simek@amd.com>; linux- > > usb@vger.kernel.org; devicetree@vger.kernel.org; linux-arm- > > kernel@lists.infradead.org; linux-kernel@vger.kernel.org; git (AMD-Xilinx) > > <git@amd.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@amd.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. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-11-13 19:16 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-11-12 15:54 [PATCH] dt-bindings: usb: dwc3-xilinx: Describe the reset constraint for the versal platform Radhey Shyam Pandey 2025-11-12 19:07 ` Conor Dooley 2025-11-13 12:15 ` Pandey, Radhey Shyam 2025-11-13 19:16 ` Conor Dooley
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).