Hi Rafal,
Basically, you need to modify two register fields in the original flash_header.S in order to support 32-bit DDR3.
1. Change the memory bus size to 32-bit by set DSIZ on MMDC1_MDCTL register to 1.
2. Disable the ODT on higher 32-bit by clearing MMDC2_MPODTCTRL register.
Arthur