<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>LayerscapeのトピックHow do I access eMMC on second eSDHC controller on LS1012A?</title>
    <link>https://community.nxp.com/t5/Layerscape/How-do-I-access-eMMC-on-second-eSDHC-controller-on-LS1012A/m-p/825622#M3718</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;My RCW configuration has the following related to the second controller:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;SDHC2_BASE_DAT321 [374-375] 0b01 (SDHC2_DAT[3:1])&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;SDHC2_BASE_BASE [376-377] 0b01 (SDHC2_CMD, SDHC2_DAT0, SDHC2_CLK)&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;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.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;I am pretty confident that the RCW is configured correctly (&lt;EM&gt;at least as confident, maybe more so, than I was&amp;nbsp; for the SDHC1_ bits, but we did discover that I had missed the SEL and CD pins...&lt;/EM&gt;).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;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 &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;drivers/mmc/fsl_esdhc.c::fsl_esdhc_mmc_init()&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;. 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).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;In my research, I came across this (&lt;A href="http://lists.infradead.org/pipermail/lede-commits/2016-October/001961.html"&gt;http://lists.infradead.org/pipermail/lede-commits/2016-October/001961.html&lt;/A&gt;) set of patches for OpenWRT/LEDE that add support for LS1012A.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;The initial description does not mention support for the SDHC controllers, but a number of the patch file names include sdhc (or SDHC) including “&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;..._esdhc-support-two-esdhc-host-controllers.patch&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;” and “&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;...2a-enable-two-esdhc-host-controllers-supp.patch&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;”.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;Looking more closely at the specific patch sets related to the eSDHC controllers, I see the addition of macros (&lt;EM&gt;e.g.&lt;/EM&gt; &lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;CONFIG_FSL_ESDHC_TWO_CONTROLLERS_SUPPORT&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt; and &lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;CONFIG_SYS_FSL_ESDHC_1_ADDR&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;) and source code based on and/or using these new macros that implement the second eSDHC controller functionality.&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;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.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;The patches above include adding support for a second controller at 0x01580000..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;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.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;This community discussion:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: .5in;"&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/message/851126?commentID=851126#comment-851126"&gt;https://community.nxp.com/message/851126?commentID=851126#comment-851126&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;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.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;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?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;Or where I am not looking in the source code to see that the second eSDHC controller is supported and how to enable it?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;Any pointers are greatly appreciated!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;.Tim&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Aug 2018 20:22:16 GMT</pubDate>
    <dc:creator>timhammer</dc:creator>
    <dc:date>2018-08-24T20:22:16Z</dc:date>
    <item>
      <title>How do I access eMMC on second eSDHC controller on LS1012A?</title>
      <link>https://community.nxp.com/t5/Layerscape/How-do-I-access-eMMC-on-second-eSDHC-controller-on-LS1012A/m-p/825622#M3718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;My RCW configuration has the following related to the second controller:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;SDHC2_BASE_DAT321 [374-375] 0b01 (SDHC2_DAT[3:1])&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;SDHC2_BASE_BASE [376-377] 0b01 (SDHC2_CMD, SDHC2_DAT0, SDHC2_CLK)&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;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.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;I am pretty confident that the RCW is configured correctly (&lt;EM&gt;at least as confident, maybe more so, than I was&amp;nbsp; for the SDHC1_ bits, but we did discover that I had missed the SEL and CD pins...&lt;/EM&gt;).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;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 &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;drivers/mmc/fsl_esdhc.c::fsl_esdhc_mmc_init()&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;. 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).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;In my research, I came across this (&lt;A href="http://lists.infradead.org/pipermail/lede-commits/2016-October/001961.html"&gt;http://lists.infradead.org/pipermail/lede-commits/2016-October/001961.html&lt;/A&gt;) set of patches for OpenWRT/LEDE that add support for LS1012A.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;The initial description does not mention support for the SDHC controllers, but a number of the patch file names include sdhc (or SDHC) including “&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;..._esdhc-support-two-esdhc-host-controllers.patch&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;” and “&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;...2a-enable-two-esdhc-host-controllers-supp.patch&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;”.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;Looking more closely at the specific patch sets related to the eSDHC controllers, I see the addition of macros (&lt;EM&gt;e.g.&lt;/EM&gt; &lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;CONFIG_FSL_ESDHC_TWO_CONTROLLERS_SUPPORT&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt; and &lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;CONFIG_SYS_FSL_ESDHC_1_ADDR&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;) and source code based on and/or using these new macros that implement the second eSDHC controller functionality.&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;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.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;The patches above include adding support for a second controller at 0x01580000..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;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.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;This community discussion:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: .5in;"&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/message/851126?commentID=851126#comment-851126"&gt;https://community.nxp.com/message/851126?commentID=851126#comment-851126&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;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.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;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?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;Or where I am not looking in the source code to see that the second eSDHC controller is supported and how to enable it?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;Any pointers are greatly appreciated!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;.Tim&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2018 20:22:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/How-do-I-access-eMMC-on-second-eSDHC-controller-on-LS1012A/m-p/825622#M3718</guid>
      <dc:creator>timhammer</dc:creator>
      <dc:date>2018-08-24T20:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do I access eMMC on second eSDHC controller on LS1012A?</title>
      <link>https://community.nxp.com/t5/Layerscape/How-do-I-access-eMMC-on-second-eSDHC-controller-on-LS1012A/m-p/825623#M3719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With a little help, I was finally able to determine the problem. I had missed setting CONFIG_DM_MMC in my defconfig file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2018 18:40:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/How-do-I-access-eMMC-on-second-eSDHC-controller-on-LS1012A/m-p/825623#M3719</guid>
      <dc:creator>timhammer</dc:creator>
      <dc:date>2018-08-31T18:40:02Z</dc:date>
    </item>
  </channel>
</rss>

