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:
18*d600d31eSAlexander Stein    items:
19*d600d31eSAlexander Stein      - description: Address and length of the register set for HSIO Block Control
20*d600d31eSAlexander Stein      - description: Address and length of the register set for the wrapper of 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
52*d600d31eSAlexander Stein  fsl,permanently-attached:
53*d600d31eSAlexander Stein    type: boolean
54*d600d31eSAlexander Stein    description:
55*d600d31eSAlexander Stein      Indicates if the device atached to a downstream port is
56*d600d31eSAlexander Stein      permanently attached.
57*d600d31eSAlexander Stein
58*d600d31eSAlexander Stein  fsl,disable-port-power-control:
59*d600d31eSAlexander Stein    type: boolean
60*d600d31eSAlexander Stein    description:
61*d600d31eSAlexander Stein      Indicates whether the host controller implementation includes port
62*d600d31eSAlexander Stein      power control. Defines Bit 3 in capability register (HCCPARAMS).
63*d600d31eSAlexander Stein
64*d600d31eSAlexander Stein  fsl,over-current-active-low:
65*d600d31eSAlexander Stein    type: boolean
66*d600d31eSAlexander Stein    description:
67*d600d31eSAlexander Stein      Over current signal polarity is active low.
68*d600d31eSAlexander Stein
69*d600d31eSAlexander Stein  fsl,power-active-low:
70*d600d31eSAlexander Stein    type: boolean
71*d600d31eSAlexander Stein    description:
72*d600d31eSAlexander Stein      Power pad (PWR) polarity is active low.
73*d600d31eSAlexander Stein
74d2a704e2SLi Jun# Required child node:
75d2a704e2SLi Jun
76d2a704e2SLi JunpatternProperties:
779ea6feb6SZhen Lei  "^usb@[0-9a-f]+$":
789ea6feb6SZhen Lei    $ref: snps,dwc3.yaml#
79d2a704e2SLi Jun
80d2a704e2SLi Junrequired:
81d2a704e2SLi Jun  - compatible
82d2a704e2SLi Jun  - reg
83d2a704e2SLi Jun  - "#address-cells"
84d2a704e2SLi Jun  - "#size-cells"
85d2a704e2SLi Jun  - dma-ranges
86d2a704e2SLi Jun  - ranges
87d2a704e2SLi Jun  - clocks
88d2a704e2SLi Jun  - clock-names
89d2a704e2SLi Jun  - interrupts
90d2a704e2SLi Jun
91d2a704e2SLi JunadditionalProperties: false
92d2a704e2SLi Jun
93d2a704e2SLi Junexamples:
94d2a704e2SLi Jun  - |
95d2a704e2SLi Jun    #include <dt-bindings/clock/imx8mp-clock.h>
96d2a704e2SLi Jun    #include <dt-bindings/interrupt-controller/arm-gic.h>
97d2a704e2SLi Jun    usb3_0: usb@32f10100 {
98d2a704e2SLi Jun      compatible = "fsl,imx8mp-dwc3";
99*d600d31eSAlexander Stein      reg = <0x32f10100 0x8>,
100*d600d31eSAlexander Stein            <0x381f0000 0x20>;
101d2a704e2SLi Jun      clocks = <&clk IMX8MP_CLK_HSIO_ROOT>,
102d2a704e2SLi Jun               <&clk IMX8MP_CLK_USB_ROOT>;
103d2a704e2SLi Jun      clock-names = "hsio", "suspend";
104d2a704e2SLi Jun      interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
105d2a704e2SLi Jun      #address-cells = <1>;
106d2a704e2SLi Jun      #size-cells = <1>;
107d2a704e2SLi Jun      dma-ranges = <0x40000000 0x40000000 0xc0000000>;
108d2a704e2SLi Jun      ranges;
109d2a704e2SLi Jun
1109ea6feb6SZhen Lei      usb@38100000 {
111d2a704e2SLi Jun        compatible = "snps,dwc3";
112d2a704e2SLi Jun        reg = <0x38100000 0x10000>;
113d2a704e2SLi Jun        clocks = <&clk IMX8MP_CLK_HSIO_AXI>,
114d2a704e2SLi Jun                 <&clk IMX8MP_CLK_USB_CORE_REF>,
115d2a704e2SLi Jun                 <&clk IMX8MP_CLK_USB_ROOT>;
116d2a704e2SLi Jun        clock-names = "bus_early", "ref", "suspend";
117d2a704e2SLi Jun        assigned-clocks = <&clk IMX8MP_CLK_HSIO_AXI>;
118d2a704e2SLi Jun        assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_500M>;
119d2a704e2SLi Jun        assigned-clock-rates = <500000000>;
120d2a704e2SLi Jun        interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
121d2a704e2SLi Jun        phys = <&usb3_phy0>, <&usb3_phy0>;
122d2a704e2SLi Jun        phy-names = "usb2-phy", "usb3-phy";
123d2a704e2SLi Jun        snps,dis-u2-freeclk-exists-quirk;
124d2a704e2SLi Jun      };
125d2a704e2SLi Jun    };
126