We're developing a custom board based on the LS1021A-TWR. It has an Arria 5 GZ FPGA is attached to the ARM processor's IFC bus and we are currently trying to enable Chip Select 3 to interface with the FPGA using Generic ASIC protocol. We're u-booting from NOR Flash and I've added the following to our ls1021atwr.h file for our configuration:
#define CONFIG_SYS_FPGA_FLASH2 0x70000000
#define CONFIG_SYS_CSPR3_EXT (0x0)
#define CONFIG_SYS_CSPR3 (CSPR_PHYS_ADDR(CONFIG_SYS_FPGA_FLASH2) | \
CSPR_PORT_SIZE_16 | \
CSPR_MSEL_GPCM | \
CSPR_V)
#define CONFIG_SYS_AMASK3 IFC_AMASK(32 * 1024 * 1024)
#define CONFIG_SYS_CSOR3 (CSOR_NOR_ADM_SHIFT(4) | \
CSOR_GPCM_GPMODE_ASIC | \
CSOR_GPCM_GPTO(256) | \
CSOR_GPCM_GAPERRD(1) | \
CSOR_GPCM_TRHZ_20)
#define CONFIG_SYS_CS3_FTIM0 (FTIM0_GPCM_TACSE(0x1) | \
FTIM0_GPCM_TEADC(0x01) | \
FTIM0_GPCM_TEAHC(0xff))
#define CONFIG_SYS_CS3_FTIM1 (FTIM1_GPCM_TACO(0x01) | \
FTIM1_GPCM_TRAD(0x21))
#define CONFIG_SYS_CS3_FTIM2 (FTIM2_GPCM_TCS(0x01) | \
FTIM2_GPCM_TCH(0x1) | \
FTIM2_GPCM_TWP(0x21))
#define CONFIG_SYS_CS3_FTIM3 FTIM3_NAND_TWW(0x3)
I'm successfully running u-boot, however, when I try to read or write to 0x70000000 the u-boot session crashes. We've probed the Chip Select lines and see that Chip Select 0 is always active and that Chip Select 3 never goes active. From what I know about the LS1021A, the processor itself should be handling the switch between chip selects, but it seems like Chip Select 3 never gets activated. Is there something else I need to do to properly set up Chip Select 3 or enable the switching between chip selects?
Solved! Go to Solution.
It sounds like your RCW may be misconfigured. Ensure that IFC_GRP_E1_BASE is 0 and IFC_GRP_E1_EXT is 0b000. This is confusing because the "0 IFC_CS[1:3]_B, IFC_RB1_B" of IFC_GRP_E1_BASE suggest that you should be getting all 4 chip selects, but any setting other than 0b000 on IFC_GRP_E1_EXT will override that.
It sounds like your RCW may be misconfigured. Ensure that IFC_GRP_E1_BASE is 0 and IFC_GRP_E1_EXT is 0b000. This is confusing because the "0 IFC_CS[1:3]_B, IFC_RB1_B" of IFC_GRP_E1_BASE suggest that you should be getting all 4 chip selects, but any setting other than 0b000 on IFC_GRP_E1_EXT will override that.