Home > Uncategorized > Using SABRE-SD u-boot on Sabre Lite for i.MX6

Using SABRE-SD u-boot on Sabre Lite for i.MX6

February 25th, 2018

There are two lines of the evaluation boards for freescale i.mx6 - SABRE SD and Sabre Lite. The two boards have their own lines of u-boot. Some of the features available in the SABRE SD u-boot, for example SPL boot and the Falcon boot are not available in SABRE LITE board.

With some small modifications you can make the SABRE-SD u-boot to work on the Sabre-Lite board.

In include/configs/mx6sabresd.h

Change

#define CONFIG_MXC_UART_BASE UART1_BASE

to

#define CONFIG_MXC_UART_BASE UART2_BASE

Also,

#define CONSOLE_DEV "ttymxc0"

to

#define CONSOLE_DEV "ttymxc1"

The SABRE SD board uses UART1 for the console message while the the Sabre Lite board uses UART2. So the first change is to make the

In board/freescale/mx6sabresd/mx6sabresd.c

Add following to support UART2.

static iomux_v3_cfg_t const uart2_pads[] = {
IOMUX_PADS(PAD_EIM_D26__UART2_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL)),
IOMUX_PADS(PAD_EIM_D27__UART2_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL)),
}
;

Also add

SETUP_IOMUX_PADS(uart2_pads)

in setup_iomux_uart

static void setup_iomux_uart(void)
{
SETUP_IOMUX_PADS(uart1_pads);
SETUP_IOMUX_PADS(uart2_pads);
}

Compile using

make mx6sabresd_defconfig
make

Since the SPL mode is supported by default - use the following two stage commands to flash the SD Card with

sudo dd if=SPL of=/dev/sdc bs=1k seek=1
sudo dd if=u-boot.img of=/dev/sdc bs=1k seek=69

Please note that this assumes the u-boot to be in the SD Card. This will require that the fuse in the Sabre Lite is not programed for EEPROM

At this point the board is able to boot with following errors

The MMC Card is not detected and the reason is that the Card Detect Pin is different in Sabre SD and the Sabre Lite.

This required following fixes
1.In board/freescale/mx6sabresd/mx6sabresd.c replace

#define USDHC3_CD_GPIO IMX_GPIO_NR(2, 0)
by
#define USDHC3_CD_GPIO IMX_GPIO_NR(7, 0)

2. Make following changes in usdhc3_pads

static iomux_v3_cfg_t const usdhc3_pads[] = {
IOMUX_PADS(PAD_SD3_CLK__SD3_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
IOMUX_PADS(PAD_SD3_CMD__SD3_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
IOMUX_PADS(PAD_SD3_DAT0__SD3_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
IOMUX_PADS(PAD_SD3_DAT1__SD3_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
IOMUX_PADS(PAD_SD3_DAT2__SD3_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
IOMUX_PADS(PAD_SD3_DAT3__SD3_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
IOMUX_PADS(PAD_SD3_DAT4__SD3_DATA4 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),

/*
IOMUX_PADS(PAD_SD3_DAT5__SD3_DATA5 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
*/

IOMUX_PADS(PAD_SD3_DAT6__SD3_DATA6 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),
IOMUX_PADS(PAD_SD3_DAT7__SD3_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL)),

/*
IOMUX_PAD_CTRL(SD3_DAT5__GPIO7_IO00, WEAK_PULLUP),
*/

IOMUX_PADS(PAD_SD3_DAT5__GPIO7_IO00 | MUX_PAD_CTRL(NO_PAD_CTRL)), /* CD */

/*

IOMUX_PADS(PAD_NANDF_D0__GPIO2_IO00 | MUX_PAD_CTRL(NO_PAD_CTRL)),
*/

The board proceeds but stops at next error

As a quick and dirty fix, returned in the beginning of power_init_board without checking for Power ICs in board/freescale/mx6sabresd/mx6sabresd.c .


int power_init_board(void)
{

struct pmic *p;
unsigned int reg;
int ret;

// Vikas dirty return to be fixed
return 0;

p = pfuze_common_init(I2C_PMIC);
if (!p)
return -ENODEV;
.
.

.

Uncategorized

  1. skxo
    April 14th, 2018 at 12:46 | #1

    Hello,

    nice post ! Thanks.
    I have a sabre lite too but unfortunately the Fuses are configured to boot by SPI EEPROM.
    How did you do to find a sabre lite with not burned BOOT Efuses?

    Regards
    sk

  1. No trackbacks yet.