Merge drm/drm-next into drm-misc-next
[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     minItems: 4
51     maxItems: 4
52
53   clock-names:
54     items:
55       - const: ehci_ohci
56       - const: hs-usb-if
57       - const: usb_extal
58       - const: usb_xtal
59
60   '#clock-cells':
61     const: 0
62
63   power-domains:
64     maxItems: 1
65
66   resets:
67     minItems: 2
68     maxItems: 2
69
70   reset-names:
71     items:
72       - const: ehci_ohci
73       - const: hs-usb-if
74
75 required:
76   - compatible
77   - reg
78   - clocks
79   - clock-names
80   - '#clock-cells'
81   - power-domains
82   - resets
83   - reset-names
84
85 additionalProperties: false
86
87 examples:
88   - |
89     #include <dt-bindings/clock/r8a7795-cpg-mssr.h>
90     #include <dt-bindings/power/r8a7795-sysc.h>
91
92     usb2_clksel: clock-controller@e6590630 {
93         compatible = "renesas,r8a7795-rcar-usb2-clock-sel",
94                      "renesas,rcar-gen3-usb2-clock-sel";
95         reg = <0xe6590630 0x02>;
96         clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>,
97                  <&usb_extal>, <&usb_xtal>;
98         clock-names = "ehci_ohci", "hs-usb-if", "usb_extal", "usb_xtal";
99         #clock-cells = <0>;
100         power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
101         resets = <&cpg 703>, <&cpg 704>;
102         reset-names = "ehci_ohci", "hs-usb-if";
103     };