How to configure LS1012A to flash uBoot on NOR FLASH and Linux OS on eMMC NAND FLASH

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to configure LS1012A to flash uBoot on NOR FLASH and Linux OS on eMMC NAND FLASH

2,265 Views
huyho
Contributor III

Hi,

I plan to use LS1012A to design a board based on FRDM-LS1012A. I want to store uBoot in NOR FLASH, and store Linux OS in eMMC NAND FLASH.

I read this document and this tutorial and found that we have to change the DIP switch to choose where to flash and no On-Board Switch setting available on FRDM-LS1012A.

My question is how do I configure by software or hardware?

Thank you very much!

Best regards,

Huy.

0 Kudos
3 Replies

1,165 Views
zmlopez
Contributor III

Hi,

I would also like to design a board based on FRDM-LS1012A, with uBoot in NOR FLASH, and store Linux OS filesystem in eMMC NAND FLASH or SD card.

I'm using Lede Openwrt OS.

Huy (or anyone), did you manage to get it work?

That's what I've tried:

Hardware:

In the FRDM-LS1012A, I've connected the SDHC1 lines to a SD card to test:

SDHC1_CLK   J1-pin 6

SDHC1_CMD  J1-pin 8

SDHC1_DAT0  J1-pin 10

SDHC1_DAT1  J1-pin 12

SDHC1_DAT2  J1-pin 14

SDHC1_DAT3  J1-pin 16

I've got 3,3V power supply from J3 10 and 4 pins, and GND from J3 12 and 14 pins.

Software:

First, it seems that RCW configuration is ok:

SDHC1_BASE is 0b01    ---> SDHC1_CMD, SDHC1_DAT[0..3], SDHC1_CLK

SDHC1_CD is 0b0     ---> GPIO_1[21]

SDHC1_WP is 0b0   ---> GPIO_1[22]

SDHC1_VSEL is 0b0   ---> GPIO_1[23]

In uboot directory, I run:

make menuconfig

and activated:

Device Drivers ---> MMC host controller support ---> MMC/SD/SDIO card support  (CONFIG_MMC=y)

and

Command line interface  ---> Device access commands  ---> mmc  (CONFIG_CMD_MMC=y)

to get mmc command support in u-boot.

In dts file:

   uboot-layerscape-2017.09/arch/arm/dtsuboot/arch/arm/dts/fsl-ls1012a-frdm.dts

I've activated the esdhc0 driver:

&esdhc0 {
status = "okay";
};

In /uboot-layerscape-2017.09/include/configs/ls1012afrdm.h

I've added:

/*  MMC  */

#ifdef CONFIG_MMC

#define CONFIG_FSL_ESDHC

#define CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33

#endif

I've also included this code to initialize mmc driver, in file:

/uboot-layerscape-2017.09/board/freescale/ls1012afrdm/ls1012afrdm.c

#include <mmc.h>
#include <fsl_esdhc.h>

(...)

#ifdef CONFIG_FSL_ESDHC
struct fsl_esdhc_cfg esdhc_cfg[1] = {

{CONFIG_SYS_FSL_ESDHC_ADDR},
};

int board_mmc_init(bd_t *bis)
{
esdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK);

return fsl_esdhc_initialize(bis, &esdhc_cfg[0]);
}

#endif

As I saw in another board.

But,in uboot console, I've got:

Reset Configuration Word (RCW):

00000000: 08000008 00000000 00000000 00000000
00000010: 33050000 c000000c 40000000 00001800
00000020: 00000000 00000000 00000000 000c4571
00000030: 00000000 00c28120 00000096 00000000
I2C: ready
DRAM: 446 MiB
PPA Firmware: Version LSDK-17.09-update-103017
Using SERDES1 Protocol: 13061 (0x3305)
MMC: FSL_SDHC: 0
SF: Detected s25fs512s with page size 512 Bytes, erase size 256 KiB, total 64 MiB
In: serial
Out: serial
Err: serial
Model: LS1012A FREEDOM Board
Board: LS1012AFRDM Net: PFE class pe firmware
PFE tmu pe firmware
ls1012a_configure_serdes 0
ls1012a_configure_serdes 1

(...)

=> mmc list

FSL_SDHC: 0

=> mmc dev 0
mmc_init: -70, time 33
=> mmc info

mmc_init: -70, time 33

It gives the same response, with or without card: a timeout.

I can see the SDHC1_CLK signal in oscilloscope, but there is no signal in the rest of the SDHC lines.

Could anyone help to make it work?

Thanks in advance.

0 Kudos

1,165 Views
zmlopez
Contributor III

Now it works!!!

 

In u-boot and linux.

 

It was only that pull-ups are needed as reported in QorIQ LS1012A Design Checklist

 

0 Kudos

1,165 Views
Pavel
NXP Employee
NXP Employee

Look at the Section 4.4.5.8.4 of NXP SDK 2.0-1703 documentation:

https://www.nxp.com/docs/en/supporting-information/QORIQ-SDK-2.0-IC-REV0.pdf

 

This Section contains information for SD deployment for the LS1012ARDB board. This command sequence can be used on the FRDM-LS1012a board.


Have a great day,
Pavel Chubakov

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos