Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: "http://devicetree.org/schemas/clock/renesas,rcar-usb2-clock-sel.yaml#"
0005 $schema: "http://devicetree.org/meta-schemas/core.yaml#"
0006 
0007 title: Renesas R-Car USB 2.0 clock selector
0008 
0009 maintainers:
0010   - Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
0011 
0012 description: |
0013   If you connect an external clock to the USB_EXTAL pin only, you should set
0014   the clock rate to "usb_extal" node only.
0015   If you connect an oscillator to both the USB_XTAL and USB_EXTAL, this module
0016   is not needed because this is default setting. (Of course, you can set the
0017   clock rates to both "usb_extal" and "usb_xtal" nodes.
0018 
0019   Case 1: An external clock connects to R-Car SoC
0020     +----------+   +--- R-Car ---------------------+
0021     |External  |---|USB_EXTAL ---> all usb channels|
0022     |clock     |   |USB_XTAL                       |
0023     +----------+   +-------------------------------+
0024 
0025   In this case, we need this driver with "usb_extal" clock.
0026 
0027   Case 2: An oscillator connects to R-Car SoC
0028     +----------+   +--- R-Car ---------------------+
0029     |Oscillator|---|USB_EXTAL -+-> all usb channels|
0030     |          |---|USB_XTAL --+                   |
0031     +----------+   +-------------------------------+
0032   In this case, we don't need this selector.
0033 
0034 properties:
0035   compatible:
0036     items:
0037       - enum:
0038           - renesas,r8a774a1-rcar-usb2-clock-sel # RZ/G2M
0039           - renesas,r8a774b1-rcar-usb2-clock-sel # RZ/G2N
0040           - renesas,r8a774e1-rcar-usb2-clock-sel # RZ/G2H
0041           - renesas,r8a7795-rcar-usb2-clock-sel  # R-Car H3
0042           - renesas,r8a7796-rcar-usb2-clock-sel  # R-Car M3-W
0043           - renesas,r8a77961-rcar-usb2-clock-sel # R-Car M3-W+
0044       - const: renesas,rcar-gen3-usb2-clock-sel
0045 
0046   reg:
0047     maxItems: 1
0048 
0049   clocks:
0050     minItems: 4
0051     maxItems: 4
0052 
0053   clock-names:
0054     items:
0055       - const: ehci_ohci
0056       - const: hs-usb-if
0057       - const: usb_extal
0058       - const: usb_xtal
0059 
0060   '#clock-cells':
0061     const: 0
0062 
0063   power-domains:
0064     maxItems: 1
0065 
0066   resets:
0067     minItems: 2
0068     maxItems: 2
0069 
0070   reset-names:
0071     items:
0072       - const: ehci_ohci
0073       - const: hs-usb-if
0074 
0075 required:
0076   - compatible
0077   - reg
0078   - clocks
0079   - clock-names
0080   - '#clock-cells'
0081   - power-domains
0082   - resets
0083   - reset-names
0084 
0085 additionalProperties: false
0086 
0087 examples:
0088   - |
0089     #include <dt-bindings/clock/r8a7795-cpg-mssr.h>
0090     #include <dt-bindings/power/r8a7795-sysc.h>
0091 
0092     usb2_clksel: clock-controller@e6590630 {
0093         compatible = "renesas,r8a7795-rcar-usb2-clock-sel",
0094                      "renesas,rcar-gen3-usb2-clock-sel";
0095         reg = <0xe6590630 0x02>;
0096         clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>,
0097                  <&usb_extal>, <&usb_xtal>;
0098         clock-names = "ehci_ohci", "hs-usb-if", "usb_extal", "usb_xtal";
0099         #clock-cells = <0>;
0100         power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
0101         resets = <&cpg 703>, <&cpg 704>;
0102         reset-names = "ehci_ohci", "hs-usb-if";
0103     };