FreeCalypso > hg > fc-magnetite
comparison src/cs/drivers/drv_app/ffs/board/dev.c @ 557:7aad22344e77
flash autodetection made to work on FC and Pirelli targets
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 11 Dec 2018 07:37:44 +0000 |
parents | b48e9892ee65 |
children | ddaa0263ea8e |
comparison
equal
deleted
inserted
replaced
556:39a226a06196 | 557:7aad22344e77 |
---|---|
126 { 0x780000, 18 }, | 126 { 0x780000, 18 }, |
127 { 0x7C0000, 18 } | 127 { 0x7C0000, 18 } |
128 }; | 128 }; |
129 #endif | 129 #endif |
130 | 130 |
131 #ifdef CONFIG_TARGET_LEONARDO | 131 #if defined(CONFIG_TARGET_LEONARDO) || defined(CONFIG_TARGET_PIRELLI) || \ |
132 defined(CONFIG_TARGET_FCFAM) | |
132 // 128x64kb | 133 // 128x64kb |
133 static const struct block_info_s flash_128x64[] = | 134 static const struct block_info_s flash_128x64[] = |
134 { | 135 { |
135 { 0x00000, 16 }, | 136 { 0x00000, 16 }, |
136 { 0x10000, 16 }, | 137 { 0x10000, 16 }, |
357 FFS_DRIVER_RAM, 8}, | 358 FFS_DRIVER_RAM, 8}, |
358 #endif | 359 #endif |
359 | 360 |
360 #ifdef CONFIG_TARGET_PIRELLI | 361 #ifdef CONFIG_TARGET_PIRELLI |
361 | 362 |
362 // Spansion S71PL129NC0 used in Pirelli DP-L10 | 363 /* |
363 // ID made up (same as what Pirelli's fw uses), not using autodetect | 364 * Our familiar version of the Pirelli DP-L10 hw features Spansion |
364 // This is an aftermarket FFS config for the Pirelli target | 365 * S71PL129NC0HFW4B flash (N version, 256 KiB sectors), but apparently |
366 * an earlier hw version had S71PL-J flash with 64 KiB sectors, | |
367 * and Pirelli's official fw supports both. They have modified | |
368 * TI's flash ID code to generate device ID 0x2100 for the J version | |
369 * or 0x2101 for the N version. We have now replicated this ID logic | |
370 * in our FreeCalypso code base, and we can now support both flash | |
371 * chip versions as well. | |
372 * | |
373 * Our FFS configuration for the Pirelli target is aftermarket. | |
374 */ | |
375 | |
376 /* J flash */ | |
377 { &flash_128x64[0], (char *) 0x02480000, MANUFACT_AMD, 0x2100, | |
378 FFS_DRIVER_AMD, 24 }, | |
379 | |
380 /* N flash */ | |
365 { &flash_32x256[0], (char *) 0x02480000, MANUFACT_AMD, 0x2101, | 381 { &flash_32x256[0], (char *) 0x02480000, MANUFACT_AMD, 0x2101, |
366 FFS_DRIVER_AMD, 6 }, | 382 FFS_DRIVER_AMD, 6 }, |
367 | 383 |
368 #elif defined(CONFIG_TARGET_FCFAM) | 384 #elif defined(CONFIG_TARGET_FCFAM) |
369 | 385 |
370 // We are using the same flash+pSRAM chip in our own | 386 /* |
371 // FreeCalypso hardware designs, but on a different chip select. | 387 * Our FreeCalypso hardware family is currently in its infancy |
372 // Let's use the first 2 MiB of the 2nd bank for the FFS. | 388 * (we have only one board design so far, but hoping to have more), |
389 * thus the set of possible flash chip types on FC hw platforms | |
390 * is expected to grow. The footprint on our current FCDEV3B PCB | |
391 * ideally fits Spansion MCPs with two chip select banks (either | |
392 * S71PL-J or S71PL-N), but can also be fitted with Openmoko's | |
393 * Samsung K5A3281. Spansion S71PL129NC0HFW4B (copied from the | |
394 * Pirelli DP-L10) is our official flash+RAM chip, populated on | |
395 * our production boards, but now that we have fixed TI's autodetect | |
396 * code to work with the newer Spansion chips, we can support | |
397 * all 3 possibilities in our fw with autodetection: S71PL-J, | |
398 * S71PL-N or K5A32xx. | |
399 * | |
400 * For future FreeCalypso hw designs, the Mother's plan is to | |
401 * keep the high-capacity S71PL129NC0HFW4B for the handset prototype | |
402 * and UI development board, but for embedded modem products | |
403 * we will probably switch to Openmoko's K5A32xx. | |
404 */ | |
405 | |
406 /* S71PL-N, FreeCalypso official, FFS in the first 2 MiB of the 2nd bank */ | |
373 { &flash_32x256[0], (char *) 0x01800000, MANUFACT_AMD, 0x2101, | 407 { &flash_32x256[0], (char *) 0x01800000, MANUFACT_AMD, 0x2101, |
374 FFS_DRIVER_AMD, 8 }, | 408 FFS_DRIVER_AMD, 8 }, |
409 | |
410 /* S71PL-J, currently only theoretical */ | |
411 { &flash_128x64[0], (char *) 0x01800000, MANUFACT_AMD, 0x2100, | |
412 FFS_DRIVER_AMD, 32 }, | |
413 | |
414 /* K5A32xxCTM from Openmoko */ | |
415 { &flash_16x64[0], (char *) 0x380000, MANUFACT_SAMSUNG, 0x22A0, | |
416 FFS_DRIVER_AMD, 7 }, | |
375 | 417 |
376 #elif defined(CONFIG_TARGET_COMPAL) | 418 #elif defined(CONFIG_TARGET_COMPAL) |
377 | 419 |
378 /* aftermarket FFS configurations for FreeCalypso on Mot C1xx phones */ | 420 /* aftermarket FFS configurations for FreeCalypso on Mot C1xx phones */ |
379 | 421 |