18c2ecf20Sopenharmony_ci* Renesas R-Car USB 2.0 clock selector 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciThis file provides information on what the device node for the R-Car USB 2.0 48c2ecf20Sopenharmony_ciclock selector. 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ciIf you connect an external clock to the USB_EXTAL pin only, you should set 78c2ecf20Sopenharmony_cithe clock rate to "usb_extal" node only. 88c2ecf20Sopenharmony_ciIf you connect an oscillator to both the USB_XTAL and USB_EXTAL, this module 98c2ecf20Sopenharmony_ciis not needed because this is default setting. (Of course, you can set the 108c2ecf20Sopenharmony_ciclock rates to both "usb_extal" and "usb_xtal" nodes. 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ciCase 1: An external clock connects to R-Car SoC 138c2ecf20Sopenharmony_ci +----------+ +--- R-Car ---------------------+ 148c2ecf20Sopenharmony_ci |External |---|USB_EXTAL ---> all usb channels| 158c2ecf20Sopenharmony_ci |clock | |USB_XTAL | 168c2ecf20Sopenharmony_ci +----------+ +-------------------------------+ 178c2ecf20Sopenharmony_ciIn this case, we need this driver with "usb_extal" clock. 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ciCase 2: An oscillator connects to R-Car SoC 208c2ecf20Sopenharmony_ci +----------+ +--- R-Car ---------------------+ 218c2ecf20Sopenharmony_ci |Oscillator|---|USB_EXTAL -+-> all usb channels| 228c2ecf20Sopenharmony_ci | |---|USB_XTAL --+ | 238c2ecf20Sopenharmony_ci +----------+ +-------------------------------+ 248c2ecf20Sopenharmony_ciIn this case, we don't need this selector. 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ciRequired properties: 278c2ecf20Sopenharmony_ci- compatible: "renesas,r8a7795-rcar-usb2-clock-sel" if the device is a part of 288c2ecf20Sopenharmony_ci an R8A7795 SoC. 298c2ecf20Sopenharmony_ci "renesas,r8a7796-rcar-usb2-clock-sel" if the device if a part of 308c2ecf20Sopenharmony_ci an R8A77960 SoC. 318c2ecf20Sopenharmony_ci "renesas,r8a77961-rcar-usb2-clock-sel" if the device if a part of 328c2ecf20Sopenharmony_ci an R8A77961 SoC. 338c2ecf20Sopenharmony_ci "renesas,rcar-gen3-usb2-clock-sel" for a generic R-Car Gen3 348c2ecf20Sopenharmony_ci compatible device. 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci When compatible with the generic version, nodes must list the 378c2ecf20Sopenharmony_ci SoC-specific version corresponding to the platform first 388c2ecf20Sopenharmony_ci followed by the generic version. 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci- reg: offset and length of the USB 2.0 clock selector register block. 418c2ecf20Sopenharmony_ci- clocks: A list of phandles and specifier pairs. 428c2ecf20Sopenharmony_ci- clock-names: Name of the clocks. 438c2ecf20Sopenharmony_ci - The functional clock of USB 2.0 host side must be "ehci_ohci" 448c2ecf20Sopenharmony_ci - The functional clock of HS-USB side must be "hs-usb-if" 458c2ecf20Sopenharmony_ci - The USB_EXTAL clock pin must be "usb_extal" 468c2ecf20Sopenharmony_ci - The USB_XTAL clock pin must be "usb_xtal" 478c2ecf20Sopenharmony_ci- #clock-cells: Must be 0 488c2ecf20Sopenharmony_ci- power-domains: A phandle and symbolic PM domain specifier. 498c2ecf20Sopenharmony_ci See power/renesas,rcar-sysc.yaml. 508c2ecf20Sopenharmony_ci- resets: A list of phandles and specifier pairs. 518c2ecf20Sopenharmony_ci- reset-names: Name of the resets. 528c2ecf20Sopenharmony_ci - The reset of USB 2.0 host side must be "ehci_ohci" 538c2ecf20Sopenharmony_ci - The reset of HS-USB side must be "hs-usb-if" 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ciExample (R-Car H3): 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci usb2_clksel: clock-controller@e6590630 { 588c2ecf20Sopenharmony_ci compatible = "renesas,r8a7795-rcar-usb2-clock-sel", 598c2ecf20Sopenharmony_ci "renesas,rcar-gen3-usb2-clock-sel"; 608c2ecf20Sopenharmony_ci reg = <0 0xe6590630 0 0x02>; 618c2ecf20Sopenharmony_ci clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>, 628c2ecf20Sopenharmony_ci <&usb_extal>, <&usb_xtal>; 638c2ecf20Sopenharmony_ci clock-names = "ehci_ohci", "hs-usb-if", "usb_extal", "usb_xtal"; 648c2ecf20Sopenharmony_ci #clock-cells = <0>; 658c2ecf20Sopenharmony_ci power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 668c2ecf20Sopenharmony_ci resets = <&cpg 703>, <&cpg 704>; 678c2ecf20Sopenharmony_ci reset-names = "ehci_ohci", "hs-usb-if"; 688c2ecf20Sopenharmony_ci }; 69