xref: /linux/Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.yaml (revision 320424c7d44f54c18df9812fd7c45f6963524002)
1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/phy/brcm,brcmstb-usb-phy.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Broadcom STB USB PHY
8
9description: Broadcom's PHY that handles EHCI/OHCI and/or XHCI
10
11maintainers:
12  - Al Cooper <alcooperx@gmail.com>
13  - Rafał Miłecki <rafal@milecki.pl>
14
15properties:
16  compatible:
17    enum:
18      - brcm,bcm4908-usb-phy
19      - brcm,bcm7211-usb-phy
20      - brcm,bcm7216-usb-phy
21      - brcm,brcmstb-usb-phy
22
23  reg:
24    minItems: 1
25    maxItems: 6
26    items:
27      - description: the base CTRL register
28      - description: XHCI EC register
29      - description: XHCI GBL register
30      - description: USB PHY register
31      - description: USB MDIO register
32      - description: BDC register
33
34  reg-names:
35    minItems: 1
36    maxItems: 6
37    items:
38      - const: ctrl
39      - const: xhci_ec
40      - const: xhci_gbl
41      - const: usb_phy
42      - const: usb_mdio
43      - const: bdc_ec
44
45  power-domains:
46    maxItems: 1
47
48  clocks:
49    minItems: 1
50    maxItems: 2
51
52  clock-names:
53    minItems: 1
54    maxItems: 2
55    items:
56      - const: sw_usb
57      - const: sw_usb3
58
59  interrupts:
60    description: wakeup interrupt
61
62  interrupt-names:
63    const: wake
64
65  brcm,ipp:
66    $ref: /schemas/types.yaml#/definitions/uint32
67    description: Invert Port Power
68    minimum: 0
69    maximum: 1
70
71  brcm,ioc:
72    $ref: /schemas/types.yaml#/definitions/uint32
73    description: Invert Over Current detection
74    minimum: 0
75    maximum: 1
76
77  dr_mode:
78    description: PHY Device mode. If this property is not defined, the PHY will
79      default to "host" mode.
80    enum:
81      - host
82      - peripheral
83      - drd
84      - typec-pd
85
86  brcm,syscon-piarbctl:
87    description: phandle to syscon for handling config registers
88    $ref: /schemas/types.yaml#/definitions/phandle
89
90  brcm,has-xhci:
91    description: Indicates the PHY has an XHCI PHY.
92    type: boolean
93
94  brcm,has-eohci:
95    description: Indicates the PHY has an EHCI/OHCI PHY.
96    type: boolean
97
98  "#phy-cells":
99    description: |
100      Cell allows setting the type of the PHY. Possible values are:
101      - PHY_TYPE_USB2 for USB1.1/2.0 PHY
102      - PHY_TYPE_USB3 for USB3.x PHY
103    const: 1
104
105required:
106  - reg
107  - "#phy-cells"
108
109anyOf:
110  - required:
111      - brcm,has-xhci
112  - required:
113      - brcm,has-eohci
114
115allOf:
116  - if:
117      properties:
118        compatible:
119          contains:
120            enum:
121              - const: brcm,bcm4908-usb-phy
122              - const: brcm,brcmstb-usb-phy
123    then:
124      properties:
125        reg:
126          minItems: 1
127          maxItems: 2
128  - if:
129      properties:
130        compatible:
131          contains:
132            const: brcm,bcm7211-usb-phy
133    then:
134      properties:
135        reg:
136          minItems: 5
137          maxItems: 6
138        reg-names:
139          minItems: 5
140          maxItems: 6
141  - if:
142      properties:
143        compatible:
144          contains:
145            const: brcm,bcm7216-usb-phy
146    then:
147      properties:
148        reg:
149          minItems: 3
150          maxItems: 3
151        reg-names:
152          minItems: 3
153          maxItems: 3
154
155additionalProperties: false
156
157examples:
158  - |
159    #include <dt-bindings/phy/phy.h>
160
161    usb-phy@f0470200 {
162        compatible = "brcm,brcmstb-usb-phy";
163        reg = <0xf0470200 0xb8>,
164              <0xf0471940 0x6c0>;
165        #phy-cells = <1>;
166        dr_mode = "host";
167        brcm,ioc = <1>;
168        brcm,ipp = <1>;
169        brcm,has-xhci;
170        brcm,has-eohci;
171        clocks = <&usb20>, <&usb30>;
172        clock-names = "sw_usb", "sw_usb3";
173    };
174  - |
175    #include <dt-bindings/phy/phy.h>
176
177    usb-phy@29f0200 {
178        compatible = "brcm,bcm7211-usb-phy";
179        reg = <0x29f0200 0x200>,
180              <0x29c0880 0x30>,
181              <0x29cc100 0x534>,
182              <0x2808000 0x24>,
183              <0x2980080 0x8>;
184        reg-names = "ctrl",
185            "xhci_ec",
186            "xhci_gbl",
187            "usb_phy",
188            "usb_mdio";
189        brcm,ioc = <0x0>;
190        brcm,ipp = <0x0>;
191        interrupts = <0x30>;
192        interrupt-parent = <&vpu_intr1_nosec_intc>;
193        interrupt-names = "wake";
194        #phy-cells = <0x1>;
195        brcm,has-xhci;
196        brcm,syscon-piarbctl = <&syscon_piarbctl>;
197        clocks = <&scmi_clk 256>;
198        clock-names = "sw_usb";
199    };
200