Linux USB
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: "NG, ADRIAN HO YIN" <adrian.ho.yin.ng@altera.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Dinh Nguyen <dinguyen@kernel.org>,
	linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 1/4] dt-bindings: usb: add Altera Agilex5 DWC3 controller
Date: Tue, 8 Sep 2026 17:47:14 +0100	[thread overview]
Message-ID: <20260908-failing-harbor-bcdb0d560c66@spud> (raw)
In-Reply-To: <8bf38b40-580e-4331-8e18-afccef6f2d59@altera.com>

[-- Attachment #1: Type: text/plain, Size: 5286 bytes --]

On Tue, Sep 08, 2026 at 02:01:58PM +0800, NG, ADRIAN HO YIN wrote:
> 
> On 9/8/2026 12:59 AM, Conor Dooley wrote:
> > On Mon, Sep 07, 2026 at 04:21:38PM +0800, Adrian Ng Ho Yin wrote:
> > > Add a binding for the Altera Agilex5 SoC integration of the Synopsys DWC3
> > > USB controller (compatible "altr,agilex5-dwc3"), covering clocks, resets,
> > > PHYs, and optional IOMMU support.
> > > 
> > > Clock names follow the snps,dwc3.yaml example order (bus_early, ref,
> > > suspend). Reset names use core/ecc. On this SoC ref and suspend are the
> > > same hardware source, so the example reuses AGILEX5_USB31_SUSPEND_CLK.
> > > 
> > > Signed-off-by: Adrian Ng Ho Yin <adrian.ho.yin.ng@altera.com>
> > > ---
> > >   .../bindings/usb/altr,agilex5-dwc3.yaml       | 108 ++++++++++++++++++
> > >   1 file changed, 108 insertions(+)
> > >   create mode 100644 Documentation/devicetree/bindings/usb/altr,agilex5-dwc3.yaml
> > > 
> > > diff --git a/Documentation/devicetree/bindings/usb/altr,agilex5-dwc3.yaml b/Documentation/devicetree/bindings/usb/altr,agilex5-dwc3.yaml
> > > new file mode 100644
> > > index 000000000000..9970d7c9d6fa
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/usb/altr,agilex5-dwc3.yaml
> > > @@ -0,0 +1,108 @@
> > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/usb/altr,agilex5-dwc3.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Altera Agilex5 DWC3 USB SoC Controller
> > > +
> > > +maintainers:
> > > +  - Adrian Ng Ho Yin <adrian.ho.yin.ng@altera.com>
> > > +
> > > +description:
> > > +  The Altera Agilex5 SoCFPGA integrates a Synopsys DesignWare USB3 (DWC3)
> > > +  controller that supports host, device and DRD modes.
> > > +
> > > +allOf:
> > > +  - $ref: snps,dwc3-common.yaml#
> > > +
> > > +properties:
> > > +  compatible:
> > > +    const: altr,agilex5-dwc3
> > > +
> > > +  reg:
> > > +    maxItems: 1
> > > +
> > > +  clocks:
> > > +    items:
> > > +      - description: Master/Core bus clock
> > > +      - description: Controller reference clock
> > > +      - description: Controller suspend clock
> > > +
> > > +  clock-names:
> > > +    items:
> > > +      - const: bus_early
> > > +      - const: ref
> > > +      - const: suspend
> > > +
> > > +  interrupts:
> > > +    maxItems: 1
> > > +
> > > +  phys:
> > > +    minItems: 2
> > > +    maxItems: 2
> > > +
> > > +  phy-names:
> > > +    items:
> > > +      - const: usb2-phy
> > > +      - const: usb3-phy
> > > +
> > > +  iommus:
> > > +    maxItems: 1
> > > +
> > > +  resets:
> > > +    items:
> > > +      - description: DWC3 core reset
> > > +      - description: DWC3 ECC reset
> > > +
> > > +  reset-names:
> > > +    items:
> > > +      - const: core
> > > +      - const: ecc
> > > +
> > > +  dr_mode: true
> > > +
> > > +  maximum-speed: true
> > > +
> > > +  snps,dis_u2_susphy_quirk: true
> > > +
> > > +  snps,dis_u3_susphy_quirk: true
> > You add these two as possible but not required properties. Why is that?
> > Does the agilex5 have some instances of the IP where these are needed
> > and not others?
> 
> Hi Conor,
> 
> There is only one DWC3 instance for Agilex 5, and these 2 quirks are used on
> that node.

Then they should be mandatory.
pw-bot: changes-requested

> I left them as optional because i followed how snps,dwc3-common.yaml models
> them:
> boolean flags, not required properties.

That file cannot make them mandatory since they might not apply to all
the various devices that use them.

Thanks,
Conor.

> I listed them as "foo: true" so
> additionalProperties:
> false would still accept the properties the SoC DT uses.
> 
> Thank You
> Adrian
> 
> > 
> > Cheers,
> > Conor.
> > 
> > > +
> > > +required:
> > > +  - compatible
> > > +  - reg
> > > +  - clocks
> > > +  - clock-names
> > > +  - interrupts
> > > +  - phys
> > > +  - phy-names
> > > +  - resets
> > > +  - reset-names
> > > +
> > > +additionalProperties: false
> > > +
> > > +examples:
> > > +  - |
> > > +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> > > +    #include <dt-bindings/reset/altr,rst-mgr-s10.h>
> > > +    #include <dt-bindings/clock/intel,agilex5-clkmgr.h>
> > > +
> > > +    soc {
> > > +        #address-cells = <1>;
> > > +        #size-cells = <1>;
> > > +
> > > +        usb@11000000 {
> > > +            compatible = "altr,agilex5-dwc3";
> > > +            reg = <0x11000000 0x100000>;
> > > +            interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
> > > +            clocks = <&clkmgr AGILEX5_USB31_BUS_CLK_EARLY>,
> > > +                     <&clkmgr AGILEX5_USB31_SUSPEND_CLK>,
> > > +                     <&clkmgr AGILEX5_USB31_SUSPEND_CLK>;
> > > +            clock-names = "bus_early", "ref", "suspend";
> > > +            phys = <&usbphy0>, <&usbphy1>;
> > > +            phy-names = "usb2-phy", "usb3-phy";
> > > +            resets = <&rst USB1_RESET>, <&rst USB1_OCP_RESET>;
> > > +            reset-names = "core", "ecc";
> > > +            iommus = <&smmu 7>;
> > > +        };
> > > +    };
> > > -- 
> > > 2.49.GIT
> > > 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2026-09-08 16:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-07  8:21 [PATCH v5 0/4] Add USB3.1 support for Agilex5 Adrian Ng Ho Yin
2026-09-07  8:21 ` [PATCH v5 1/4] dt-bindings: usb: add Altera Agilex5 DWC3 controller Adrian Ng Ho Yin
2026-09-07 16:59   ` Conor Dooley
2026-09-08  6:01     ` NG, ADRIAN HO YIN
2026-09-08 16:47       ` Conor Dooley [this message]
2026-09-07  8:21 ` [PATCH v5 2/4] arm64: dts: intel: agilex5: add USB3.1 controller node Adrian Ng Ho Yin
2026-09-07  8:21 ` [PATCH v5 3/4] arm64: dts: intel: agilex5: remove usb0 in Agilex5 SoCDK Adrian Ng Ho Yin
2026-09-07  8:21 ` [PATCH v5 4/4] usb: dwc3: add Altera Agilex5 support to generic platform driver Adrian Ng Ho Yin

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=20260908-failing-harbor-bcdb0d560c66@spud \
    --to=conor@kernel.org \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=adrian.ho.yin.ng@altera.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dinguyen@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --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