1*4882a593Smuzhiyun* Renesas R-Car USB 2.0 clock selector 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunThis file provides information on what the device node for the R-Car USB 2.0 4*4882a593Smuzhiyunclock selector. 5*4882a593Smuzhiyun 6*4882a593SmuzhiyunIf you connect an external clock to the USB_EXTAL pin only, you should set 7*4882a593Smuzhiyunthe clock rate to "usb_extal" node only. 8*4882a593SmuzhiyunIf you connect an oscillator to both the USB_XTAL and USB_EXTAL, this module 9*4882a593Smuzhiyunis not needed because this is default setting. (Of course, you can set the 10*4882a593Smuzhiyunclock rates to both "usb_extal" and "usb_xtal" nodes. 11*4882a593Smuzhiyun 12*4882a593SmuzhiyunCase 1: An external clock connects to R-Car SoC 13*4882a593Smuzhiyun +----------+ +--- R-Car ---------------------+ 14*4882a593Smuzhiyun |External |---|USB_EXTAL ---> all usb channels| 15*4882a593Smuzhiyun |clock | |USB_XTAL | 16*4882a593Smuzhiyun +----------+ +-------------------------------+ 17*4882a593SmuzhiyunIn this case, we need this driver with "usb_extal" clock. 18*4882a593Smuzhiyun 19*4882a593SmuzhiyunCase 2: An oscillator connects to R-Car SoC 20*4882a593Smuzhiyun +----------+ +--- R-Car ---------------------+ 21*4882a593Smuzhiyun |Oscillator|---|USB_EXTAL -+-> all usb channels| 22*4882a593Smuzhiyun | |---|USB_XTAL --+ | 23*4882a593Smuzhiyun +----------+ +-------------------------------+ 24*4882a593SmuzhiyunIn this case, we don't need this selector. 25*4882a593Smuzhiyun 26*4882a593SmuzhiyunRequired properties: 27*4882a593Smuzhiyun- compatible: "renesas,r8a7795-rcar-usb2-clock-sel" if the device is a part of 28*4882a593Smuzhiyun an R8A7795 SoC. 29*4882a593Smuzhiyun "renesas,r8a7796-rcar-usb2-clock-sel" if the device if a part of 30*4882a593Smuzhiyun an R8A77960 SoC. 31*4882a593Smuzhiyun "renesas,r8a77961-rcar-usb2-clock-sel" if the device if a part of 32*4882a593Smuzhiyun an R8A77961 SoC. 33*4882a593Smuzhiyun "renesas,rcar-gen3-usb2-clock-sel" for a generic R-Car Gen3 34*4882a593Smuzhiyun compatible device. 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun When compatible with the generic version, nodes must list the 37*4882a593Smuzhiyun SoC-specific version corresponding to the platform first 38*4882a593Smuzhiyun followed by the generic version. 39*4882a593Smuzhiyun 40*4882a593Smuzhiyun- reg: offset and length of the USB 2.0 clock selector register block. 41*4882a593Smuzhiyun- clocks: A list of phandles and specifier pairs. 42*4882a593Smuzhiyun- clock-names: Name of the clocks. 43*4882a593Smuzhiyun - The functional clock of USB 2.0 host side must be "ehci_ohci" 44*4882a593Smuzhiyun - The functional clock of HS-USB side must be "hs-usb-if" 45*4882a593Smuzhiyun - The USB_EXTAL clock pin must be "usb_extal" 46*4882a593Smuzhiyun - The USB_XTAL clock pin must be "usb_xtal" 47*4882a593Smuzhiyun- #clock-cells: Must be 0 48*4882a593Smuzhiyun- power-domains: A phandle and symbolic PM domain specifier. 49*4882a593Smuzhiyun See power/renesas,rcar-sysc.yaml. 50*4882a593Smuzhiyun- resets: A list of phandles and specifier pairs. 51*4882a593Smuzhiyun- reset-names: Name of the resets. 52*4882a593Smuzhiyun - The reset of USB 2.0 host side must be "ehci_ohci" 53*4882a593Smuzhiyun - The reset of HS-USB side must be "hs-usb-if" 54*4882a593Smuzhiyun 55*4882a593SmuzhiyunExample (R-Car H3): 56*4882a593Smuzhiyun 57*4882a593Smuzhiyun usb2_clksel: clock-controller@e6590630 { 58*4882a593Smuzhiyun compatible = "renesas,r8a7795-rcar-usb2-clock-sel", 59*4882a593Smuzhiyun "renesas,rcar-gen3-usb2-clock-sel"; 60*4882a593Smuzhiyun reg = <0 0xe6590630 0 0x02>; 61*4882a593Smuzhiyun clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>, 62*4882a593Smuzhiyun <&usb_extal>, <&usb_xtal>; 63*4882a593Smuzhiyun clock-names = "ehci_ohci", "hs-usb-if", "usb_extal", "usb_xtal"; 64*4882a593Smuzhiyun #clock-cells = <0>; 65*4882a593Smuzhiyun power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 66*4882a593Smuzhiyun resets = <&cpg 703>, <&cpg 704>; 67*4882a593Smuzhiyun reset-names = "ehci_ohci", "hs-usb-if"; 68*4882a593Smuzhiyun }; 69