summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/clock/renesas,rcar-usb2-clock-sel.yaml
blob: 81f09df7147ec31c7dd0941f70b4e0146b2d9bd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: "http://devicetree.org/schemas/clock/renesas,rcar-usb2-clock-sel.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"

title: Renesas R-Car USB 2.0 clock selector

maintainers:
  - Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

description: |
  If you connect an external clock to the USB_EXTAL pin only, you should set
  the clock rate to "usb_extal" node only.
  If you connect an oscillator to both the USB_XTAL and USB_EXTAL, this module
  is not needed because this is default setting. (Of course, you can set the
  clock rates to both "usb_extal" and "usb_xtal" nodes.

  Case 1: An external clock connects to R-Car SoC
    +----------+   +--- R-Car ---------------------+
    |External  |---|USB_EXTAL ---> all usb channels|
    |clock     |   |USB_XTAL                       |
    +----------+   +-------------------------------+

  In this case, we need this driver with "usb_extal" clock.

  Case 2: An oscillator connects to R-Car SoC
    +----------+   +--- R-Car ---------------------+
    |Oscillator|---|USB_EXTAL -+-> all usb channels|
    |          |---|USB_XTAL --+                   |
    +----------+   +-------------------------------+
  In this case, we don't need this selector.

properties:
  compatible:
    items:
      - enum:
          - renesas,r8a774a1-rcar-usb2-clock-sel # RZ/G2M
          - renesas,r8a774b1-rcar-usb2-clock-sel # RZ/G2N
          - renesas,r8a774e1-rcar-usb2-clock-sel # RZ/G2H
          - renesas,r8a7795-rcar-usb2-clock-sel  # R-Car H3
          - renesas,r8a7796-rcar-usb2-clock-sel  # R-Car M3-W
          - renesas,r8a77961-rcar-usb2-clock-sel # R-Car M3-W+
      - const: renesas,rcar-gen3-usb2-clock-sel

  reg:
    maxItems: 1

  clocks:
    maxItems: 4

  clock-names:
    items:
      - const: ehci_ohci
      - const: hs-usb-if
      - const: usb_extal
      - const: usb_xtal

  '#clock-cells':
    const: 0

  power-domains:
    maxItems: 1

  resets:
    maxItems: 2

  reset-names:
    items:
      - const: ehci_ohci
      - const: hs-usb-if

required:
  - compatible
  - reg
  - clocks
  - clock-names
  - '#clock-cells'
  - power-domains
  - resets
  - reset-names

additionalProperties: false

examples:
  - |
    #include <dt-bindings/clock/r8a7795-cpg-mssr.h>
    #include <dt-bindings/power/r8a7795-sysc.h>

    usb2_clksel: clock-controller@e6590630 {
        compatible = "renesas,r8a7795-rcar-usb2-clock-sel",
                     "renesas,rcar-gen3-usb2-clock-sel";
        reg = <0xe6590630 0x02>;
        clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>,
                 <&usb_extal>, <&usb_xtal>;
        clock-names = "ehci_ohci", "hs-usb-if", "usb_extal", "usb_xtal";
        #clock-cells = <0>;
        power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
        resets = <&cpg 703>, <&cpg 704>;
        reset-names = "ehci_ohci", "hs-usb-if";
    };