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