Archive

Archive for February, 2018

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

Serial Port in Ubuntu - Using Terminal

February 20th, 2018

We are often required to use Serial COM port in embedded system ( Like console booting in i.MX6). A USB to serial board comes handy in such case. First find out which Serial port corresponds to the hardware using

ls -la /dev/ttyUSB*

It is most likely going to be /dev/ttyUSB0

Next install putty

sudo apt-get install putty

Once it is install, you can launch putty using the following command

sudo putty /dev/ttyUSB0 -serial -sercfg 115200,8,n,1,N

This example assumes you want baud rate of 115200, 8 bit, no Parity

If you want to use the App instead, you will need to do following '
1. install gksudo
sudo apt-get install gksudo

gksudo is the gui compatriot of sudo

Next we need to modify the file /usr/share/applications/putty.desktop

Open /usr/share/applications/putty.desktop

sudo gedit /usr/share/applications/putty.desktop

Change the line

Exec=putty

to

Exec=gksudo -k -u root putty

Uncategorized

Order Notixed

February 5th, 2018

Notixed is up for sale at Reference Designer

Order The Notixed: ( Shipping in US is $4 for first and $1 for each additional)

Notixed - Turn Rpi to USB device
Notixed - Turn Rpi to USB device
Turn Pi Zero into USB device using Notixed, Shipping is $4 in US
$3.50

Out of US : The shipping is $6 for first and $3 for each additional unit.

Notixed - Turn Rpi to USB device
Notixed - Turn Rpi to USB device
Turn Pi Zero into USB device using Notixed, Shipping is $4 in US
$3.50

Uncategorized