iMX6DQ_SPI_to_uSDHC => working

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

iMX6DQ_SPI_to_uSDHC => working

跳至解决方案
1,996 次查看
jaiganesh
Contributor III

Hello all,

               We are using sabrelite board and would like to boot the board from SD card. There are binaries provided by linaro (iMX6DQ_SPI_to_uSDHC3.bin and iMX6DQ_SPI_to_uSDHC4.bin) and it is working fine. But I would like to know what this binary file is exactly doing (how this binary makes the board to boot from sd card)?

               I have referred Minimal boot-loader for IMX6 Sabrelite where they mentioned that this binary writes two registers. What are those registers and if possible can I get the source code of these binaries or atleast the working?

Thanks

Jai Ganesh S

标签 (1)
0 项奖励
回复
1 解答
1,275 次查看
jaiganesh
Contributor III

Found how the jump code works..

                    1) The registers to be taken care of are => SRC_GPR9 and SRC_GPR10.
                    2) SRC_SBMR1 is the register that determines the boot device

                    3) The concept of ROM is, after reset, if SRC_GPR10[28] is set, ROM will copy SRC_GPR9[25:0] to SRC_SBMR1.

                    4) So inorder to jump from SPI to other boot devices, an appropiate value must be written in SRC_GPR9 register and set the 28th bit of SRC_GPR10 register and                              make a software reset. (This is what happens in jump code)

                    5) Now ROM will check 28th bit of SRC_GPR10 register. It is set. So it copies SRC_GPR9[25:0] to SRC_SBMR1, that will determine the boot device.

Please refer to the fusemap section of imx6 application processor reference manual to determine what values must be written to SRC_GPR9 register for various boot devices.

For more details, refer:

     http://boundarydevices.com/running-linaro-ubuntu-on-i-mx6-sabre-lite-and-nitrogen6x/

     [U-Boot] [PATCH 1/3] common/cmd_rsmode.c: add imx reset mode command

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,276 次查看
jaiganesh
Contributor III

Found how the jump code works..

                    1) The registers to be taken care of are => SRC_GPR9 and SRC_GPR10.
                    2) SRC_SBMR1 is the register that determines the boot device

                    3) The concept of ROM is, after reset, if SRC_GPR10[28] is set, ROM will copy SRC_GPR9[25:0] to SRC_SBMR1.

                    4) So inorder to jump from SPI to other boot devices, an appropiate value must be written in SRC_GPR9 register and set the 28th bit of SRC_GPR10 register and                              make a software reset. (This is what happens in jump code)

                    5) Now ROM will check 28th bit of SRC_GPR10 register. It is set. So it copies SRC_GPR9[25:0] to SRC_SBMR1, that will determine the boot device.

Please refer to the fusemap section of imx6 application processor reference manual to determine what values must be written to SRC_GPR9 register for various boot devices.

For more details, refer:

     http://boundarydevices.com/running-linaro-ubuntu-on-i-mx6-sabre-lite-and-nitrogen6x/

     [U-Boot] [PATCH 1/3] common/cmd_rsmode.c: add imx reset mode command

0 项奖励
回复
1,275 次查看
EricNelson
Senior Contributor II

Hello Jai,

The Freescale binaries are likely written in assembly language, so you can simply disassemble to find out what they're doing.

If you're looking for background about how they work, I'd suggest looking at the U-Boot sources for the "bmode" command:

     u-boot-imx6/arch/arm/cpu/armv7/mx6/soc.c at production · boundarydevices/u-boot-imx6 · GitHub

And for background, find the discussions surrounding the commits on the U-Boot mailing list:

     http://lists.denx.de/pipermail/u-boot/

In essence, all either one does is write some "fuse override" registers and execute a reset. The internal ROM boot loader checks the override bits before (or in addition to) reading the fuses to determine the boot path.

1,275 次查看
jaiganesh
Contributor III

Hi Eric,

          Thanks for your reply. You mentioned that there are some "fuse override" registers, but I am not sure what those registers are ? Is there any specific document available so that, we can understand how boot is transferred from SPI NOR to "SD/MMC" card in detail.

     We are building custom board based on sabrelite and we have only one sd card interface. And why I want to understand this in detail is, for our new custom board, we made SPI NOR as primary boot device and would like to make "SD card" bootable, and so we will be in the position to build our own binary similar to "iMX6DQ_SPI_to_uSDHC4.bin" so that boot device changes to "SD MMC" card.

Thanks,

Jai Ganesh

0 项奖励
回复