Devicetree
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Minda Chen <minda.chen@starfivetech.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor@kernel.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v3 1/3] dt-bindings: usb: starfive,jhb100-dwc3: Add adapter register region
Date: Fri, 4 Dec 2026 08:00:01 -0600	[thread overview]
Message-ID: <20261204140001.GA2776069-robh@kernel.org> (raw)
In-Reply-To: <20261125083736.50606-2-minda.chen@starfivetech.com>

On Wed, Nov 25, 2026 at 04:37:34PM +0800, Minda Chen wrote:
> Besides the DRD controllers, the JHB100 BMC SoC has DWC3 device-only
> controllers which are not connected to a USB PHY. Each of them is
> connected through a PHY adapter to a port of an xHCI controller that
> is exported to the server host over PCIe. The adapter has its own
> register region that software has to program.
> 
> Describe the adapter register region as an optional second "reg"
> entry and add "reg-names". The DRD controllers keep a single
> register region.
> 
> The adapter is only present on the device-only controllers, so
> restrict dr_mode to "peripheral" when the adapter region is described.
> 
> Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
> ---
>  .../bindings/usb/starfive,jhb100-dwc3.yaml    | 37 ++++++++++++++++++-
>  1 file changed, 35 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/usb/starfive,jhb100-dwc3.yaml b/Documentation/devicetree/bindings/usb/starfive,jhb100-dwc3.yaml
> index fbabe99e9d5c..3ebf39616bd1 100644
> --- a/Documentation/devicetree/bindings/usb/starfive,jhb100-dwc3.yaml
> +++ b/Documentation/devicetree/bindings/usb/starfive,jhb100-dwc3.yaml
> @@ -10,17 +10,50 @@ maintainers:
>    - Minda Chen <minda.chen@starfivetech.com>
>  
>  description:
> -  The USB DRD controller on JHB100 BMC SoC.
> +  The USB DRD controllers and the USB device-only controllers on the
> +  JHB100 BMC SoC. The device-only controllers are not connected to a USB
> +  PHY. Each one is connected through a PHY adapter to an xHCI port that
> +  is exported to the server host.
>  
>  allOf:
>    - $ref: snps,dwc3-common.yaml#
> +  - if:
> +      required:
> +        - reg-names
> +      properties:
> +        reg-names:
> +          contains:
> +            const: adapter
> +    then:
> +      properties:
> +        reg:
> +          minItems: 2
> +        reg-names:
> +          minItems: 2
> +        dr_mode:
> +          const: peripheral
> +    else:
> +      properties:
> +        reg:
> +          maxItems: 1
> +        reg-names:
> +          maxItems: 1

Most of this isn't needed. If reg-names doesn't contain adapter, then 
the size can only be 1 entry. If it does, then the size can only be 2 
entries. So the only part of the then/else needed is 'dr_mode'.

Rob

  reply	other threads:[~2026-12-04 14:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25  8:37 [PATCH v3 0/3] Add StarFive JHB100 host field USB device controller driver Minda Chen
2026-11-25  8:37 ` [PATCH v3 1/3] dt-bindings: usb: starfive,jhb100-dwc3: Add adapter register region Minda Chen
2026-12-04 14:00   ` Rob Herring [this message]
2026-11-25  8:37 ` [PATCH v3 2/3] dt-bindings: usb: starfive,jhb100-dwc3: Add clock number limit Minda Chen
2026-12-04 14:01   ` Rob Herring (Arm)
2026-11-25  8:37 ` [PATCH v3 3/3] usb: dwc3: starfive: Add JHB100 USB device adapter port enable quirk Minda Chen

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=20261204140001.GA2776069-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=conor@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=minda.chen@starfivetech.com \
    /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