1*baefb63aSEric Nelsonmx6memcal - a tool for calibrating DDR on i.MX6 boards.
2*baefb63aSEric Nelson
3*baefb63aSEric NelsonThe mx6memcal board isn't a real board, but a tool for use in bring-up of
4*baefb63aSEric Nelsonnew i.MX6 board designs.
5*baefb63aSEric Nelson
6*baefb63aSEric NelsonIt provides a similar function to the tool from NXP([1]) with a number
7*baefb63aSEric Nelsonof advantages:
8*baefb63aSEric Nelson
9*baefb63aSEric Nelson1. It's open-source, so it's easier to change if needed.
10*baefb63aSEric Nelson   Typical reasons for needing to change include the use of alternate
11*baefb63aSEric Nelson   UARTs and PMIC initialization.
12*baefb63aSEric Nelson2. It produces an image that's directly loadable with imx_usb [2] or
13*baefb63aSEric Nelson   SB_LOADER.exe [3].
14*baefb63aSEric Nelson   The NXP tool requires either a cumbersome JTAG connection that
15*baefb63aSEric Nelson   makes running the DDR very slow or a working U-Boot image that
16*baefb63aSEric Nelson   suffers from a chicken-and-egg problem (i.e. where do you get the
17*baefb63aSEric Nelson   DDR parameters for U-Boot?).
18*baefb63aSEric Nelson3. It doesn't prompt for parameters, so it's much faster to gather
19*baefb63aSEric Nelson   data from multiple boards.
20*baefb63aSEric Nelson4. Parameters to the calibration process can be chosen through
21*baefb63aSEric Nelson   'make menuconfig'.
22*baefb63aSEric Nelson
23*baefb63aSEric NelsonWhen booted, the mx6memcal board will run the DDR calibration
24*baefb63aSEric Nelsonroutines and display the result in a form suitable for cut and
25*baefb63aSEric Nelsonpaste into struct mx6_mmdc_calibration. It can also optionally
26*baefb63aSEric Nelsonproduce output in a form usable in a DCD-style .cfg file.
27*baefb63aSEric Nelson
28*baefb63aSEric NelsonSelections in Kconfig allow most system design settings to be chosen:
29*baefb63aSEric Nelson
30*baefb63aSEric Nelson1. The UART number and pad configuration for the UART. Options
31*baefb63aSEric Nelson   include support for the most frequent reference designs on
32*baefb63aSEric Nelson   i.MX6DQ/SDL (SABRE Lite and SABRESD designs).
33*baefb63aSEric Nelson2. The memory bus width (64 and 32-bit)
34*baefb63aSEric Nelson3. The number of chip-selects in use
35*baefb63aSEric Nelson4. The type of DDR (DDR3 or LPDDR2). Note that LPDDR2 support
36*baefb63aSEric Nelson   is incomplete as of this writing.
37*baefb63aSEric Nelson5. The type of DDR chips in use. This selection allows re-use of common
38*baefb63aSEric Nelson   parts and four DDR3 and two LPDDR2 parts are currently defined
39*baefb63aSEric Nelson6. The On-die termination value for the DRAM lines
40*baefb63aSEric Nelson7. The DRAM drive strength
41*baefb63aSEric Nelson8. The RTT_NOM and RTT_WR termination settings
42*baefb63aSEric Nelson9. RALAT/WALAT latency values
43*baefb63aSEric Nelson
44*baefb63aSEric NelsonReferences:
45*baefb63aSEric Nelson[1] - NXP DDR Stress Test Tool - https://community.nxp.com/docs/DOC-105652
46*baefb63aSEric Nelson[2] - Boundary Devices imx_usb_loader
47*baefb63aSEric Nelson      https://github.com/boundarydevices/imx_usb_loader
48*baefb63aSEric Nelson[3] - Use of SB_Loader.exe
49*baefb63aSEric Nelson      https://boundarydevices.com/windows-users-and-unbricking
50