1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
4 $id: http://devicetree.org/schemas/clock/renesas,rcar-usb2-clock-sel.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Renesas R-Car USB 2.0 clock selector
10 - Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
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.
19 Case 1: An external clock connects to R-Car SoC
20 +----------+ +--- R-Car ---------------------+
21 |External |---|USB_EXTAL ---> all usb channels|
23 +----------+ +-------------------------------+
25 In this case, we need this driver with "usb_extal" clock.
27 Case 2: An oscillator connects to R-Car SoC
28 +----------+ +--- R-Car ---------------------+
29 |Oscillator|---|USB_EXTAL -+-> all usb channels|
31 +----------+ +-------------------------------+
32 In this case, we don't need this selector.
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
83 additionalProperties: false
87 #include <dt-bindings/clock/r8a7795-cpg-mssr.h>
88 #include <dt-bindings/power/r8a7795-sysc.h>
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";
98 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
99 resets = <&cpg 703>, <&cpg 704>;
100 reset-names = "ehci_ohci", "hs-usb-if";