1d8a94458SPaul Walmsley /* 2ca6eccb3SPaul Walmsley * opp2430_data.c - old-style "OPP" table for OMAP2430 3d8a94458SPaul Walmsley * 4d8a94458SPaul Walmsley * Copyright (C) 2005-2009 Texas Instruments, Inc. 5d8a94458SPaul Walmsley * Copyright (C) 2004-2009 Nokia Corporation 6d8a94458SPaul Walmsley * 7d8a94458SPaul Walmsley * Richard Woodruff <r-woodruff2@ti.com> 8d8a94458SPaul Walmsley * 9d8a94458SPaul Walmsley * The OMAP2 processor can be run at several discrete 'PRCM configurations'. 10d8a94458SPaul Walmsley * These configurations are characterized by voltage and speed for clocks. 11d8a94458SPaul Walmsley * The device is only validated for certain combinations. One way to express 12ca6eccb3SPaul Walmsley * these combinations is via the 'ratios' which the clocks operate with 13d8a94458SPaul Walmsley * respect to each other. These ratio sets are for a given voltage/DPLL 14ca6eccb3SPaul Walmsley * setting. All configurations can be described by a DPLL setting and a ratio. 15d8a94458SPaul Walmsley * 16d8a94458SPaul Walmsley * 2430 differs from 2420 in that there are no more phase synchronizers used. 17d8a94458SPaul Walmsley * They both have a slightly different clock domain setup. 2420(iva1,dsp) vs 18d8a94458SPaul Walmsley * 2430 (iva2.1, NOdsp, mdm) 19d8a94458SPaul Walmsley * 20d8a94458SPaul Walmsley * XXX Missing voltage data. 21ca6eccb3SPaul Walmsley * XXX Missing 19.2MHz sys_clk rate sets. 22d8a94458SPaul Walmsley * 23d8a94458SPaul Walmsley * THe format described in this file is deprecated. Once a reasonable 24d8a94458SPaul Walmsley * OPP API exists, the data in this file should be converted to use it. 25d8a94458SPaul Walmsley * 26d8a94458SPaul Walmsley * This is technically part of the OMAP2xxx clock code. 27d8a94458SPaul Walmsley */ 28d8a94458SPaul Walmsley 292c799cefSTony Lindgren #include <plat/hardware.h> 302c799cefSTony Lindgren 31d8a94458SPaul Walmsley #include "opp2xxx.h" 32d8a94458SPaul Walmsley #include "sdrc.h" 33d8a94458SPaul Walmsley #include "clock.h" 34d8a94458SPaul Walmsley 35ca6eccb3SPaul Walmsley /* 36ca6eccb3SPaul Walmsley * Key dividers which make up a PRCM set. Ratios for a PRCM are mandated. 37d8a94458SPaul Walmsley * xtal_speed, dpll_speed, mpu_speed, CM_CLKSEL_MPU, 38d8a94458SPaul Walmsley * CM_CLKSEL_DSP, CM_CLKSEL_GFX, CM_CLKSEL1_CORE, CM_CLKSEL1_PLL, 39d8a94458SPaul Walmsley * CM_CLKSEL2_PLL, CM_CLKSEL_MDM 40d8a94458SPaul Walmsley * 41ca6eccb3SPaul Walmsley * Filling in table based on 2430-SDPs variants available. There are 42ca6eccb3SPaul Walmsley * quite a few more rate combinations which could be defined. 43d8a94458SPaul Walmsley * 44ca6eccb3SPaul Walmsley * When multiple values are defined the start up will try and choose 45ca6eccb3SPaul Walmsley * the fastest one. If a 'fast' value is defined, then automatically, 46ca6eccb3SPaul Walmsley * the /2 one should be included as it can be used. Generally having 47ca6eccb3SPaul Walmsley * more than one fast set does not make sense, as static timings need 48ca6eccb3SPaul Walmsley * to be changed to change the set. The exception is the bypass 49ca6eccb3SPaul Walmsley * setting which is available for low power bypass. 50d8a94458SPaul Walmsley * 51d8a94458SPaul Walmsley * Note: This table needs to be sorted, fastest to slowest. 52ca6eccb3SPaul Walmsley */ 53d8a94458SPaul Walmsley const struct prcm_config omap2430_rate_table[] = { 54d8a94458SPaul Walmsley /* PRCM #4 - ratio2 (ES2.1) - FAST */ 55d8a94458SPaul Walmsley {S13M, S798M, S399M, R2_CM_CLKSEL_MPU_VAL, /* 399MHz ARM */ 56d8a94458SPaul Walmsley R2_CM_CLKSEL_DSP_VAL, R2_CM_CLKSEL_GFX_VAL, 57d8a94458SPaul Walmsley R2_CM_CLKSEL1_CORE_VAL, M4_CM_CLKSEL1_PLL_13_VAL, 58d8a94458SPaul Walmsley MX_CLKSEL2_PLL_2x_VAL, R2_CM_CLKSEL_MDM_VAL, 59d8a94458SPaul Walmsley SDRC_RFR_CTRL_133MHz, 60d8a94458SPaul Walmsley RATE_IN_243X}, 61d8a94458SPaul Walmsley 62d8a94458SPaul Walmsley /* PRCM #2 - ratio1 (ES2) - FAST */ 63d8a94458SPaul Walmsley {S13M, S658M, S329M, R1_CM_CLKSEL_MPU_VAL, /* 330MHz ARM */ 64d8a94458SPaul Walmsley R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL, 65d8a94458SPaul Walmsley R1_CM_CLKSEL1_CORE_VAL, M2_CM_CLKSEL1_PLL_13_VAL, 66d8a94458SPaul Walmsley MX_CLKSEL2_PLL_2x_VAL, R1_CM_CLKSEL_MDM_VAL, 67d8a94458SPaul Walmsley SDRC_RFR_CTRL_165MHz, 68d8a94458SPaul Walmsley RATE_IN_243X}, 69d8a94458SPaul Walmsley 70d8a94458SPaul Walmsley /* PRCM #5a - ratio1 - FAST */ 71d8a94458SPaul Walmsley {S13M, S532M, S266M, R1_CM_CLKSEL_MPU_VAL, /* 266MHz ARM */ 72d8a94458SPaul Walmsley R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL, 73d8a94458SPaul Walmsley R1_CM_CLKSEL1_CORE_VAL, M5A_CM_CLKSEL1_PLL_13_VAL, 74d8a94458SPaul Walmsley MX_CLKSEL2_PLL_2x_VAL, R1_CM_CLKSEL_MDM_VAL, 75d8a94458SPaul Walmsley SDRC_RFR_CTRL_133MHz, 76d8a94458SPaul Walmsley RATE_IN_243X}, 77d8a94458SPaul Walmsley 78d8a94458SPaul Walmsley /* PRCM #5b - ratio1 - FAST */ 79d8a94458SPaul Walmsley {S13M, S400M, S200M, R1_CM_CLKSEL_MPU_VAL, /* 200MHz ARM */ 80d8a94458SPaul Walmsley R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL, 81d8a94458SPaul Walmsley R1_CM_CLKSEL1_CORE_VAL, M5B_CM_CLKSEL1_PLL_13_VAL, 82d8a94458SPaul Walmsley MX_CLKSEL2_PLL_2x_VAL, R1_CM_CLKSEL_MDM_VAL, 83d8a94458SPaul Walmsley SDRC_RFR_CTRL_100MHz, 84d8a94458SPaul Walmsley RATE_IN_243X}, 85d8a94458SPaul Walmsley 86d8a94458SPaul Walmsley /* PRCM #4 - ratio1 (ES2.1) - SLOW */ 87d8a94458SPaul Walmsley {S13M, S399M, S199M, R2_CM_CLKSEL_MPU_VAL, /* 200MHz ARM */ 88d8a94458SPaul Walmsley R2_CM_CLKSEL_DSP_VAL, R2_CM_CLKSEL_GFX_VAL, 89d8a94458SPaul Walmsley R2_CM_CLKSEL1_CORE_VAL, M4_CM_CLKSEL1_PLL_13_VAL, 90d8a94458SPaul Walmsley MX_CLKSEL2_PLL_1x_VAL, R2_CM_CLKSEL_MDM_VAL, 91d8a94458SPaul Walmsley SDRC_RFR_CTRL_133MHz, 92d8a94458SPaul Walmsley RATE_IN_243X}, 93d8a94458SPaul Walmsley 94d8a94458SPaul Walmsley /* PRCM #2 - ratio1 (ES2) - SLOW */ 95d8a94458SPaul Walmsley {S13M, S329M, S164M, R1_CM_CLKSEL_MPU_VAL, /* 165MHz ARM */ 96d8a94458SPaul Walmsley R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL, 97d8a94458SPaul Walmsley R1_CM_CLKSEL1_CORE_VAL, M2_CM_CLKSEL1_PLL_13_VAL, 98d8a94458SPaul Walmsley MX_CLKSEL2_PLL_1x_VAL, R1_CM_CLKSEL_MDM_VAL, 99d8a94458SPaul Walmsley SDRC_RFR_CTRL_165MHz, 100d8a94458SPaul Walmsley RATE_IN_243X}, 101d8a94458SPaul Walmsley 102d8a94458SPaul Walmsley /* PRCM #5a - ratio1 - SLOW */ 103d8a94458SPaul Walmsley {S13M, S266M, S133M, R1_CM_CLKSEL_MPU_VAL, /* 133MHz ARM */ 104d8a94458SPaul Walmsley R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL, 105d8a94458SPaul Walmsley R1_CM_CLKSEL1_CORE_VAL, M5A_CM_CLKSEL1_PLL_13_VAL, 106d8a94458SPaul Walmsley MX_CLKSEL2_PLL_1x_VAL, R1_CM_CLKSEL_MDM_VAL, 107d8a94458SPaul Walmsley SDRC_RFR_CTRL_133MHz, 108d8a94458SPaul Walmsley RATE_IN_243X}, 109d8a94458SPaul Walmsley 110d8a94458SPaul Walmsley /* PRCM #5b - ratio1 - SLOW*/ 111d8a94458SPaul Walmsley {S13M, S200M, S100M, R1_CM_CLKSEL_MPU_VAL, /* 100MHz ARM */ 112d8a94458SPaul Walmsley R1_CM_CLKSEL_DSP_VAL, R1_CM_CLKSEL_GFX_VAL, 113d8a94458SPaul Walmsley R1_CM_CLKSEL1_CORE_VAL, M5B_CM_CLKSEL1_PLL_13_VAL, 114d8a94458SPaul Walmsley MX_CLKSEL2_PLL_1x_VAL, R1_CM_CLKSEL_MDM_VAL, 115d8a94458SPaul Walmsley SDRC_RFR_CTRL_100MHz, 116d8a94458SPaul Walmsley RATE_IN_243X}, 117d8a94458SPaul Walmsley 118d8a94458SPaul Walmsley /* PRCM-boot/bypass */ 119d8a94458SPaul Walmsley {S13M, S13M, S13M, RB_CM_CLKSEL_MPU_VAL, /* 13Mhz */ 120d8a94458SPaul Walmsley RB_CM_CLKSEL_DSP_VAL, RB_CM_CLKSEL_GFX_VAL, 121d8a94458SPaul Walmsley RB_CM_CLKSEL1_CORE_VAL, MB_CM_CLKSEL1_PLL_13_VAL, 122d8a94458SPaul Walmsley MX_CLKSEL2_PLL_2x_VAL, RB_CM_CLKSEL_MDM_VAL, 123d8a94458SPaul Walmsley SDRC_RFR_CTRL_BYPASS, 124d8a94458SPaul Walmsley RATE_IN_243X}, 125d8a94458SPaul Walmsley 126d8a94458SPaul Walmsley /* PRCM-boot/bypass */ 127d8a94458SPaul Walmsley {S12M, S12M, S12M, RB_CM_CLKSEL_MPU_VAL, /* 12Mhz */ 128d8a94458SPaul Walmsley RB_CM_CLKSEL_DSP_VAL, RB_CM_CLKSEL_GFX_VAL, 129d8a94458SPaul Walmsley RB_CM_CLKSEL1_CORE_VAL, MB_CM_CLKSEL1_PLL_12_VAL, 130d8a94458SPaul Walmsley MX_CLKSEL2_PLL_2x_VAL, RB_CM_CLKSEL_MDM_VAL, 131d8a94458SPaul Walmsley SDRC_RFR_CTRL_BYPASS, 132d8a94458SPaul Walmsley RATE_IN_243X}, 133d8a94458SPaul Walmsley 134d8a94458SPaul Walmsley { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 135d8a94458SPaul Walmsley }; 136