u-boot/board/congatec/cgtqmx6eval
Fabio Estevam edf0093732 mx6: ddr: Allow changing REFSEL and REFR fields
Currently MX6 SPL DDR initialization hardcodes the REF_SEL and
REFR fields of the MDREF register as 1 and 7, respectively for
DDR3 and 0 and 3 for LPDDR2.

Looking at the MDREF initialization done via DCD we see that
boards do need to initialize these fields differently:

$ git grep 0x021b0020 board/
board/bachmann/ot1200/mx6q_4x_mt41j128.cfg:DATA 4 0x021b0020 0x00005800
board/ccv/xpress/imximage.cfg:DATA 4 0x021b0020 0x00000800 /* MMDC0_MDREF */
board/freescale/mx6qarm2/imximage.cfg:DATA 4 0x021b0020 0x7800
board/freescale/mx6qarm2/imximage.cfg:DATA 4 0x021b0020 0x00005800
board/freescale/mx6qarm2/imximage_mx6dl.cfg:DATA 4 0x021b0020 0x00005800
board/freescale/mx6qarm2/imximage_mx6dl.cfg:DATA 4 0x021b0020 0x00005800
board/freescale/mx6qsabreauto/imximage.cfg:DATA 4 0x021b0020 0x00005800
board/freescale/mx6qsabreauto/mx6dl.cfg:DATA 4 0x021b0020 0x00005800
board/freescale/mx6qsabreauto/mx6qp.cfg:DATA 4 0x021b0020 0x00005800
board/freescale/mx6sabresd/mx6dlsabresd.cfg:DATA 4      0x021b0020 0x00005800
board/freescale/mx6sabresd/mx6q_4x_mt41j128.cfg:DATA 4 0x021b0020 0x00005800
board/freescale/mx6slevk/imximage.cfg:DATA 4 0x021b0020 0x00001800
board/freescale/mx6sxsabreauto/imximage.cfg:DATA 4 0x021b0020 0x00000800
board/freescale/mx6sxsabresd/imximage.cfg:DATA 4 0x021b0020 0x00000800
board/warp/imximage.cfg:DATA 4 0x021b0020 0x00001800

So introduce a mechanism for users to be able to configure
REFSEL and REFR fields as needed.

Keep all the mx6 SPL users in their current REF_SEL and REFR values,
so no functional changes for the existing users.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Eric Nelson <eric@nelint.com>
2016-09-06 18:22:48 +02:00
..
Kconfig mx6: remove SYS_SOC from board Kconfig 2015-09-13 10:37:29 +02:00
MAINTAINERS cgtqmx6eval: Fix defconfig name 2015-12-07 14:48:02 +01:00
Makefile board: arm: convert makefiles to Kbuild style 2013-11-01 11:42:12 -04:00
README Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
cgtqmx6eval.c mx6: ddr: Allow changing REFSEL and REFR fields 2016-09-06 18:22:48 +02:00

README

U-Boot for the Congatec QMX6 boards

This file contains information for the port of U-Boot to the Congatec
QMX6 boards.

1. Building U-Boot
------------------

- Build U-Boot for Congatec QMX6 boards:

$ make mrproper
$ make cgtqmx6eval_defconfig
$ make

This will generate the following binaries:

- SPL
- u-boot.img

2. Flashing U-Boot in the SPI NOR
---------------------------------

Copy SPL and u-boot.img to the exported TFTP directory of the
host PC (/tftpboot , for example).

=> sf probe

=> setenv serverip <server_ip_address>

=> setenv ipaddr <board_ip_address>

=> tftp 0x12000000 SPL

=> sf erase 0x0 0x10000

=> sf write 0x12000000 0x400 0x10000

=> tftp 0x12000000 u-boot.img

=> sf erase 0x10000 0x70000

=> sf write 0x12000000 0x10000 0x70000

Reboot the board and the new U-Boot should come up.

3. Booting from the SD card
---------------------------

- Flash the SPL image into the SD card:

sudo dd if=SPL of=/dev/mmcblk0 bs=1k seek=1; sync

- Flash the u-boot.img image into the SD card:

sudo dd if=u-boot.img of=/dev/mmcblk0 bs=1k seek=69; sync

- Insert the SD card into the big slot.

The boot medium of Congatec QMX6 boards is the SPI NOR flash, so boot
the board from SPI first.

It is also possible to boot from the SD card slot by using the 'bmode'
command:

=> bmode esdhc4

And then the U-Boot from the big slot will boot.

Note: If the "bmode" command is not available from your pre-installed U-Boot,
these instruction will produce the same effect:

=> mw.l 0x20d8040 0x3850
=> mw.l 0x020d8044 0x10000000
=> reset