Hao Zhang | 4dca7f0 | 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 | |
Vitaly Andrianov | 61f66fd | 2014-07-25 22:23:19 +0300 | [diff] [blame^] | 59 | enum { |
| 60 | SPD800, |
| 61 | SPD850, |
| 62 | SPD1000, |
| 63 | SPD1250, |
| 64 | SPD1350, |
| 65 | SPD1400, |
| 66 | SPD1500, |
| 67 | SPD_RSV |
| 68 | }; |
| 69 | |
Hao Zhang | 4dca7f0 | 2014-07-16 00:59:23 +0300 | [diff] [blame] | 70 | #define CORE_PLL_800 {CORE_PLL, 16, 1, 2} |
Vitaly Andrianov | 61f66fd | 2014-07-25 22:23:19 +0300 | [diff] [blame^] | 71 | #define CORE_PLL_850 {CORE_PLL, 17, 1, 2} |
Hao Zhang | 4dca7f0 | 2014-07-16 00:59:23 +0300 | [diff] [blame] | 72 | #define CORE_PLL_1000 {CORE_PLL, 20, 1, 2} |
| 73 | #define CORE_PLL_1200 {CORE_PLL, 24, 1, 2} |
| 74 | #define PASS_PLL_1000 {PASS_PLL, 20, 1, 2} |
Vitaly Andrianov | 61f66fd | 2014-07-25 22:23:19 +0300 | [diff] [blame^] | 75 | #define CORE_PLL_1250 {CORE_PLL, 25, 1, 2} |
| 76 | #define CORE_PLL_1350 {CORE_PLL, 27, 1, 2} |
| 77 | #define CORE_PLL_1400 {CORE_PLL, 28, 1, 2} |
| 78 | #define CORE_PLL_1500 {CORE_PLL, 30, 1, 2} |
Hao Zhang | 4dca7f0 | 2014-07-16 00:59:23 +0300 | [diff] [blame] | 79 | #define DDR3_PLL_200 {DDR3_PLL, 4, 1, 2} |
| 80 | #define DDR3_PLL_400 {DDR3_PLL, 16, 1, 4} |
| 81 | #define DDR3_PLL_800 {DDR3_PLL, 16, 1, 2} |
| 82 | #define DDR3_PLL_333 {DDR3_PLL, 20, 1, 6} |
| 83 | |
| 84 | #endif |