Linux 6.9-rc1
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / clock / renesas,rcar-usb2-clock-sel.yaml
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/clock/renesas,rcar-usb2-clock-sel.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Renesas R-Car USB 2.0 clock selector
8
9 maintainers:
10   - Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
11
12 description: |
13   If you connect an external clock to the USB_EXTAL pin only, you should set
14   the clock rate to "usb_extal" node only.
15   If you connect an oscillator to both the USB_XTAL and USB_EXTAL, this module
16   is not needed because this is default setting. (Of course, you can set the
17   clock rates to both "usb_extal" and "usb_xtal" nodes.
18
19   Case 1: An external clock connects to R-Car SoC
20     +----------+   +--- R-Car ---------------------+
21     |External  |---|USB_EXTAL ---> all usb channels|
22     |clock     |   |USB_XTAL                       |
23     +----------+   +-------------------------------+
24
25   In this case, we need this driver with "usb_extal" clock.
26
27   Case 2: An oscillator connects to R-Car SoC
28     +----------+   +--- R-Car ---------------------+
29     |Oscillator|---|USB_EXTAL -+-> all usb channels|
30     |          |---|USB_XTAL --+                   |
31     +----------+   +-------------------------------+
32   In this case, we don't need this selector.
33
34 properties:
35   compatible:
36     items:
37       - enum:
38           - renesas,r8a774a1-rcar-usb2-clock-sel # RZ/G2M
39           - renesas,r8a774b1-rcar-usb2-clock-sel # RZ/G2N
40           - renesas,r8a774e1-rcar-usb2-clock-sel # RZ/G2H
41           - renesas,r8a7795-rcar-usb2-clock-sel  # R-Car H3
42           - renesas,r8a7796-rcar-usb2-clock-sel  # R-Car M3-W
43           - renesas,r8a77961-rcar-usb2-clock-sel # R-Car M3-W+
44       - const: renesas,rcar-gen3-usb2-clock-sel
45
46   reg:
47     maxItems: 1
48
49   clocks:
50     maxItems: 4
51
52   clock-names:
53     items:
54       - const: ehci_ohci
55       - const: hs-usb-if
56       - const: usb_extal
57       - const: usb_xtal
58
59   '#clock-cells':
60     const: 0
61
62   power-domains:
63     maxItems: 1
64
65   resets:
66     maxItems: 2
67
68   reset-names:
69     items:
70       - const: ehci_ohci
71       - const: hs-usb-if
72
73 required:
74   - compatible
75   - reg
76   - clocks
77   - clock-names
78   - '#clock-cells'
79   - power-domains
80   - resets
81   - reset-names
82
83 additionalProperties: false
84
85 examples:
86   - |
87     #include <dt-bindings/clock/r8a7795-cpg-mssr.h>
88     #include <dt-bindings/power/r8a7795-sysc.h>
89
90     usb2_clksel: clock-controller@e6590630 {
91         compatible = "renesas,r8a7795-rcar-usb2-clock-sel",
92                      "renesas,rcar-gen3-usb2-clock-sel";
93         reg = <0xe6590630 0x02>;
94         clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>,
95                  <&usb_extal>, <&usb_xtal>;
96         clock-names = "ehci_ohci", "hs-usb-if", "usb_extal", "usb_xtal";
97         #clock-cells = <0>;
98         power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
99         resets = <&cpg 703>, <&cpg 704>;
100         reset-names = "ehci_ohci", "hs-usb-if";
101     };