xref: /freebsd/sys/contrib/device-tree/Bindings/phy/rockchip,inno-usb2phy.yaml (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
1cb7aa33aSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0
2cb7aa33aSEmmanuel Vadot%YAML 1.2
3cb7aa33aSEmmanuel Vadot---
4cb7aa33aSEmmanuel Vadot$id: http://devicetree.org/schemas/phy/rockchip,inno-usb2phy.yaml#
5cb7aa33aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6cb7aa33aSEmmanuel Vadot
7cb7aa33aSEmmanuel Vadottitle: Rockchip USB2.0 phy with inno IP block
8cb7aa33aSEmmanuel Vadot
9cb7aa33aSEmmanuel Vadotmaintainers:
10cb7aa33aSEmmanuel Vadot  - Heiko Stuebner <heiko@sntech.de>
11cb7aa33aSEmmanuel Vadot
12cb7aa33aSEmmanuel Vadotproperties:
13cb7aa33aSEmmanuel Vadot  compatible:
14cb7aa33aSEmmanuel Vadot    enum:
15cb7aa33aSEmmanuel Vadot      - rockchip,px30-usb2phy
16cb7aa33aSEmmanuel Vadot      - rockchip,rk3128-usb2phy
17cb7aa33aSEmmanuel Vadot      - rockchip,rk3228-usb2phy
18cb7aa33aSEmmanuel Vadot      - rockchip,rk3308-usb2phy
19cb7aa33aSEmmanuel Vadot      - rockchip,rk3328-usb2phy
20cb7aa33aSEmmanuel Vadot      - rockchip,rk3366-usb2phy
21cb7aa33aSEmmanuel Vadot      - rockchip,rk3399-usb2phy
22cb7aa33aSEmmanuel Vadot      - rockchip,rk3568-usb2phy
23*aa1a8ff2SEmmanuel Vadot      - rockchip,rk3588-usb2phy
24cb7aa33aSEmmanuel Vadot      - rockchip,rv1108-usb2phy
25cb7aa33aSEmmanuel Vadot
26cb7aa33aSEmmanuel Vadot  reg:
27cb7aa33aSEmmanuel Vadot    maxItems: 1
28cb7aa33aSEmmanuel Vadot
29cb7aa33aSEmmanuel Vadot  clock-output-names:
30cb7aa33aSEmmanuel Vadot    description:
31cb7aa33aSEmmanuel Vadot      The usb 480m output clock name.
32cb7aa33aSEmmanuel Vadot
33cb7aa33aSEmmanuel Vadot  "#clock-cells":
34cb7aa33aSEmmanuel Vadot    const: 0
35cb7aa33aSEmmanuel Vadot
36cb7aa33aSEmmanuel Vadot  clocks:
37cb7aa33aSEmmanuel Vadot    maxItems: 1
38cb7aa33aSEmmanuel Vadot
39cb7aa33aSEmmanuel Vadot  clock-names:
40cb7aa33aSEmmanuel Vadot    const: phyclk
41cb7aa33aSEmmanuel Vadot
42cb7aa33aSEmmanuel Vadot  assigned-clocks:
43cb7aa33aSEmmanuel Vadot    description:
44cb7aa33aSEmmanuel Vadot      Phandle of the usb 480m clock.
45cb7aa33aSEmmanuel Vadot
46cb7aa33aSEmmanuel Vadot  assigned-clock-parents:
47cb7aa33aSEmmanuel Vadot    description:
48cb7aa33aSEmmanuel Vadot      Parent of the usb 480m clock.
49cb7aa33aSEmmanuel Vadot      Select between usb-phy output 480m and xin24m.
50cb7aa33aSEmmanuel Vadot      Refer to clk/clock-bindings.txt for generic clock consumer properties.
51cb7aa33aSEmmanuel Vadot
52cb7aa33aSEmmanuel Vadot  extcon:
53cb7aa33aSEmmanuel Vadot    description:
54cb7aa33aSEmmanuel Vadot      Phandle to the extcon device providing the cable state for the otg phy.
55cb7aa33aSEmmanuel Vadot
56cb7aa33aSEmmanuel Vadot  interrupts:
57cb7aa33aSEmmanuel Vadot    description: Muxed interrupt for both ports
58cb7aa33aSEmmanuel Vadot    maxItems: 1
59cb7aa33aSEmmanuel Vadot
60*aa1a8ff2SEmmanuel Vadot  resets:
61*aa1a8ff2SEmmanuel Vadot    maxItems: 2
62*aa1a8ff2SEmmanuel Vadot
63*aa1a8ff2SEmmanuel Vadot  reset-names:
64*aa1a8ff2SEmmanuel Vadot    items:
65*aa1a8ff2SEmmanuel Vadot      - const: phy
66*aa1a8ff2SEmmanuel Vadot      - const: apb
67*aa1a8ff2SEmmanuel Vadot
68cb7aa33aSEmmanuel Vadot  rockchip,usbgrf:
69cb7aa33aSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
70cb7aa33aSEmmanuel Vadot    description:
71cb7aa33aSEmmanuel Vadot      Phandle to the syscon managing the 'usb general register files'.
72cb7aa33aSEmmanuel Vadot      When set the driver will request its phandle as one companion-grf
73cb7aa33aSEmmanuel Vadot      for some special SoCs (e.g rv1108).
74cb7aa33aSEmmanuel Vadot
75cb7aa33aSEmmanuel Vadot  host-port:
76cb7aa33aSEmmanuel Vadot    type: object
77cb7aa33aSEmmanuel Vadot    additionalProperties: false
78cb7aa33aSEmmanuel Vadot
79cb7aa33aSEmmanuel Vadot    properties:
80cb7aa33aSEmmanuel Vadot      "#phy-cells":
81cb7aa33aSEmmanuel Vadot        const: 0
82cb7aa33aSEmmanuel Vadot
83cb7aa33aSEmmanuel Vadot      interrupts:
84cb7aa33aSEmmanuel Vadot        description: host linestate interrupt
85cb7aa33aSEmmanuel Vadot        maxItems: 1
86cb7aa33aSEmmanuel Vadot
87cb7aa33aSEmmanuel Vadot      interrupt-names:
88cb7aa33aSEmmanuel Vadot        const: linestate
89cb7aa33aSEmmanuel Vadot
90cb7aa33aSEmmanuel Vadot      phy-supply:
91cb7aa33aSEmmanuel Vadot        description:
92cb7aa33aSEmmanuel Vadot          Phandle to a regulator that provides power to VBUS.
93cb7aa33aSEmmanuel Vadot          See ./phy-bindings.txt for details.
94cb7aa33aSEmmanuel Vadot
95cb7aa33aSEmmanuel Vadot    required:
96cb7aa33aSEmmanuel Vadot      - "#phy-cells"
97cb7aa33aSEmmanuel Vadot
98cb7aa33aSEmmanuel Vadot  otg-port:
99cb7aa33aSEmmanuel Vadot    type: object
100cb7aa33aSEmmanuel Vadot    additionalProperties: false
101cb7aa33aSEmmanuel Vadot
102cb7aa33aSEmmanuel Vadot    properties:
103cb7aa33aSEmmanuel Vadot      "#phy-cells":
104cb7aa33aSEmmanuel Vadot        const: 0
105cb7aa33aSEmmanuel Vadot
106cb7aa33aSEmmanuel Vadot      interrupts:
107cb7aa33aSEmmanuel Vadot        minItems: 1
108cb7aa33aSEmmanuel Vadot        maxItems: 3
109cb7aa33aSEmmanuel Vadot
110cb7aa33aSEmmanuel Vadot      interrupt-names:
111cb7aa33aSEmmanuel Vadot        oneOf:
112cb7aa33aSEmmanuel Vadot          - const: linestate
113cb7aa33aSEmmanuel Vadot          - const: otg-mux
114cb7aa33aSEmmanuel Vadot          - items:
115cb7aa33aSEmmanuel Vadot              - const: otg-bvalid
116cb7aa33aSEmmanuel Vadot              - const: otg-id
117cb7aa33aSEmmanuel Vadot              - const: linestate
118cb7aa33aSEmmanuel Vadot
119cb7aa33aSEmmanuel Vadot      phy-supply:
120cb7aa33aSEmmanuel Vadot        description:
121cb7aa33aSEmmanuel Vadot          Phandle to a regulator that provides power to VBUS.
122cb7aa33aSEmmanuel Vadot          See ./phy-bindings.txt for details.
123cb7aa33aSEmmanuel Vadot
124cb7aa33aSEmmanuel Vadot    required:
125cb7aa33aSEmmanuel Vadot      - "#phy-cells"
126cb7aa33aSEmmanuel Vadot
127cb7aa33aSEmmanuel Vadotrequired:
128cb7aa33aSEmmanuel Vadot  - compatible
129cb7aa33aSEmmanuel Vadot  - reg
130cb7aa33aSEmmanuel Vadot  - clock-output-names
131cb7aa33aSEmmanuel Vadot  - "#clock-cells"
132*aa1a8ff2SEmmanuel Vadot
133*aa1a8ff2SEmmanuel VadotanyOf:
134*aa1a8ff2SEmmanuel Vadot  - required:
135cb7aa33aSEmmanuel Vadot      - otg-port
136*aa1a8ff2SEmmanuel Vadot  - required:
137*aa1a8ff2SEmmanuel Vadot      - host-port
138cb7aa33aSEmmanuel Vadot
139cb7aa33aSEmmanuel VadotallOf:
140cb7aa33aSEmmanuel Vadot  - if:
141cb7aa33aSEmmanuel Vadot      properties:
142cb7aa33aSEmmanuel Vadot        compatible:
143cb7aa33aSEmmanuel Vadot          contains:
144*aa1a8ff2SEmmanuel Vadot            enum:
145*aa1a8ff2SEmmanuel Vadot              - rockchip,rk3568-usb2phy
146*aa1a8ff2SEmmanuel Vadot              - rockchip,rk3588-usb2phy
147cb7aa33aSEmmanuel Vadot
148cb7aa33aSEmmanuel Vadot    then:
149cb7aa33aSEmmanuel Vadot      properties:
150cb7aa33aSEmmanuel Vadot        host-port:
151cb7aa33aSEmmanuel Vadot          properties:
152cb7aa33aSEmmanuel Vadot            interrupts: false
153cb7aa33aSEmmanuel Vadot
154cb7aa33aSEmmanuel Vadot        otg-port:
155cb7aa33aSEmmanuel Vadot          properties:
156cb7aa33aSEmmanuel Vadot            interrupts: false
157cb7aa33aSEmmanuel Vadot
158cb7aa33aSEmmanuel Vadot      required:
159cb7aa33aSEmmanuel Vadot        - interrupts
160cb7aa33aSEmmanuel Vadot
161cb7aa33aSEmmanuel Vadot    else:
162cb7aa33aSEmmanuel Vadot      properties:
163cb7aa33aSEmmanuel Vadot        interrupts: false
164cb7aa33aSEmmanuel Vadot
165cb7aa33aSEmmanuel Vadot        host-port:
166cb7aa33aSEmmanuel Vadot          required:
167cb7aa33aSEmmanuel Vadot            - interrupts
168cb7aa33aSEmmanuel Vadot            - interrupt-names
169cb7aa33aSEmmanuel Vadot
170cb7aa33aSEmmanuel Vadot        otg-port:
171cb7aa33aSEmmanuel Vadot          required:
172cb7aa33aSEmmanuel Vadot            - interrupts
173cb7aa33aSEmmanuel Vadot            - interrupt-names
174cb7aa33aSEmmanuel Vadot
175cb7aa33aSEmmanuel VadotadditionalProperties: false
176cb7aa33aSEmmanuel Vadot
177cb7aa33aSEmmanuel Vadotexamples:
178cb7aa33aSEmmanuel Vadot  - |
179cb7aa33aSEmmanuel Vadot    #include <dt-bindings/clock/rk3399-cru.h>
180cb7aa33aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
181cb7aa33aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
182cb7aa33aSEmmanuel Vadot    u2phy0: usb2phy@e450 {
183cb7aa33aSEmmanuel Vadot      compatible = "rockchip,rk3399-usb2phy";
184cb7aa33aSEmmanuel Vadot      reg = <0xe450 0x10>;
185cb7aa33aSEmmanuel Vadot      clocks = <&cru SCLK_USB2PHY0_REF>;
186cb7aa33aSEmmanuel Vadot      clock-names = "phyclk";
187cb7aa33aSEmmanuel Vadot      clock-output-names = "clk_usbphy0_480m";
188cb7aa33aSEmmanuel Vadot      #clock-cells = <0>;
189cb7aa33aSEmmanuel Vadot
190cb7aa33aSEmmanuel Vadot      u2phy0_host: host-port {
191cb7aa33aSEmmanuel Vadot        interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH 0>;
192cb7aa33aSEmmanuel Vadot        interrupt-names = "linestate";
193cb7aa33aSEmmanuel Vadot        #phy-cells = <0>;
194cb7aa33aSEmmanuel Vadot      };
195cb7aa33aSEmmanuel Vadot
196cb7aa33aSEmmanuel Vadot      u2phy0_otg: otg-port {
197cb7aa33aSEmmanuel Vadot        interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH 0>,
198cb7aa33aSEmmanuel Vadot                     <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH 0>,
199cb7aa33aSEmmanuel Vadot                     <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH 0>;
200cb7aa33aSEmmanuel Vadot        interrupt-names = "otg-bvalid", "otg-id", "linestate";
201cb7aa33aSEmmanuel Vadot        #phy-cells = <0>;
202cb7aa33aSEmmanuel Vadot      };
203cb7aa33aSEmmanuel Vadot    };
204