devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Cc: gregkh@linuxfoundation.org, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, 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.com
Subject: Re: [PATCH] dt-bindings: usb: dwc3-xilinx: Describe the reset constraint for the versal platform
Date: Wed, 12 Nov 2025 19:07:51 +0000	[thread overview]
Message-ID: <20251112-bagging-diameter-4ebab1f9ed45@spud> (raw)
In-Reply-To: <20251112155430.1326426-1-radhey.shyam.pandey@amd.com>

[-- 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 --]

  reply	other threads:[~2025-11-12 19:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2025-11-13 12:15   ` Pandey, Radhey Shyam
2025-11-13 19:16     ` Conor Dooley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251112-bagging-diameter-4ebab1f9ed45@spud \
    --to=conor@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=git@amd.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=michal.simek@amd.com \
    --cc=radhey.shyam.pandey@amd.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).