Hi @kurokawa
LX2160A supports DDR address mirroring.
Asymmetric population (5 devices on CS0 and 4 devices on CS1) is not feasible.
Address mirroring should be applied in a balanced topology.
for the specific chip-selection, it should be 64-bit data width, not 8x 5-chip = 40-bits or 8x 4-chips = 32-bits
there are 3 topologies:
way 1: (single-controller and single-rank, without address mirroring)
TOP: 5 x8 DRAM parts for data + 1 x8 DRAM part for ECC with CS0
BOTTOM: 4 x8 DRAM parts for data with CS0
way 2: (single-controller and dual-ranks, with address mirroring)
TOP: 4 x16 DRAM parts for data + 1 x16 DRAM part(only 8-bits used) for ECC with CS0 of DDRC1
BOTTOM: 4 x16 DRAM parts for data + 1 x16 DRAM part(only 8-bits used) for ECC with CS1 of DDRC1
way 3 (dual-controllers and single-rank for better performance):
TOP: 4 x16 DRAM parts for data + 1 x16 DRAM part(only 8-bits used) for ECC with CS0 of DDRC1
BOTTOM: 4 x16 DRAM parts for data + 1 x16 DRAM part(only 8-bits used) for ECC with CS0 of DDRC2
if .mirrored_dimm = 1 in mocked SPD way in ATF, DDR driver sets DDR_SDRAM_CFG_2[MD_EN] = 1.