18c2ecf20Sopenharmony_ciNVIDIA Tegra124 and Tegra132 Clock And Reset Controller 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciThis binding uses the common clock binding: 48c2ecf20Sopenharmony_ciDocumentation/devicetree/bindings/clock/clock-bindings.txt 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ciThe CAR (Clock And Reset) Controller on Tegra is the HW module responsible 78c2ecf20Sopenharmony_cifor muxing and gating Tegra's clocks, and setting their rates. 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ciRequired properties : 108c2ecf20Sopenharmony_ci- compatible : Should be "nvidia,tegra124-car" or "nvidia,tegra132-car" 118c2ecf20Sopenharmony_ci- reg : Should contain CAR registers location and length 128c2ecf20Sopenharmony_ci- clocks : Should contain phandle and clock specifiers for two clocks: 138c2ecf20Sopenharmony_ci the 32 KHz "32k_in", and the board-specific oscillator "osc". 148c2ecf20Sopenharmony_ci- #clock-cells : Should be 1. 158c2ecf20Sopenharmony_ci In clock consumers, this cell represents the clock ID exposed by the 168c2ecf20Sopenharmony_ci CAR. The assignments may be found in the header files 178c2ecf20Sopenharmony_ci <dt-bindings/clock/tegra124-car-common.h> (which covers IDs common 188c2ecf20Sopenharmony_ci to Tegra124 and Tegra132) and <dt-bindings/clock/tegra124-car.h> 198c2ecf20Sopenharmony_ci (for Tegra124-specific clocks). 208c2ecf20Sopenharmony_ci- #reset-cells : Should be 1. 218c2ecf20Sopenharmony_ci In clock consumers, this cell represents the bit number in the CAR's 228c2ecf20Sopenharmony_ci array of CLK_RST_CONTROLLER_RST_DEVICES_* registers. 238c2ecf20Sopenharmony_ci- nvidia,external-memory-controller : phandle of the EMC driver. 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ciThe node should contain a "emc-timings" subnode for each supported RAM type (see 268c2ecf20Sopenharmony_cifield RAM_CODE in register PMC_STRAPPING_OPT_A). 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ciRequired properties for "emc-timings" nodes : 298c2ecf20Sopenharmony_ci- nvidia,ram-code : Should contain the value of RAM_CODE this timing set 308c2ecf20Sopenharmony_ci is used for. 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ciEach "emc-timings" node should contain a "timing" subnode for every supported 338c2ecf20Sopenharmony_ciEMC clock rate. 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ciRequired properties for "timing" nodes : 368c2ecf20Sopenharmony_ci- clock-frequency : Should contain the memory clock rate to which this timing 378c2ecf20Sopenharmony_cirelates. 388c2ecf20Sopenharmony_ci- nvidia,parent-clock-frequency : Should contain the rate at which the current 398c2ecf20Sopenharmony_ciparent of the EMC clock should be running at this timing. 408c2ecf20Sopenharmony_ci- clocks : Must contain an entry for each entry in clock-names. 418c2ecf20Sopenharmony_ci See ../clocks/clock-bindings.txt for details. 428c2ecf20Sopenharmony_ci- clock-names : Must include the following entries: 438c2ecf20Sopenharmony_ci - emc-parent : the clock that should be the parent of the EMC clock at this 448c2ecf20Sopenharmony_citiming. 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_ciExample SoC include file: 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci/ { 498c2ecf20Sopenharmony_ci tegra_car: clock@60006000 { 508c2ecf20Sopenharmony_ci compatible = "nvidia,tegra124-car"; 518c2ecf20Sopenharmony_ci reg = <0x60006000 0x1000>; 528c2ecf20Sopenharmony_ci #clock-cells = <1>; 538c2ecf20Sopenharmony_ci #reset-cells = <1>; 548c2ecf20Sopenharmony_ci nvidia,external-memory-controller = <&emc>; 558c2ecf20Sopenharmony_ci }; 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci usb@c5004000 { 588c2ecf20Sopenharmony_ci clocks = <&tegra_car TEGRA124_CLK_USB2>; 598c2ecf20Sopenharmony_ci }; 608c2ecf20Sopenharmony_ci}; 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_ciExample board file: 638c2ecf20Sopenharmony_ci 648c2ecf20Sopenharmony_ci/ { 658c2ecf20Sopenharmony_ci clocks { 668c2ecf20Sopenharmony_ci compatible = "simple-bus"; 678c2ecf20Sopenharmony_ci #address-cells = <1>; 688c2ecf20Sopenharmony_ci #size-cells = <0>; 698c2ecf20Sopenharmony_ci 708c2ecf20Sopenharmony_ci osc: clock@0 { 718c2ecf20Sopenharmony_ci compatible = "fixed-clock"; 728c2ecf20Sopenharmony_ci reg = <0>; 738c2ecf20Sopenharmony_ci #clock-cells = <0>; 748c2ecf20Sopenharmony_ci clock-frequency = <112400000>; 758c2ecf20Sopenharmony_ci }; 768c2ecf20Sopenharmony_ci 778c2ecf20Sopenharmony_ci clk_32k: clock@1 { 788c2ecf20Sopenharmony_ci compatible = "fixed-clock"; 798c2ecf20Sopenharmony_ci reg = <1>; 808c2ecf20Sopenharmony_ci #clock-cells = <0>; 818c2ecf20Sopenharmony_ci clock-frequency = <32768>; 828c2ecf20Sopenharmony_ci }; 838c2ecf20Sopenharmony_ci }; 848c2ecf20Sopenharmony_ci 858c2ecf20Sopenharmony_ci &tegra_car { 868c2ecf20Sopenharmony_ci clocks = <&clk_32k> <&osc>; 878c2ecf20Sopenharmony_ci }; 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_ci clock@60006000 { 908c2ecf20Sopenharmony_ci emc-timings-3 { 918c2ecf20Sopenharmony_ci nvidia,ram-code = <3>; 928c2ecf20Sopenharmony_ci 938c2ecf20Sopenharmony_ci timing-12750000 { 948c2ecf20Sopenharmony_ci clock-frequency = <12750000>; 958c2ecf20Sopenharmony_ci nvidia,parent-clock-frequency = <408000000>; 968c2ecf20Sopenharmony_ci clocks = <&tegra_car TEGRA124_CLK_PLL_P>; 978c2ecf20Sopenharmony_ci clock-names = "emc-parent"; 988c2ecf20Sopenharmony_ci }; 998c2ecf20Sopenharmony_ci timing-20400000 { 1008c2ecf20Sopenharmony_ci clock-frequency = <20400000>; 1018c2ecf20Sopenharmony_ci nvidia,parent-clock-frequency = <408000000>; 1028c2ecf20Sopenharmony_ci clocks = <&tegra_car TEGRA124_CLK_PLL_P>; 1038c2ecf20Sopenharmony_ci clock-names = "emc-parent"; 1048c2ecf20Sopenharmony_ci }; 1058c2ecf20Sopenharmony_ci }; 1068c2ecf20Sopenharmony_ci }; 1078c2ecf20Sopenharmony_ci}; 108