Hao Zhang | 0ecd31e | 2014-07-16 00:59:23 +0300 | [diff] [blame^] | 1 | /* |
| 2 | * K2E: Clock management APIs |
| 3 | * |
| 4 | * (C) Copyright 2012-2014 |
| 5 | * Texas Instruments Incorporated, <www.ti.com> |
| 6 | * |
| 7 | * SPDX-License-Identifier: GPL-2.0+ |
| 8 | */ |
| 9 | |
| 10 | #ifndef __ASM_ARCH_CLOCK_K2E_H |
| 11 | #define __ASM_ARCH_CLOCK_K2E_H |
| 12 | |
| 13 | enum ext_clk_e { |
| 14 | sys_clk, |
| 15 | alt_core_clk, |
| 16 | pa_clk, |
| 17 | ddr3_clk, |
| 18 | mcm_clk, |
| 19 | pcie_clk, |
| 20 | sgmii_clk, |
| 21 | xgmii_clk, |
| 22 | usb_clk, |
| 23 | ext_clk_count /* number of external clocks */ |
| 24 | }; |
| 25 | |
| 26 | extern unsigned int external_clk[ext_clk_count]; |
| 27 | |
| 28 | enum clk_e { |
| 29 | core_pll_clk, |
| 30 | pass_pll_clk, |
| 31 | ddr3_pll_clk, |
| 32 | sys_clk0_clk, |
| 33 | sys_clk0_1_clk, |
| 34 | sys_clk0_2_clk, |
| 35 | sys_clk0_3_clk, |
| 36 | sys_clk0_4_clk, |
| 37 | sys_clk0_6_clk, |
| 38 | sys_clk0_8_clk, |
| 39 | sys_clk0_12_clk, |
| 40 | sys_clk0_24_clk, |
| 41 | sys_clk1_clk, |
| 42 | sys_clk1_3_clk, |
| 43 | sys_clk1_4_clk, |
| 44 | sys_clk1_6_clk, |
| 45 | sys_clk1_12_clk, |
| 46 | sys_clk2_clk, |
| 47 | sys_clk3_clk |
| 48 | }; |
| 49 | |
| 50 | #define KS2_CLK1_6 sys_clk0_6_clk |
| 51 | |
| 52 | /* PLL identifiers */ |
| 53 | enum pll_type_e { |
| 54 | CORE_PLL, |
| 55 | PASS_PLL, |
| 56 | DDR3_PLL, |
| 57 | }; |
| 58 | |
| 59 | #define CORE_PLL_800 {CORE_PLL, 16, 1, 2} |
| 60 | #define CORE_PLL_1000 {CORE_PLL, 20, 1, 2} |
| 61 | #define CORE_PLL_1200 {CORE_PLL, 24, 1, 2} |
| 62 | #define PASS_PLL_1000 {PASS_PLL, 20, 1, 2} |
| 63 | #define DDR3_PLL_200 {DDR3_PLL, 4, 1, 2} |
| 64 | #define DDR3_PLL_400 {DDR3_PLL, 16, 1, 4} |
| 65 | #define DDR3_PLL_800 {DDR3_PLL, 16, 1, 2} |
| 66 | #define DDR3_PLL_333 {DDR3_PLL, 20, 1, 6} |
| 67 | |
| 68 | #endif |