imx6: memory controller initialization in uboot?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

imx6: memory controller initialization in uboot?

ソリューションへジャンプ
13,894件の閲覧回数
jfsimon
Contributor III

Hi,

On the i.MX6 cpu, I am curious where the memory controller (MMDC -- see reference manual chapter 45) is initialized in uboot.

It seems uboot code is loaded directly into main RAM as explained here:

http://lists.denx.de/pipermail/u-boot/2012-February/117134.html

Does that mean that the MMDC memory contrller is init before uboot is loaded into RAM?

Thanks a lot

-jfs

1 解決策
3,035件の閲覧回数
justindefields
Contributor I

I had the exact same question as you.  I think I've tracked it down.  In the U-boot source directory, there is a file called boards.cfg.  This file lists hundreds of boards.  If you search for your specific mx6 board, you should see at the rightmost entry in this table, a file directory for the specific .cgf that the specific board is using.

sample from boards.cfg:

mx6qarm2 ...mx6qarm2:IMX_CONFIG=board/freescale/mx6qarm2/imximage.cfg
mx6qsabreauto ...mx6qsabreauto:IMX_CONFIG=board/freescale/mx6qsabreauto/imximage.cfg
mx6qsabrelite ...mx6qsabrelite:IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg
mx6qsabresd ...mx6qsabresd:IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg

My board is a mx6qsabrelite, and in this file you will see that it references "/board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg"

In this file there are a series of DCD writes to various addresses.  I would recommend creating a new imximage.cfg file in /board/freescale/mxq6_<yourboard>/.  You can use the file listed above as a starting point.

Hope this helps!

- Justin

元の投稿で解決策を見る

0 件の賞賛
返信
6 返答(返信)
3,035件の閲覧回数
AnsonHuang
NXP Employee
NXP Employee

All the MMDC controller's initialization is done in uboot-imx/board/freescale/<board name>/flash_header.S, either using DCD mode or plug in mode.

DCD mode is a table where contain the address and value, then ROM code will get this table to do the configure, then after all these tables' item are executed, ROM will copy the image to DDR and jump to DDR.

Plugin mode is another mode which allow ROM code to call this plugin function, after this plugin code return, ROM code continue to do the rest of work.

Hope I have made it clear for you!

3,035件の閲覧回数
Yuri
NXP Employee
NXP Employee

It is possible to provide register initialization via so called DCD table

in flash_header file

board/freescale/mx6q_<custom board name>/flash_header.S

  For details please use Chapter 8 (System Boot), section 8.6.2 [Device
Configuration Data (DCD)] of i.MX6 Reference Manual (IMX6DQRM).

3,035件の閲覧回数
jfsimon
Contributor III

Hi Yuri,

Thanks so much for pointing me to the DCD table feature. But I don't find this implemented in i.MX6 boards. Maybe I am looking at the wrong u-boot source code?

Best regards

-jfs

0 件の賞賛
返信
3,036件の閲覧回数
justindefields
Contributor I

I had the exact same question as you.  I think I've tracked it down.  In the U-boot source directory, there is a file called boards.cfg.  This file lists hundreds of boards.  If you search for your specific mx6 board, you should see at the rightmost entry in this table, a file directory for the specific .cgf that the specific board is using.

sample from boards.cfg:

mx6qarm2 ...mx6qarm2:IMX_CONFIG=board/freescale/mx6qarm2/imximage.cfg
mx6qsabreauto ...mx6qsabreauto:IMX_CONFIG=board/freescale/mx6qsabreauto/imximage.cfg
mx6qsabrelite ...mx6qsabrelite:IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg
mx6qsabresd ...mx6qsabresd:IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg

My board is a mx6qsabrelite, and in this file you will see that it references "/board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg"

In this file there are a series of DCD writes to various addresses.  I would recommend creating a new imximage.cfg file in /board/freescale/mxq6_<yourboard>/.  You can use the file listed above as a starting point.

Hope this helps!

- Justin

0 件の賞賛
返信
3,035件の閲覧回数
Yuri
NXP Employee
NXP Employee
0 件の賞賛
返信
3,035件の閲覧回数
lily_zhang
NXP Employee
NXP Employee

It's done by ROM to load DCD table and initialize RAM.

You can get more information from MX6DQ RM: 8.3.3 Device Configuration Data

0 件の賞賛
返信