1d2a704e2SLi Jun# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2d2a704e2SLi Jun# Copyright (c) 2020 NXP
3d2a704e2SLi Jun%YAML 1.2
4d2a704e2SLi Jun---
5d2a704e2SLi Jun$id: http://devicetree.org/schemas/usb/fsl,imx8mp-dwc3.yaml#
6d2a704e2SLi Jun$schema: http://devicetree.org/meta-schemas/core.yaml#
7d2a704e2SLi Jun
8d2a704e2SLi Juntitle: NXP iMX8MP Soc USB Controller
9d2a704e2SLi Jun
10d2a704e2SLi Junmaintainers:
11d2a704e2SLi Jun  - Li Jun <jun.li@nxp.com>
12d2a704e2SLi Jun
13d2a704e2SLi Junproperties:
14d2a704e2SLi Jun  compatible:
15d2a704e2SLi Jun    const: fsl,imx8mp-dwc3
16d2a704e2SLi Jun
17d2a704e2SLi Jun  reg:
18d2a704e2SLi Jun    maxItems: 1
19d2a704e2SLi Jun    description: Address and length of the register set for the wrapper of
20d2a704e2SLi Jun      dwc3 core on the SOC.
21d2a704e2SLi Jun
22d2a704e2SLi Jun  "#address-cells":
23d2a704e2SLi Jun    enum: [ 1, 2 ]
24d2a704e2SLi Jun
25d2a704e2SLi Jun  "#size-cells":
26d2a704e2SLi Jun    enum: [ 1, 2 ]
27d2a704e2SLi Jun
28d2a704e2SLi Jun  dma-ranges:
29d2a704e2SLi Jun    description:
30d2a704e2SLi Jun      See section 2.3.9 of the DeviceTree Specification.
31d2a704e2SLi Jun
32d2a704e2SLi Jun  ranges: true
33d2a704e2SLi Jun
34d2a704e2SLi Jun  interrupts:
35d2a704e2SLi Jun    maxItems: 1
36d2a704e2SLi Jun    description: The interrupt that is asserted when a wakeup event is
37d2a704e2SLi Jun      received.
38d2a704e2SLi Jun
39d2a704e2SLi Jun  clocks:
40d2a704e2SLi Jun    description:
41d2a704e2SLi Jun      A list of phandle and clock-specifier pairs for the clocks
42d2a704e2SLi Jun      listed in clock-names.
43d2a704e2SLi Jun    items:
44d2a704e2SLi Jun      - description: system hsio root clock.
45d2a704e2SLi Jun      - description: suspend clock, used for usb wakeup logic.
46d2a704e2SLi Jun
47d2a704e2SLi Jun  clock-names:
48d2a704e2SLi Jun    items:
49d2a704e2SLi Jun      - const: hsio
50d2a704e2SLi Jun      - const: suspend
51d2a704e2SLi Jun
52d2a704e2SLi Jun# Required child node:
53d2a704e2SLi Jun
54d2a704e2SLi JunpatternProperties:
55*9ea6feb6SZhen Lei  "^usb@[0-9a-f]+$":
56*9ea6feb6SZhen Lei    $ref: snps,dwc3.yaml#
57d2a704e2SLi Jun
58d2a704e2SLi Junrequired:
59d2a704e2SLi Jun  - compatible
60d2a704e2SLi Jun  - reg
61d2a704e2SLi Jun  - "#address-cells"
62d2a704e2SLi Jun  - "#size-cells"
63d2a704e2SLi Jun  - dma-ranges
64d2a704e2SLi Jun  - ranges
65d2a704e2SLi Jun  - clocks
66d2a704e2SLi Jun  - clock-names
67d2a704e2SLi Jun  - interrupts
68d2a704e2SLi Jun
69d2a704e2SLi JunadditionalProperties: false
70d2a704e2SLi Jun
71d2a704e2SLi Junexamples:
72d2a704e2SLi Jun  - |
73d2a704e2SLi Jun    #include <dt-bindings/clock/imx8mp-clock.h>
74d2a704e2SLi Jun    #include <dt-bindings/interrupt-controller/arm-gic.h>
75d2a704e2SLi Jun    usb3_0: usb@32f10100 {
76d2a704e2SLi Jun      compatible = "fsl,imx8mp-dwc3";
77d2a704e2SLi Jun      reg = <0x32f10100 0x8>;
78d2a704e2SLi Jun      clocks = <&clk IMX8MP_CLK_HSIO_ROOT>,
79d2a704e2SLi Jun               <&clk IMX8MP_CLK_USB_ROOT>;
80d2a704e2SLi Jun      clock-names = "hsio", "suspend";
81d2a704e2SLi Jun      interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
82d2a704e2SLi Jun      #address-cells = <1>;
83d2a704e2SLi Jun      #size-cells = <1>;
84d2a704e2SLi Jun      dma-ranges = <0x40000000 0x40000000 0xc0000000>;
85d2a704e2SLi Jun      ranges;
86d2a704e2SLi Jun
87*9ea6feb6SZhen Lei      usb@38100000 {
88d2a704e2SLi Jun        compatible = "snps,dwc3";
89d2a704e2SLi Jun        reg = <0x38100000 0x10000>;
90d2a704e2SLi Jun        clocks = <&clk IMX8MP_CLK_HSIO_AXI>,
91d2a704e2SLi Jun                 <&clk IMX8MP_CLK_USB_CORE_REF>,
92d2a704e2SLi Jun                 <&clk IMX8MP_CLK_USB_ROOT>;
93d2a704e2SLi Jun        clock-names = "bus_early", "ref", "suspend";
94d2a704e2SLi Jun        assigned-clocks = <&clk IMX8MP_CLK_HSIO_AXI>;
95d2a704e2SLi Jun        assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_500M>;
96d2a704e2SLi Jun        assigned-clock-rates = <500000000>;
97d2a704e2SLi Jun        interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
98d2a704e2SLi Jun        phys = <&usb3_phy0>, <&usb3_phy0>;
99d2a704e2SLi Jun        phy-names = "usb2-phy", "usb3-phy";
100d2a704e2SLi Jun        snps,dis-u2-freeclk-exists-quirk;
101d2a704e2SLi Jun      };
102d2a704e2SLi Jun    };
103