ARM: tegra11: dvfs: Update CPU dvfs tables and bins
Alex Frid [Wed, 12 Dec 2012 05:19:04 +0000 (21:19 -0800)]
Based on characterization results:
- Integrated new cvb dvfs coefficients
- Expanded DFLL operating voltage range to 0.9V ... 1.35V with
  1.0V as dynamic tuning threshold
- Added speedo_id 2 to differentiate fast parts
- Duplicated CPU EDP table for new speedo_id

Bug 1170986
Bug 1178825
Bug 1161126

Change-Id: I49ccdb7c3d734dcdd3bb9f2542683d418d21ab5f
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/170368
(cherry picked from commit dbde7ee5f627874af256abe647fcf310e705d60c)
Reviewed-on: http://git-master/r/171629
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

arch/arm/mach-tegra/edp.c
arch/arm/mach-tegra/tegra11_dvfs.c
arch/arm/mach-tegra/tegra11_speedo.c

index cc119c7..e93ff88 100644 (file)
@@ -389,6 +389,37 @@ static struct tegra_edp_cpu_leakage_params leakage_params[] = {
                         },
                 },
        },
+       {
+               .cpu_speedo_id      = 2, /* A01P+ fast CPU */
+               .dyn_consts_n       = { 1091747, 2035205, 2978661, 3922119 },
+               .leakage_consts_n   = {  538991,  752463,  959441, 1150000 },
+               .leakage_consts_ijk = {
+                        /* i = 0 */
+                        { {  -42746668,   -5458429,   164998,  -1711, },
+                          {  178262421,   13375684,  -411791,   4590, },
+                          { -228866784,  -10482993,   331248,  -4062, },
+                          {   94301550,    2618719,   -85983,   1193, },
+                        },
+                        /* i = 1 */
+                        { { -256611791,   49677413, -1655785,  14917, },
+                          {  584675433, -132620939,  4541560, -41812, },
+                          { -398106336,  115987156, -4102328,  38737, },
+                          {   68897184,  -33030745,  1217839, -11801, },
+                        },
+                        /* i = 2 */
+                        { {  186324676,  -36019083,  1177969, -10669, },
+                          { -439237936,   98429131, -3276444,  30301, },
+                          {  315060898,  -88635036,  3004777, -28474, },
+                          {  -60854399,   26267188,  -907121,   8844, },
+                        },
+                        /* i = 3 */
+                        { {  -35432997,    6154621,  -202200,   1830, },
+                          {   87402153,  -16908683,   565152,  -5220, },
+                          {  -67775314,   15326770,  -521221,   4927, },
+                          {   15618709,   -4576116,   158401,  -1538, },
+                        },
+                },
+       },
 };
 
 static struct tegra_edp_freq_voltage_table *freq_voltage_lut;
