# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/usb/fsl,imx8mq-dwc3.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: NXP iMX8MQ Soc USB Controller

maintainers:
  - Li Jun <jun.li@nxp.com>
  - Peng Fan <peng.fan@nxp.com>

select:
  properties:
    compatible:
      contains:
        enum:
          - fsl,imx8mq-dwc3
  required:
    - compatible

properties:
  compatible:
    items:
      - const: fsl,imx8mq-dwc3
      - const: snps,dwc3

allOf:
  - $ref: snps,dwc3.yaml#

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/clock/imx8mq-clock.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>

    usb_dwc3_1: usb@38200000 {
        compatible = "fsl,imx8mq-dwc3", "snps,dwc3";
        reg = <0x38200000 0x10000>;
        clocks = <&clk IMX8MQ_CLK_USB2_CTRL_ROOT>,
                 <&clk IMX8MQ_CLK_USB_CORE_REF>,
                 <&clk IMX8MQ_CLK_32K>;
        clock-names = "bus_early", "ref", "suspend";
        interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
        phys = <&usb3_phy1>, <&usb3_phy1>;
        phy-names = "usb2-phy", "usb3-phy";
    };