How do I access eMMC on second eSDHC controller on LS1012A?

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

How do I access eMMC on second eSDHC controller on LS1012A?

ソリューションへジャンプ
1,056件の閲覧回数
timhammer
Contributor III

Bringing up our custom board based on the LS1012A-Freedom reference design has hit a snag with the second eSDHC controller. We have an SD Card slot on the first eSDHC controller and an eMMC on the second. I am able to see and read an SD card in the slot, but seem to have no access to the eMMC.

My RCW configuration has the following related to the second controller:

  • SDHC2_BASE_DAT321 [374-375] 0b01 (SDHC2_DAT[3:1])
  • SDHC2_BASE_BASE [376-377] 0b01 (SDHC2_CMD, SDHC2_DAT0, SDHC2_CLK)

 

The SDHC2_EXT_* (where * is one of {CLK|CMD|DAT3|DAT2|DAT1|DAT0}) RCW bits should be ignored when the above two are set to anything other than 0b00.

I am pretty confident that the RCW is configured correctly (at least as confident, maybe more so, than I was  for the SDHC1_ bits, but we did discover that I had missed the SEL and CD pins...).

 

I am also pretty confident that my device tree has everything needed, although I think the device tree is not used for the U-Boot setup. Stepping through the code, I see the MMC initialized by a call to drivers/mmc/fsl_esdhc.c::fsl_esdhc_mmc_init(). This initialization code only sets up a single esdhc device at address 0x01560000. I do not find any reference to the second controller at 0x01580000 in the source code (u-boot-qoriq from meta-freescale layer repo on Yocto Project git server).

 

In my research, I came across this (http://lists.infradead.org/pipermail/lede-commits/2016-October/001961.html) set of patches for OpenWRT/LEDE that add support for LS1012A.

The initial description does not mention support for the SDHC controllers, but a number of the patch file names include sdhc (or SDHC) including “..._esdhc-support-two-esdhc-host-controllers.patch” and “...2a-enable-two-esdhc-host-controllers-supp.patch”.

Looking more closely at the specific patch sets related to the eSDHC controllers, I see the addition of macros (e.g. CONFIG_FSL_ESDHC_TWO_CONTROLLERS_SUPPORT and CONFIG_SYS_FSL_ESDHC_1_ADDR) and source code based on and/or using these new macros that implement the second eSDHC controller functionality. 

In the u-boot-qoriq source, I do not find/recognize any code that seems to support the second eSDHC controller. In particular, nothing that might initialize a second controller at 0x01580000.

The patches above include adding support for a second controller at 0x01580000..

I started looking at adding the support from the above patches but did not get very far as there are some differences that I did not want to work through yet.

 

This community discussion:

https://community.nxp.com/message/851126?commentID=851126#comment-851126

implies that support for the second eSDHC controller was in the U-Boot he was using on the RDB, but I do not see anything in the source code that indicates that.

 

From this description, can anyone tell me what I am missing in the configuration that the second eSDHC controller is failing to get setup/run?

Or where I am not looking in the source code to see that the second eSDHC controller is supported and how to enable it?

Any pointers are greatly appreciated!

.Tim

ラベル(1)
タグ(1)
0 件の賞賛
1 解決策
761件の閲覧回数
timhammer
Contributor III

With a little help, I was finally able to determine the problem. I had missed setting CONFIG_DM_MMC in my defconfig file.

While I still do not see how the U-Boot code is initializing the second eSDHC controller, I will take this answer and move on.

.Tim

元の投稿で解決策を見る

0 件の賞賛
1 返信
762件の閲覧回数
timhammer
Contributor III

With a little help, I was finally able to determine the problem. I had missed setting CONFIG_DM_MMC in my defconfig file.

While I still do not see how the U-Boot code is initializing the second eSDHC controller, I will take this answer and move on.

.Tim

0 件の賞賛