diff src/cs/drivers/drv_app/ffs/board/dev.c @ 642:a6b7f63d94f1

FFS dev.c for FCFAM: better comments, S71PL064J added
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 31 Jan 2020 02:52:29 +0000
parents cab2f315827e
children b2b502339787
line wrap: on
line diff
--- a/src/cs/drivers/drv_app/ffs/board/dev.c	Fri Jan 31 00:49:16 2020 +0000
+++ b/src/cs/drivers/drv_app/ffs/board/dev.c	Fri Jan 31 02:52:29 2020 +0000
@@ -360,7 +360,7 @@
     /*
      * Our familiar version of the Pirelli DP-L10 hw features Spansion
      * S71PL129NC0HFW4B flash (N version, 256 KiB sectors), but apparently
-     * an earlier hw version had S71PL-J flash with 64 KiB sectors,
+     * an earlier hw version had S71PL129J flash with 64 KiB sectors,
      * and Pirelli's official fw supports both.  They have modified
      * TI's flash ID code to generate device ID 0x2100 for the J version
      * or 0x2101 for the N version.  We have now replicated this ID logic
@@ -381,37 +381,46 @@
 #elif defined(CONFIG_TARGET_FCFAM)
 
     /*
-     * Our FreeCalypso hardware family is currently in its infancy
-     * (we have only one board design so far, but hoping to have more),
-     * thus the set of possible flash chip types on FC hw platforms
-     * is expected to grow.  The footprint on our current FCDEV3B PCB
-     * ideally fits Spansion MCPs with two chip select banks (either
-     * S71PL-J or S71PL-N), but can also be fitted with Openmoko's
-     * Samsung K5A3281.  Spansion S71PL129NC0HFW4B (copied from the
-     * Pirelli DP-L10) is our official flash+RAM chip, populated on
-     * our production boards, but now that we have fixed TI's autodetect
-     * code to work with the newer Spansion chips, we can support
-     * all 3 possibilities in our fw with autodetection: S71PL-J,
-     * S71PL-N or K5A32xx.
+     * This table of flash devices covers those possibilities that may occur
+     * on FreeCalypso-branded hardware; we use a new table separate from the
+     * one we inherited from TI/Openmoko.  Originally we had no choice because
+     * we had no working autodetection for our new S71PL129N flash; we now have
+     * working autodetection, but we still use a separate device table for a
+     * few reasons:
      *
-     * For future FreeCalypso hw designs, the Mother's plan is to
-     * keep the high-capacity S71PL129NC0HFW4B for the handset prototype
-     * and UI development board, but for embedded modem products
-     * we will probably switch to Openmoko's K5A32xx.
+     * 1) Our 16 MiB flash options (S71PL129N and S71PL129J) are specific
+     *    to CONFIG_TARGET_FCFAM;
+     *
+     * 2) We gain additional freedoms like having a different FFS config
+     *    for K5A32xxCTM flash in FCFAM vs. Openmoko;
+     *
+     * 3) Less clutter is always good.
      */
 
-    /* S71PL-N, FreeCalypso official, FFS in the first 2 MiB of the 2nd bank */
+    /* S71PL129N, current FCDEV3B hw, FFS in the first 2 MiB of the 2nd bank */
     { &flash_32x256[0], (char *) 0x01800000, MANUFACT_AMD,     0x2101,
       FFS_DRIVER_AMD,  8 },
 
-    /* S71PL-J, currently only theoretical */
+    /* S71PL129J, currently only theoretical */
     { &flash_128x64[0], (char *) 0x01800000, MANUFACT_AMD,     0x2100,
       FFS_DRIVER_AMD, 32 },
 
+    /* S71PL064J, 7x9 mm, attractive option for tight physical form factors */
+    { &flash_16x64[0], (char *) 0x700000, MANUFACT_AMD,     0x0201,
+      FFS_DRIVER_AMD, 15 },
+
     /*
-     * K5A32xxCTM from Openmoko, but note our different FFS config:
-     * if we are going to put this smaller flash chip into our embedded
-     * modem products, let's use it efficiently.
+     * Prior to the discovery of S71PL064J as a superior alternative, we were
+     * thinking about using Samsung K5A32xx from Openmoko in embedded modem
+     * products that have no need for huge flash and XRAM.  Now that we have
+     * discovered S71PL064J which is both physically smaller and friendlier in
+     * terms of BGA footprint, it is unlikely that we will go back to K5A32xx.
+     * However, we do have one FCDEV3B board on which we populated a K5A3281CTM
+     * chip, so we are keeping firmware support for it.
+     *
+     * Note that the FFS configuration is different from Openmoko's: the
+     * thinking was that if we were going to use this chip, let's use it
+     * efficiently.
      */
     { &flash_16x64[0], (char *) 0x300000, MANUFACT_SAMSUNG, 0x22A0,
       FFS_DRIVER_AMD, 15 },
@@ -451,6 +460,7 @@
 #else
 
     /* original table from TI/Openmoko, used on TI and Openmoko targets */
+    /* also used on the newly discovered GTM900 and Tango modem targets */
 
     /********** AMD Devices ***********************************************/