xref: /freebsd/sys/contrib/device-tree/Bindings/phy/phy-stm32-usbphyc.yaml (revision 5956d97f4b3204318ceb6aa9c77bd0bc6ea87a41)
1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/phy/phy-stm32-usbphyc.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: STMicroelectronics STM32 USB HS PHY controller binding
8
9description:
10
11  The STM32 USBPHYC block contains a dual port High Speed UTMI+ PHY and a UTMI
12  switch. It controls PHY configuration and status, and the UTMI+ switch that
13  selects either OTG or HOST controller for the second PHY port. It also sets
14  PLL configuration.
15
16  USBPHYC
17  |_ PLL
18  |
19  |_ PHY port#1 _________________ HOST controller
20  |                   __                 |
21  |                  / 1|________________|
22  |_ PHY port#2 ----|   |________________
23  |                  \_0|                |
24  |_ UTMI switch_______|          OTG controller
25
26maintainers:
27  - Amelie Delaunay <amelie.delaunay@st.com>
28
29properties:
30  compatible:
31    const: st,stm32mp1-usbphyc
32
33  reg:
34    maxItems: 1
35
36  clocks:
37    maxItems: 1
38
39  resets:
40    maxItems: 1
41
42  "#address-cells":
43    const: 1
44
45  "#size-cells":
46    const: 0
47
48  vdda1v1-supply:
49    description: regulator providing 1V1 power supply to the PLL block
50
51  vdda1v8-supply:
52    description: regulator providing 1V8 power supply to the PLL block
53
54  '#clock-cells':
55    description: number of clock cells for ck_usbo_48m consumer
56    const: 0
57
58#Required child nodes:
59
60patternProperties:
61  "^usb-phy@[0|1]$":
62    type: object
63    description:
64      Each port the controller provides must be represented as a sub-node.
65
66    properties:
67      reg:
68        description: phy port index.
69        maxItems: 1
70
71      phy-supply:
72        description: regulator providing 3V3 power supply to the PHY.
73
74      "#phy-cells":
75        enum: [ 0x0, 0x1 ]
76
77      connector:
78        type: object
79        allOf:
80          - $ref: ../connector/usb-connector.yaml
81        properties:
82          vbus-supply: true
83
84    allOf:
85      - if:
86          properties:
87            reg:
88              const: 0
89        then:
90          properties:
91            "#phy-cells":
92              const: 0
93        else:
94          properties:
95            "#phy-cells":
96              const: 1
97              description:
98                The value is used to select UTMI switch output.
99                0 for OTG controller and 1 for Host controller.
100
101    required:
102      - reg
103      - phy-supply
104      - "#phy-cells"
105
106    additionalProperties: false
107
108required:
109  - compatible
110  - reg
111  - clocks
112  - "#address-cells"
113  - "#size-cells"
114  - vdda1v1-supply
115  - vdda1v8-supply
116  - usb-phy@0
117  - usb-phy@1
118
119additionalProperties: false
120
121examples:
122  - |
123    #include <dt-bindings/clock/stm32mp1-clks.h>
124    #include <dt-bindings/reset/stm32mp1-resets.h>
125    usbphyc: usbphyc@5a006000 {
126        compatible = "st,stm32mp1-usbphyc";
127        reg = <0x5a006000 0x1000>;
128        clocks = <&rcc USBPHY_K>;
129        resets = <&rcc USBPHY_R>;
130        vdda1v1-supply = <&reg11>;
131        vdda1v8-supply = <&reg18>;
132        #address-cells = <1>;
133        #size-cells = <0>;
134        #clock-cells = <0>;
135
136        usbphyc_port0: usb-phy@0 {
137            reg = <0>;
138            phy-supply = <&vdd_usb>;
139            #phy-cells = <0>;
140            connector {
141                compatible = "usb-a-connector";
142                vbus-supply = <&vbus_sw>;
143            };
144        };
145
146        usbphyc_port1: usb-phy@1 {
147            reg = <1>;
148            phy-supply = <&vdd_usb>;
149            #phy-cells = <1>;
150        };
151    };
152...
153