comparison src/cs/layer1/cust0/l1_rf12.c @ 130:a312d83bb20c

src/cs/layer1/cust0/l1_rf12.[ch]: sync with Magnetite
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 18 Nov 2018 02:40:44 +0000
parents b6a5e36de839
children df9c471ce9e9
comparison
equal deleted inserted replaced
129:3055bcff8050 130:a312d83bb20c
427 427
428 T_RF_BAND rf_band[GSM_BANDS]; //uninitialised rf struct for bands 428 T_RF_BAND rf_band[GSM_BANDS]; //uninitialised rf struct for bands
429 429
430 /* 430 /*
431 * The const T_RF_BAND rf_{900,1800,850,1900} structures that follow 431 * The const T_RF_BAND rf_{900,1800,850,1900} structures that follow
432 * are the versions that appear in the .const section of l1_cust.obj 432 * provide compiled-in defaults for each frequency band. The present
433 * in the l1_custom_int.lib Leonardo blob, used successfully in leo2moko. 433 * FreeCalypso versions of these structs began life as verbatim extracts
434 * As revealed with objgrep, this .const section with these uncalibrated 434 * from Openmoko's l1_cust.obj blob made with our calextract utility,
435 * defaults in it also appears in the moko11 binary - I'm guessing that 435 * providing undisrupted continuity from previous built-from-blobs
436 * Openmoko probably had no source for this part either, and used TI's 436 * firmwares, but have since been modified as follows:
437 * standard Leonardo binary lib. The pretty C formatting presented here
438 * is courtesy of the calextract utility.
439 * 437 *
440 * Late 2017 addition: when building the fw for Compal targets, we use the 438 * - The uncalibrated default g_magic values for all bands have been
441 * ramps tables extracted from C139 firmware, so we run with Tx ramp 439 * set to 200, which is the approximately correct number on FC/OM hw.
442 * templates that are supposed to be correct for the hw we are running on. 440 * The numbers in TI's l1_cust.obj blob delivery were quite obviously
441 * unchanged from Clara RF, and probably weren't even correct for the
442 * original Leonardo, let alone OM.
443 * 443 *
444 * When we build the fw for FreeCalypso targets (not Compal), we use the 444 * - The uncalibrated default Rx and Tx channel calibration tables
445 * original ramps tables from TI which are presumed to be correct for 445 * have been cleaned up. The only sensible default is to set all
446 * Openmoko's RF3166 PA: these compiled-in ramps tables end up 446 * channel corrections to neutral (0 for Rx and 128 for Tx), which the
447 * in the FFS of our shipping products when our production calibration 447 * original blob versions already did, but many of those copy-n-pasted
448 * station (or more precisely, fc-rfcal-txband) issues the me 104 command. 448 * tables had ARFCNs that are invalid for the band they are supposed
449 * to apply to. The latter bug has been fixed.
449 * 450 *
450 * For the Pirelli target the compiled-in ramps tables do not matter 451 * - For the Tx ramps tables we now select between two different versions
451 * as we use the ramps tables from Pirelli's factory data block on this 452 * at compile time: for Mot C1xx targets (CONFIG_TARGET_COMPAL) we use
452 * target, courtesy of the fc-fsio pirelli-magnetite-init command. 453 * the version extracted from Mot's official C139 fw, whereas for all
454 * other targets (principally FreeCalypso hw) we continue to use the
455 * version extracted from OM's l1_cust.obj blob.
456 *
457 * NONE of these compiled-in tables matter if you are running the fw
458 * on an Openmoko, Pirelli or FreeCalypso device that has already been
459 * fully calibrated at the respective factory: in all of these cases
460 * all of these compiled-in tables are fully overridden by the factory-
461 * calibrated ones read from FFS, or in the Pirelli DP-L10 case,
462 * read from Pirelli's factory data block and written into FreeCalypso FFS
463 * by the pirelli-magnetite-init command you are supposed to issue
464 * in fc-fsio when you set up FC on this target. Instead these
465 * compiled-in tables matter in the following use cases:
466 *
467 * - When FC fw is run on a Mot C1xx phone, our c1xx-calextr tool
468 * generates Rx agcparams, Rx channel calibration and Tx levels tables
469 * from Motorola's factory bits, but for the Tx ramp templates the tables
470 * compiled into our fw are used - hence these tables need to be correct
471 * for the target in question, which is why we have extracted and included
472 * the tables from Mot C139 official fw. We also weren't able to grok
473 * Mot's way of doing Tx channel corrections, hence we run without those
474 * - thus we rely on the compiled-in channel calibration tables providing
475 * a neutral set of correction values.
476 *
477 * - Firmware images that are programmed into newly made FreeCalypso hw
478 * devices in the factory production environment prior to RF calibration
479 * need to have correct Tx ramp template tables in them, as well as
480 * indices in the Tx levels tables pointing to these ramps, plus the
481 * other 3 values in the T_RX_CAL_PARAMS structure besides g_magic:
482 * while all other table bits are generated from scratch by our
483 * fc-rfcal-rxband and fc-rfcal-txband programs without regard to
484 * any previous compiled-in values, the just-listed tables and fields
485 * are unchanged by the calibration procedure and must already be
486 * correct prior to it.
487 *
488 * The compiled-in default Tx levels tables have been kept unchanged
489 * from the original extracts from OM's l1_cust.obj blob. There is
490 * no point in changing these tables because they are nothing but dummy
491 * placeholders in reality: these tables absolutely MUST be calibrated
492 * for the individual device unit before that device can be used safely
493 * on public land mobile networks (if you are not doing your own RF
494 * calibration, you need to extract and apply the original manufacturer's
495 * calibration records, like our c1xx-calextr and pirelli-magnetite-init
496 * tools do), and if the compiled-in tables are nothing but placeholders,
497 * it would be rather moot to argue whether set of numbers A or set of
498 * numbers B would make a better placeholder.
499 *
500 * For the Tx ramp templates on our newly made FreeCalypso hw we currently
501 * use the ramps tables extracted from OM's l1_cust.obj blob: they were
502 * used by OM, and our current RF hw is unchanged from OM GTA02. However,
503 * these Tx ramp templates are currently only *assumed* to be correct,
504 * and no actual testing has been done yet - these Tx power ramps will
505 * need to be revisited and tested empirically before we apply for type
506 * approval certification.
453 */ 507 */
454
455 #if (ORDER2_TX_TEMP_CAL != 1)
456 #error "Hard-coded T_RF_BAND structs expect ORDER2_TX_TEMP_CAL to be 1"
457 #endif
458 508
459 const T_RF_BAND rf_900 = { 509 const T_RF_BAND rf_900 = {
460 { /* Rx structure */ 510 { /* Rx structure */
461 { /* T_RX_CAL_PARAMS */ 511 { /* T_RX_CAL_PARAMS */
462 193, 512 200,
463 40, 513 40,
464 40, 514 40,
465 44, 515 44,
466 }, 516 },
467 { /* T_RF_AGC_BANDs */ 517 { /* T_RF_AGC_BANDs */
471 { 71, 0}, 521 { 71, 0},
472 { 90, 0}, 522 { 90, 0},
473 { 112, 0}, 523 { 112, 0},
474 { 124, 0}, 524 { 124, 0},
475 { 991, 0}, 525 { 991, 0},
476 { 992, 0}, 526 { 1009, 0},
477 { 1023, 0}, 527 { 1023, 0},
478 }, 528 },
479 { /* Rx temperature compensation */ 529 { /* Rx temperature compensation */
480 { -15, 0}, 530 { -15, 0},
481 { -5, 0}, 531 { -5, 0},
567 { 1023, 128}, 617 { 1023, 128},
568 }, 618 },
569 }, 619 },
570 { /* ramps */ 620 { /* ramps */
571 #ifdef CONFIG_TARGET_COMPAL 621 #ifdef CONFIG_TARGET_COMPAL
622 /* from Mot C139 official fw */
572 { /* profile 0 */ 623 { /* profile 0 */
573 /* ramp-up */ 624 /* ramp-up */
574 { 0, 0, 2, 0, 0, 0, 0, 0, 13, 24, 24, 25, 26, 14, 0, 0}, 625 { 0, 0, 2, 0, 0, 0, 0, 0, 13, 24, 24, 25, 26, 14, 0, 0},
575 /* ramp-down */ 626 /* ramp-down */
576 { 31, 31, 31, 31, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 627 { 31, 31, 31, 31, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
664 { 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 31, 31, 31, 5, 0, 0}, 715 { 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 31, 31, 31, 5, 0, 0},
665 /* ramp-down */ 716 /* ramp-down */
666 { 31, 31, 31, 31, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 717 { 31, 31, 31, 31, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
667 }, 718 },
668 #else 719 #else
720 /* TI/Openmoko version */
669 { /* profile 0 */ 721 { /* profile 0 */
670 /* ramp-up */ 722 /* ramp-up */
671 { 0, 0, 0, 0, 0, 0, 0, 0, 9, 18, 25, 31, 30, 15, 0, 0}, 723 { 0, 0, 0, 0, 0, 0, 0, 0, 9, 18, 25, 31, 30, 15, 0, 0},
672 /* ramp-down */ 724 /* ramp-down */
673 { 0, 11, 31, 31, 31, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 725 { 0, 11, 31, 31, 31, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
763 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 815 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
764 }, 816 },
765 #endif 817 #endif
766 }, 818 },
767 { /* Tx temperature compensation */ 819 { /* Tx temperature compensation */
768 { -11, 0, 0, 0}, 820 #if (ORDER2_TX_TEMP_CAL==1)
769 { 9, 0, 0, 0}, 821 { -11, 0, 0, 0 },
770 { 39, 0, 0, 0}, 822 { +9, 0, 0, 0 },
771 { 59, 0, 0, 0}, 823 { +39, 0, 0, 0 },
772 { 127, 0, 0, 0}, 824 { +59, 0, 0, 0 },
825 { 127, 0, 0, 0 }
826 #else
827 { -11, 0 },
828 { +9, 0 },
829 { +39, 0 },
830 { +59, 0 },
831 { 127, 0 }
832 #endif
773 }, 833 },
774 }, 834 },
775 //IQ swap 835 //IQ swap
776 SWAP_IQ_GSM, 836 SWAP_IQ_GSM,
777 }; 837 };
778 838
779 const T_RF_BAND rf_1800 = { 839 const T_RF_BAND rf_1800 = {
780 { /* Rx structure */ 840 { /* Rx structure */
781 { /* T_RX_CAL_PARAMS */ 841 { /* T_RX_CAL_PARAMS */
782 188, 842 200,
783 40, 843 40,
784 40, 844 40,
785 44, 845 44,
786 }, 846 },
787 { /* T_RF_AGC_BANDs */ 847 { /* T_RF_AGC_BANDs */
790 { 680, 0}, 850 { 680, 0},
791 { 745, 0}, 851 { 745, 0},
792 { 812, 0}, 852 { 812, 0},
793 { 860, 0}, 853 { 860, 0},
794 { 885, 0}, 854 { 885, 0},
795 { 991, 0}, 855 { 0, 0},
796 { 992, 0}, 856 { 0, 0},
797 { 1023, 0}, 857 { 0, 0},
798 }, 858 },
799 { /* Rx temperature compensation */ 859 { /* Rx temperature compensation */
800 { -15, 0}, 860 { -15, 0},
801 { -5, 0}, 861 { -5, 0},
802 { 6, 0}, 862 { 6, 0},
887 { 885, 128}, 947 { 885, 128},
888 }, 948 },
889 }, 949 },
890 { /* ramps */ 950 { /* ramps */
891 #ifdef CONFIG_TARGET_COMPAL 951 #ifdef CONFIG_TARGET_COMPAL
952 /* from Mot C139 official fw */
892 { /* profile 0 */ 953 { /* profile 0 */
893 /* ramp-up */ 954 /* ramp-up */
894 { 6, 0, 0, 0, 0, 0, 0, 0, 0, 26, 26, 30, 30, 10, 0, 0}, 955 { 6, 0, 0, 0, 0, 0, 0, 0, 0, 26, 26, 30, 30, 10, 0, 0},
895 /* ramp-down */ 956 /* ramp-down */
896 { 31, 31, 31, 31, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 957 { 31, 31, 31, 31, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
984 { 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 30, 30, 7, 0, 0}, 1045 { 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 30, 30, 7, 0, 0},
985 /* ramp-down */ 1046 /* ramp-down */
986 { 31, 31, 31, 31, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1047 { 31, 31, 31, 31, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
987 }, 1048 },
988 #else 1049 #else
1050 /* TI/Openmoko version */
989 { /* profile 0 */ 1051 { /* profile 0 */
990 /* ramp-up */ 1052 /* ramp-up */
991 { 0, 0, 0, 0, 0, 0, 2, 3, 5, 16, 31, 31, 31, 9, 0, 0}, 1053 { 0, 0, 0, 0, 0, 0, 2, 3, 5, 16, 31, 31, 31, 9, 0, 0},
992 /* ramp-down */ 1054 /* ramp-down */
993 { 0, 11, 31, 31, 31, 10, 11, 3, 0, 0, 0, 0, 0, 0, 0, 0}, 1055 { 0, 11, 31, 31, 31, 10, 11, 3, 0, 0, 0, 0, 0, 0, 0, 0},
1083 { 0, 0, 4, 31, 31, 25, 5, 0, 5, 26, 1, 0, 0, 0, 0, 0}, 1145 { 0, 0, 4, 31, 31, 25, 5, 0, 5, 26, 1, 0, 0, 0, 0, 0},
1084 }, 1146 },
1085 #endif 1147 #endif
1086 }, 1148 },
1087 { /* Tx temperature compensation */ 1149 { /* Tx temperature compensation */
1088 { -11, 0, 0, 0}, 1150 #if (ORDER2_TX_TEMP_CAL==1)
1089 { 9, 0, 0, 0}, 1151 { -11, 0, 0, 0 },
1090 { 39, 0, 0, 0}, 1152 { +9, 0, 0, 0 },
1091 { 59, 0, 0, 0}, 1153 { +39, 0, 0, 0 },
1092 { 127, 0, 0, 0}, 1154 { +59, 0, 0, 0 },
1155 { 127, 0, 0, 0 }
1156 #else
1157 { -11, 0 },
1158 { +9, 0 },
1159 { +39, 0 },
1160 { +59, 0 },
1161 { 127, 0 }
1162 #endif
1093 }, 1163 },
1094 }, 1164 },
1095 //IQ swap 1165 //IQ swap
1096 SWAP_IQ_DCS 1166 SWAP_IQ_DCS
1097 }; 1167 };
1098 1168
1099 const T_RF_BAND rf_850 = { 1169 const T_RF_BAND rf_850 = {
1100 { /* Rx structure */ 1170 { /* Rx structure */
1101 { /* T_RX_CAL_PARAMS */ 1171 { /* T_RX_CAL_PARAMS */
1102 181, 1172 200,
1103 40, 1173 40,
1104 40, 1174 40,
1105 44, 1175 44,
1106 }, 1176 },
1107 { /* T_RF_AGC_BANDs */ 1177 { /* T_RF_AGC_BANDs */
1108 { 10, 0}, 1178 { 138, 0},
1109 { 30, 0}, 1179 { 157, 0},
1110 { 51, 0}, 1180 { 178, 0},
1111 { 71, 0}, 1181 { 199, 0},
1112 { 90, 0}, 1182 { 217, 0},
1113 { 112, 0}, 1183 { 239, 0},
1114 { 124, 0}, 1184 { 251, 0},
1115 { 991, 0}, 1185 { 0, 0},
1116 { 992, 0}, 1186 { 0, 0},
1117 { 1023, 0}, 1187 { 0, 0},
1118 }, 1188 },
1119 { /* Rx temperature compensation */ 1189 { /* Rx temperature compensation */
1120 { -15, 0}, 1190 { -15, 0},
1121 { -5, 0}, 1191 { -5, 0},
1122 { 6, 0}, 1192 { 6, 0},
1165 { 29, 14, 0}, /* 30 */ 1235 { 29, 14, 0}, /* 30 */
1166 { 29, 14, 0}, /* 31 */ 1236 { 29, 14, 0}, /* 31 */
1167 }, 1237 },
1168 { /* channel calibration tables */ 1238 { /* channel calibration tables */
1169 { /* calibration table 0 */ 1239 { /* calibration table 0 */
1170 { 40, 128}, 1240 { 134, 128},
1171 { 80, 128}, 1241 { 150, 128},
1172 { 124, 128}, 1242 { 166, 128},
1173 { 586, 128}, 1243 { 182, 128},
1174 { 661, 128}, 1244 { 197, 128},
1175 { 736, 128}, 1245 { 213, 128},
1176 { 885, 128}, 1246 { 229, 128},
1177 { 1023, 128}, 1247 { 251, 128},
1178 }, 1248 },
1179 { /* calibration table 1 */ 1249 { /* calibration table 1 */
1180 #if 0 1250 { 134, 128},
1181 /* 1251 { 150, 128},
1182 * This bogon appears in the l1_custom_int.lib Leonardo blob 1252 { 166, 128},
1183 * and in Openmoko's official firmwares, from which it has 1253 { 182, 128},
1184 * propagated into the /gsm/rf/tx/calchan.850 file programmed 1254 { 197, 128},
1185 * into every produced GTA02 unit, or at least the units 1255 { 213, 128},
1186 * without the 850 MHz band. It also appears in the MV100 version 1256 { 229, 128},
1187 * of l1_rf12.c and in the "dead" rf_850 table in Pirelli's fw 1257 { 251, 128},
1188 * binary. Whew!
1189 */
1190 { 554, 130},
1191 { 722, 128},
1192 { 746, 129},
1193 { 774, 131},
1194 { 808, 132},
1195 { 851, 134},
1196 { 870, 138},
1197 { 885, 140},
1198 #else
1199 /* make it the same as the others */
1200 { 40, 128},
1201 { 80, 128},
1202 { 124, 128},
1203 { 586, 128},
1204 { 661, 128},
1205 { 736, 128},
1206 { 885, 128},
1207 { 1023, 128},
1208 #endif
1209 }, 1258 },
1210 { /* calibration table 2 */ 1259 { /* calibration table 2 */
1211 { 40, 128}, 1260 { 134, 128},
1212 { 80, 128}, 1261 { 150, 128},
1213 { 124, 128}, 1262 { 166, 128},
1214 { 586, 128}, 1263 { 182, 128},
1215 { 661, 128}, 1264 { 197, 128},
1216 { 736, 128}, 1265 { 213, 128},
1217 { 885, 128}, 1266 { 229, 128},
1218 { 1023, 128}, 1267 { 251, 128},
1219 }, 1268 },
1220 { /* calibration table 3 */ 1269 { /* calibration table 3 */
1221 { 40, 128}, 1270 { 134, 128},
1222 { 80, 128}, 1271 { 150, 128},
1223 { 124, 128}, 1272 { 166, 128},
1224 { 586, 128}, 1273 { 182, 128},
1225 { 661, 128}, 1274 { 197, 128},
1226 { 736, 128}, 1275 { 213, 128},
1227 { 885, 128}, 1276 { 229, 128},
1228 { 1023, 128}, 1277 { 251, 128},
1229 }, 1278 },
1230 }, 1279 },
1231 { /* ramps */ 1280 { /* ramps */
1232 #ifdef CONFIG_TARGET_COMPAL 1281 #ifdef CONFIG_TARGET_COMPAL
1282 /* from Mot C139 official fw */
1233 { /* profile 0 */ 1283 { /* profile 0 */
1234 /* ramp-up */ 1284 /* ramp-up */
1235 { 0, 0, 3, 0, 0, 0, 0, 0, 2, 31, 30, 31, 31, 0, 0, 0}, 1285 { 0, 0, 3, 0, 0, 0, 0, 0, 2, 31, 30, 31, 31, 0, 0, 0},
1236 /* ramp-down */ 1286 /* ramp-down */
1237 { 20, 21, 31, 26, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1287 { 20, 21, 31, 26, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1325 { 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 31, 31, 31, 7, 0, 0}, 1375 { 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 31, 31, 31, 7, 0, 0},
1326 /* ramp-down */ 1376 /* ramp-down */
1327 { 31, 31, 31, 31, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1377 { 31, 31, 31, 31, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1328 }, 1378 },
1329 #else 1379 #else
1380 /* TI/Openmoko version */
1330 { /* profile 0 */ 1381 { /* profile 0 */
1331 /* ramp-up */ 1382 /* ramp-up */
1332 { 0, 0, 0, 0, 0, 0, 0, 0, 9, 18, 25, 31, 30, 15, 0, 0}, 1383 { 0, 0, 0, 0, 0, 0, 0, 0, 9, 18, 25, 31, 30, 15, 0, 0},
1333 /* ramp-down */ 1384 /* ramp-down */
1334 { 0, 11, 31, 31, 31, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1385 { 0, 11, 31, 31, 31, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1424 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1475 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1425 }, 1476 },
1426 #endif 1477 #endif
1427 }, 1478 },
1428 { /* Tx temperature compensation */ 1479 { /* Tx temperature compensation */
1429 { -11, 0, 0, 0}, 1480 #if (ORDER2_TX_TEMP_CAL==1)
1430 { 9, 0, 0, 0}, 1481 { -11, 0, 0, 0 },
1431 { 39, 0, 0, 0}, 1482 { +9, 0, 0, 0 },
1432 { 59, 0, 0, 0}, 1483 { +39, 0, 0, 0 },
1433 { 127, 0, 0, 0}, 1484 { +59, 0, 0, 0 },
1485 { 127, 0, 0, 0 }
1486 #else
1487 { -11, 0 },
1488 { +9, 0 },
1489 { +39, 0 },
1490 { +59, 0 },
1491 { 127, 0 }
1492 #endif
1434 }, 1493 },
1435 }, 1494 },
1436 //IQ swap 1495 //IQ swap
1437 SWAP_IQ_GSM850, 1496 SWAP_IQ_GSM850,
1438 }; 1497 };
1439 1498
1440 const T_RF_BAND rf_1900 = { 1499 const T_RF_BAND rf_1900 = {
1441 { /* Rx structure */ 1500 { /* Rx structure */
1442 { /* T_RX_CAL_PARAMS */ 1501 { /* T_RX_CAL_PARAMS */
1443 188, 1502 200,
1444 40, 1503 40,
1445 40, 1504 40,
1446 44, 1505 44,
1447 }, 1506 },
1448 { /* T_RF_AGC_BANDs */ 1507 { /* T_RF_AGC_BANDs */
1449 { 548, 0}, 1508 { 548, 0},
1450 { 622, 0}, 1509 { 622, 0},
1451 { 680, 0}, 1510 { 680, 0},
1452 { 745, 0}, 1511 { 745, 0},
1453 { 812, 0}, 1512 { 795, 0},
1454 { 860, 0}, 1513 { 810, 0},
1455 { 885, 0}, 1514 { 0, 0},
1456 { 991, 0}, 1515 { 0, 0},
1457 { 992, 0}, 1516 { 0, 0},
1458 { 1023, 0}, 1517 { 0, 0},
1459 }, 1518 },
1460 { /* Rx temperature compensation */ 1519 { /* Rx temperature compensation */
1461 { -15, 0}, 1520 { -15, 0},
1462 { -5, 0}, 1521 { -5, 0},
1463 { 6, 0}, 1522 { 6, 0},
1548 { 810, 128}, 1607 { 810, 128},
1549 }, 1608 },
1550 }, 1609 },
1551 { /* ramps */ 1610 { /* ramps */
1552 #ifdef CONFIG_TARGET_COMPAL 1611 #ifdef CONFIG_TARGET_COMPAL
1612 /* from Mot C139 official fw */
1553 { /* profile 0 */ 1613 { /* profile 0 */
1554 /* ramp-up */ 1614 /* ramp-up */
1555 { 10, 0, 0, 0, 0, 0, 0, 0, 6, 15, 31, 31, 23, 12, 0, 0}, 1615 { 10, 0, 0, 0, 0, 0, 0, 0, 6, 15, 31, 31, 23, 12, 0, 0},
1556 /* ramp-down */ 1616 /* ramp-down */
1557 { 31, 31, 27, 27, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1617 { 31, 31, 27, 27, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1645 { 23, 0, 0, 0, 0, 0, 0, 0, 0, 25, 31, 31, 31, 7, 0, 0}, 1705 { 23, 0, 0, 0, 0, 0, 0, 0, 0, 25, 31, 31, 31, 7, 0, 0},
1646 /* ramp-down */ 1706 /* ramp-down */
1647 { 31, 31, 31, 31, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1707 { 31, 31, 31, 31, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1648 }, 1708 },
1649 #else 1709 #else
1710 /* TI/Openmoko version */
1650 { /* profile 0 */ 1711 { /* profile 0 */
1651 /* ramp-up */ 1712 /* ramp-up */
1652 { 0, 0, 0, 0, 0, 0, 7, 0, 0, 16, 31, 31, 31, 12, 0, 0}, 1713 { 0, 0, 0, 0, 0, 0, 7, 0, 0, 16, 31, 31, 31, 12, 0, 0},
1653 /* ramp-down */ 1714 /* ramp-down */
1654 { 0, 13, 31, 31, 31, 18, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0}, 1715 { 0, 13, 31, 31, 31, 18, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0},
1744 { 0, 0, 8, 31, 31, 22, 5, 0, 31, 0, 0, 0, 0, 0, 0, 0}, 1805 { 0, 0, 8, 31, 31, 22, 5, 0, 31, 0, 0, 0, 0, 0, 0, 0},
1745 }, 1806 },
1746 #endif 1807 #endif
1747 }, 1808 },
1748 { /* Tx temperature compensation */ 1809 { /* Tx temperature compensation */
1749 { -11, 0, 0, 0}, 1810 #if (ORDER2_TX_TEMP_CAL==1)
1750 { 9, 0, 0, 0}, 1811 { -11, 0, 0, 0 },
1751 { 39, 0, 0, 0}, 1812 { +9, 0, 0, 0 },
1752 { 59, 0, 0, 0}, 1813 { +39, 0, 0, 0 },
1753 { 127, 0, 0, 0}, 1814 { +59, 0, 0, 0 },
1815 { 127, 0, 0, 0 }
1816 #else
1817 { -11, 0 },
1818 { +9, 0 },
1819 { +39, 0 },
1820 { +59, 0 },
1821 { 127, 0 }
1822 #endif
1754 }, 1823 },
1755 }, 1824 },
1756 //IQ swap 1825 //IQ swap
1757 SWAP_IQ_PCS 1826 SWAP_IQ_PCS
1758 }; 1827 };