In my attempts to make something similar to the Linuxstamp II board, I have used a Micron SDRAM chip MT48LC64M4A2 and connected up exactly the same way as the reference board.
However, my SDRAM doesn't seem to be working properly. I am using the AT91 bootstrap program and have changed the SDRAM parameters to the following:
/* Initialize the matrix (memory voltage = 3.3) */
//writel((readl(AT91C_BASE_CCFG + CCFG_EBICSA)) | AT91C_EBI_CS1A_SDRAMC | (1<<16), AT91C_BASE_CCFG + CCFG_EBICSA);
0x00000002 | // EBI_CS1A = 1 ==> SDRAM for Chip Select 1
0x00000100 | // EBI_DBPUC = 1 ==> data pins are not pulled up
0x00010000; // VDDIOMSEL = 1 ==> 3.3V SDRAM
writel(ebi_csa_value, AT91C_BASE_CCFG + CCFG_EBICSA);
dbg_print("Initialising SDRAM controller.\n\r");
unsigned int sdram_config_value =
/* Configure SDRAM Controller */
1020, // every 7.8us
dbg_print("SDRAM initialisation process finished.\n\r");
#endif /* CFG_SDRAM */
However, when I write my test pattern of 0xdeadbeef (or any other pattern) to addresses starting at 0x20000000 it only seems to store the occasional bit/byte of what I am writing. Any ideas about what might be wrong with the parameters above?
Also, should the pull-ups on the data bus be used or not - the default configuration doesn't appear to turn them off as far as I can see.
My master clock speed is 130 MHz, but I have gone as low as 80 MHz and it doesn't appear to make much difference.