blob: 2d960070f10f3c5afbeb13689043591ff9d2211d [file] [log] [blame]
Chandan Nath4ba33452011-10-14 02:58:23 +00001/*
2 * clocks_am33xx.h
3 *
4 * AM33xx clock define
5 *
6 * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR /PURPOSE. See the
16 * GNU General Public License for more details.
17 */
18
19#ifndef _CLOCKS_AM33XX_H_
20#define _CLOCKS_AM33XX_H_
21
Steve Sakoman772be792012-05-30 07:46:00 +000022#define OSC (V_OSCK/1000000)
Chandan Nath4ba33452011-10-14 02:58:23 +000023
Mark Jackson52b003c2013-03-04 01:27:20 +000024/* MAIN PLL Fdll = 550 MHz, by default */
25#ifndef CONFIG_SYS_MPUCLK
26#define CONFIG_SYS_MPUCLK 550
27#endif
28#define MPUPLL_M CONFIG_SYS_MPUCLK
Steve Sakoman772be792012-05-30 07:46:00 +000029#define MPUPLL_N (OSC-1)
Chandan Nath4ba33452011-10-14 02:58:23 +000030#define MPUPLL_M2 1
31
32/* Core PLL Fdll = 1 GHZ, */
33#define COREPLL_M 1000
Steve Sakoman772be792012-05-30 07:46:00 +000034#define COREPLL_N (OSC-1)
Chandan Nath4ba33452011-10-14 02:58:23 +000035
36#define COREPLL_M4 10 /* CORE_CLKOUTM4 = 200 MHZ */
37#define COREPLL_M5 8 /* CORE_CLKOUTM5 = 250 MHZ */
38#define COREPLL_M6 4 /* CORE_CLKOUTM6 = 500 MHZ */
39
40/*
41 * USB PHY clock is 960 MHZ. Since, this comes directly from Fdll, Fdll
42 * frequency needs to be set to 960 MHZ. Hence,
43 * For clkout = 192 MHZ, Fdll = 960 MHZ, divider values are given below
44 */
45#define PERPLL_M 960
Steve Sakoman772be792012-05-30 07:46:00 +000046#define PERPLL_N (OSC-1)
Chandan Nath4ba33452011-10-14 02:58:23 +000047#define PERPLL_M2 5
48
49/* DDR Freq is 266 MHZ for now */
50/* Set Fdll = 400 MHZ , Fdll = M * 2 * CLKINP/ N + 1; clkout = Fdll /(2 * M2) */
51#define DDRPLL_M 266
Steve Sakoman772be792012-05-30 07:46:00 +000052#define DDRPLL_N (OSC-1)
Chandan Nath4ba33452011-10-14 02:58:23 +000053#define DDRPLL_M2 1
54
55extern void pll_init(void);
56extern void enable_emif_clocks(void);
57
58#endif /* endif _CLOCKS_AM33XX_H_ */