u-boot-brain/board/phytec/pcm058
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: Add Phytec PCM058 i.MX6 Quad 2016-07-12 17:58:48 +02:00
MAINTAINERS mx6: Add Phytec PCM058 i.MX6 Quad 2016-07-12 17:58:48 +02:00
Makefile mx6: Add Phytec PCM058 i.MX6 Quad 2016-07-12 17:58:48 +02:00
pcm058.c mx6: ddr: Allow changing REFSEL and REFR fields 2016-09-06 18:22:48 +02:00
README mx6: Add Phytec PCM058 i.MX6 Quad 2016-07-12 17:58:48 +02:00

Board information
-----------------

The SBC produced by Phytec has a SOM based on a i.MX6Q.
The SOM is sold in two versions, with eMMC or with NAND. Support
here is for the SOM with NAND.
The evaluation board "phyBoard-Mira" is thought to be used
together with the SOM.

More information on the board can be found on manufacturer's
website:

http://www.phytec.de/produkt/single-board-computer/phyboard-mira/
http://www.phytec.de/fileadmin/user_upload/images/content/1.Products/SOMs/phyCORE-i.MX6/L-808e_1.pdf

Building U-Boot
-------------------------------

$ make pcm058_defconfig
$ make

This generates the artifacts SPL and u-boot.img.
The SOM can boot from NAND or from SD-Card, having the SPI-NOR
as second option.
The dip switch "DIP-1" on the board let choose between
NAND and SD.

DIP-1 set to off:	Boot first from NAND, then try SPI
DIP-1 set to on:	Boot first from SD, then try SPI

The bootloader was tested with DIP-1 set to on. If a SD-card
is present, then the RBL tries to load SPL from the SD Card, if not,
RBL loads from SPI-NOR. The SPL tries then to load from the same
device where SPL was loaded (SD or SPI). Booting from NAND is
not supported.