index 61ee46f..4702c42 100644 (file)
@@ -116,74 +116,109 @@ static struct cpu_cvb_dvfs cpu_cvb_dvfs_table[] = {
                .speedo_id = 1,
                .process_id = 0,
                .dfll_tune_data  = {
-                       .tune0          = 0x00b0019d,
-                       .tune0_high_mv  = 0x00b0019d,
+                       .tune0          = 0x00b0039d,
+                       .tune0_high_mv  = 0x00b0009d,
                        .tune1          = 0x0000001f,
                        .droop_rate_min = 1000000,
-                       .min_millivolts = 1000,
+                       .tune_high_min_millivolts = 1000,
+                       .min_millivolts = 900,
                },
-               .max_mv = 1250,
+               .max_mv = 1350,
                .freqs_mult = KHZ,
                .speedo_scale = 100,
-               .voltage_scale = 100,
+               .voltage_scale = 1000,
                .cvb_table = {
-                       /*f       dfll: c0,     c1,   c2  pll:  c0,   c1,    c2 */
-                       { 306000, { 107330,  -1569,   0}, {  90000,    0,    0} },
-                       { 408000, { 111250,  -1666,   0}, {  90000,    0,    0} },
-                       { 510000, { 110000,  -1460,   0}, {  94000,    0,    0} },
-                       { 612000, { 117290,  -1745,   0}, {  94000,    0,    0} },
-                       { 714000, { 122700,  -1910,   0}, {  99000,    0,    0} },
-                       { 816000, { 125620,  -1945,   0}, {  99000,    0,    0} },
-                       { 918000, { 130560,  -2076,   0}, { 103000,    0,    0} },
-                       {1020000, { 137280,  -2303,   0}, { 103000,    0,    0} },
-                       {1122000, { 146440,  -2660,   0}, { 109000,    0,    0} },
-                       {1224000, { 152190,  -2825,   0}, { 109000,    0,    0} },
-                       {1326000, { 157520,  -2953,   0}, { 112000,    0,    0} },
-                       {1428000, { 166100,  -3261,   0}, { 140000,    0,    0} },
-                       {1530000, { 176410,  -3647,   0}, { 140000,    0,    0} },
-                       {1632000, { 189620,  -4186,   0}, { 140000,    0,    0} },
-                       {1734000, { 203190,  -4725,   0}, { 140000,    0,    0} },
-                       {1836000, { 222670,  -5573,   0}, { 140000,    0,    0} },
-                       {1938000, { 256210,  -7165,   0}, { 140000,    0,    0} },
-                       {2040000, { 250050,  -6544,   0}, { 140000,    0,    0} },
-                       {      0, {      0,      0,   0}, {      0,    0,    0} },
+                       /*f       dfll:  c0,      c1,    c2  pll:   c0,   c1,    c2 */
+                       { 306000, { 2190643, -141851, 3576}, {  900000,    0,    0} },
+                       { 408000, { 2250968, -144331, 3576}, {  900000,    0,    0} },
+                       { 510000, { 2313333, -146811, 3576}, {  940000,    0,    0} },
+                       { 612000, { 2377738, -149291, 3576}, {  940000,    0,    0} },
+                       { 714000, { 2444183, -151771, 3576}, {  990000,    0,    0} },
+                       { 816000, { 2512669, -154251, 3576}, {  990000,    0,    0} },
+                       { 918000, { 2583194, -156731, 3576}, { 1030000,    0,    0} },
+                       {1020000, { 2655759, -159211, 3576}, { 1030000,    0,    0} },
+                       {1122000, { 2730365, -161691, 3576}, { 1090000,    0,    0} },
+                       {1224000, { 2807010, -164171, 3576}, { 1090000,    0,    0} },
+                       {1326000, { 2885696, -166651, 3576}, { 1120000,    0,    0} },
+                       {1428000, { 2966422, -169131, 3576}, { 1400000,    0,    0} },
+                       {1530000, { 3049183, -171601, 3576}, { 1400000,    0,    0} },
+                       {1606500, { 3112179, -173451, 3576}, { 1400000,    0,    0} },
+                       {1708500, { 3198504, -175931, 3576}, { 1400000,    0,    0} },
+                       {1810500, { 3304747, -179126, 3576}, { 1400000,    0,    0} },
+                       {      0, {       0,       0,    0}, {       0,    0,    0} },
                },
        },
        {
                .speedo_id = 1,
                .process_id = 1,
                .dfll_tune_data  = {
-                       .tune0          = 0x00b0019d,
-                       .tune0_high_mv  = 0x00b0019d,
+                       .tune0          = 0x00b0039d,
+                       .tune0_high_mv  = 0x00b0009d,
                        .tune1          = 0x0000001f,
                        .droop_rate_min = 1000000,
-                       .min_millivolts = 1000,
+                       .tune_high_min_millivolts = 1000,
+                       .min_millivolts = 900,
                },
-               .max_mv = 1250,
+               .max_mv = 1350,
                .freqs_mult = KHZ,
                .speedo_scale = 100,
-               .voltage_scale = 100,
+               .voltage_scale = 1000,
                .cvb_table = {
-                       /*f       dfll: c0,     c1,   c2  pll:  c0,   c1,    c2 */
-                       { 306000, { 107330,  -1569,   0}, {  90000,    0,    0} },
-                       { 408000, { 111250,  -1666,   0}, {  90000,    0,    0} },
-                       { 510000, { 110000,  -1460,   0}, {  94000,    0,    0} },
-                       { 612000, { 117290,  -1745,   0}, {  94000,    0,    0} },
-                       { 714000, { 122700,  -1910,   0}, {  99000,    0,    0} },
-                       { 816000, { 125620,  -1945,   0}, {  99000,    0,    0} },
-                       { 918000, { 130560,  -2076,   0}, { 103000,    0,    0} },
-                       {1020000, { 137280,  -2303,   0}, { 103000,    0,    0} },
-                       {1122000, { 146440,  -2660,   0}, { 109000,    0,    0} },
-                       {1224000, { 152190,  -2825,   0}, { 109000,    0,    0} },
-                       {1326000, { 157520,  -2953,   0}, { 112000,    0,    0} },
-                       {1428000, { 166100,  -3261,   0}, { 140000,    0,    0} },
-                       {1530000, { 176410,  -3647,   0}, { 140000,    0,    0} },
-                       {1632000, { 189620,  -4186,   0}, { 140000,    0,    0} },
-                       {1734000, { 203190,  -4725,   0}, { 140000,    0,    0} },
-                       {1836000, { 222670,  -5573,   0}, { 140000,    0,    0} },
-                       {1938000, { 256210,  -7165,   0}, { 140000,    0,    0} },
-                       {2040000, { 250050,  -6544,   0}, { 140000,    0,    0} },
-                       {      0, {      0,      0,   0}, {      0,    0,    0} },
+                       /*f       dfll:  c0,      c1,    c2  pll:   c0,   c1,    c2 */
+                       { 306000, { 2190643, -141851, 3576}, {  900000,    0,    0} },
+                       { 408000, { 2250968, -144331, 3576}, {  900000,    0,    0} },
+                       { 510000, { 2313333, -146811, 3576}, {  940000,    0,    0} },
+                       { 612000, { 2377738, -149291, 3576}, {  940000,    0,    0} },
+                       { 714000, { 2444183, -151771, 3576}, {  990000,    0,    0} },
+                       { 816000, { 2512669, -154251, 3576}, {  990000,    0,    0} },
+                       { 918000, { 2583194, -156731, 3576}, { 1030000,    0,    0} },
+                       {1020000, { 2655759, -159211, 3576}, { 1030000,    0,    0} },
+                       {1122000, { 2730365, -161691, 3576}, { 1090000,    0,    0} },
+                       {1224000, { 2807010, -164171, 3576}, { 1090000,    0,    0} },
+                       {1326000, { 2885696, -166651, 3576}, { 1120000,    0,    0} },
+                       {1428000, { 2966422, -169131, 3576}, { 1400000,    0,    0} },
+                       {1530000, { 3049183, -171601, 3576}, { 1400000,    0,    0} },
+                       {1606500, { 3112179, -173451, 3576}, { 1400000,    0,    0} },
+                       {1708500, { 3198504, -175931, 3576}, { 1400000,    0,    0} },
+                       {1810500, { 3304747, -179126, 3576}, { 1400000,    0,    0} },
+                       {      0, {       0,       0,    0}, {       0,    0,    0} },
+               },
+       },
+       {
+               .speedo_id = 2,
+               .process_id = -1,
+               .dfll_tune_data  = {
+                       .tune0          = 0x00b0039d,
+                       .tune0_high_mv  = 0x00b0009d,
+                       .tune1          = 0x0000001f,
+                       .droop_rate_min = 1000000,
+                       .tune_high_min_millivolts = 1000,
+                       .min_millivolts = 900,
+               },
+               .max_mv = 1350,
+               .freqs_mult = KHZ,
+               .speedo_scale = 100,
+               .voltage_scale = 1000,
+               .cvb_table = {
+                       /*f       dfll:  c0,      c1,    c2  pll:   c0,   c1,    c2 */
+                       { 306000, { 2190643, -141851, 3576}, {  900000,    0,    0} },
+                       { 408000, { 2250968, -144331, 3576}, {  900000,    0,    0} },
+                       { 510000, { 2313333, -146811, 3576}, {  940000,    0,    0} },
+                       { 612000, { 2377738, -149291, 3576}, {  940000,    0,    0} },
+                       { 714000, { 2444183, -151771, 3576}, {  990000,    0,    0} },
+                       { 816000, { 2512669, -154251, 3576}, {  990000,    0,    0} },
+                       { 918000, { 2583194, -156731, 3576}, { 1030000,    0,    0} },
+                       {1020000, { 2655759, -159211, 3576}, { 1030000,    0,    0} },
+                       {1122000, { 2730365, -161691, 3576}, { 1090000,    0,    0} },
+                       {1224000, { 2807010, -164171, 3576}, { 1090000,    0,    0} },
+                       {1326000, { 2885696, -166651, 3576}, { 1120000,    0,    0} },
+                       {1428000, { 2966422, -169131, 3576}, { 1400000,    0,    0} },
+                       {1530000, { 3049183, -171601, 3576}, { 1400000,    0,    0} },
+                       {1606500, { 3112179, -173451, 3576}, { 1400000,    0,    0} },
+                       {1708500, { 3198504, -175931, 3576}, { 1400000,    0,    0} },
+                       {1810500, { 3304747, -179126, 3576}, { 1400000,    0,    0} },
+                       {1912500, { 3395401, -181606, 3576}, { 1400000,    0,    0} },
+                       {      0, {       0,       0,    0}, {       0,    0,    0} },
                },
        },
 };
index 407cd11..f34e65d 100644 (file)
@@ -95,7 +95,7 @@ static void rev_sku_to_speedo_ids(int rev, int sku)
        case 0x03: /* T40X */
        case 0x04: /* T40T */
                if (!a01)
-                       cpu_speedo_id = 1;
+                       cpu_speedo_id = 2;
                soc_speedo_id = 1;
                threshold_index = 1;
                break;