<?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>i.MX ProcessorsのトピックRe: Kernel support for SD Card over SPI on iMX7?</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Kernel-support-for-SD-Card-over-SPI-on-iMX7/m-p/719865#M111922</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You say SD Card SPI mode (*) is not possible on i.MX7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you mean the uSDHC does not support this, or the ECSPI module does not support this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As the SD card SPI mode requires just a normal SPI host, the ECSPI should be able to handle it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, indeed, like Stefano asked: please explain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Leon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(*) SD card SPI mode: &lt;A class="link-titled" href="http://elm-chan.org/docs/mmc/mmc_e.html#spiinit" title="http://elm-chan.org/docs/mmc/mmc_e.html#spiinit"&gt;How to Use MMC/SDC&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Sep 2018 15:44:20 GMT</pubDate>
    <dc:creator>sidebranch</dc:creator>
    <dc:date>2018-09-07T15:44:20Z</dc:date>
    <item>
      <title>Kernel support for SD Card over SPI on iMX7?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Kernel-support-for-SD-Card-over-SPI-on-iMX7/m-p/719860#M111917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to add an SD card over SPI (ecspi2) on the iMX7 Solo. I would use an&amp;nbsp;SDIO port but its not an option on my hardware (custom board). I'm using Yocto and Linux 4.1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have added the following to my .dts, but I don't see any new block device show up in lsblk or any new partition in /proc/partitions, or any prints related to this show up in /var/log/messages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;ecspi2 {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;status = "okay";&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;sdcard: mmc-slot@0 {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#address-cells = &amp;lt;1&amp;gt;;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#size-cells = &amp;lt;1&amp;gt;;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;compatible = "mmc-spi-slot";&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;reg = &amp;lt;0&amp;gt;;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;spi-max-frequency = &amp;lt;5000000&amp;gt;;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;voltage-ranges = &amp;lt;3200 3400&amp;gt;;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;disable-wp;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;disable-cd;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;};&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pinctrl_ecspi2: ecspi2grp {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;fsl,pins = &amp;lt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MX7D_PAD_ECSPI2_MISO__ECSPI2_MISO 0x00000014&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MX7D_PAD_ECSPI2_MOSI__ECSPI2_MOSI 0x00000014&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MX7D_PAD_ECSPI2_SCLK__ECSPI2_SCLK 0x00000014&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MX7D_PAD_ECSPI2_SS0__ECSPI2_SS0 0x00000014&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;gt;;&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My theory now is that the MMC_SPI kernel driver (which has "mmc-spi-slot"&amp;nbsp;as the compatible string) is not being compiled into my kernel. I have found other posts where people used this driver for this&amp;nbsp;purpose (sd card over spi on iMX6 was the closest case I could find) :&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://github.com/torvalds/linux/blob/master/drivers/mmc/host/mmc_spi.c"&gt;https://github.com/torvalds/linux/blob/master/drivers/mmc/host/mmc_spi.c&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TargetMachine$&amp;nbsp;cat /lib/modules/$(uname -r)/modules.builtin | grep mmc&lt;BR /&gt;kernel/drivers/mmc/card/mmc_block.ko&lt;BR /&gt;kernel/drivers/mmc/core/mmc_core.ko&lt;BR /&gt;kernel/drivers/mmc/host/sdhci.ko&lt;BR /&gt;kernel/drivers/mmc/host/sdhci-pltfm.ko&lt;BR /&gt;kernel/drivers/mmc/host/sdhci-esdhc-imx.ko&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;TargetMachine$&lt;/SPAN&gt;&amp;nbsp;cat /lib/modules/$(uname -r)/modules.builtin | grep spi&lt;BR /&gt;kernel/drivers/base/regmap/regmap-spi.ko&lt;BR /&gt;kernel/drivers/mfd/mc13xxx-spi.ko&lt;BR /&gt;kernel/drivers/mtd/spi-nor/spi-nor.ko&lt;BR /&gt;kernel/drivers/mtd/spi-nor/fsl-quadspi.ko&lt;BR /&gt;kernel/drivers/spi/spi-bitbang.ko&lt;BR /&gt;kernel/drivers/spi/spi-gpio.ko&lt;BR /&gt;kernel/drivers/spi/spi-imx.ko&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I searched around the kernel menuconfig UI for relevant kernel components to add. I already had the following config entries set:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HostMachine$ cat .config | grep MMC&lt;/P&gt;&lt;P&gt;# Supported MMC/SDIO adapters&lt;BR /&gt;CONFIG_MMC=y&lt;BR /&gt;# CONFIG_MMC_DEBUG is not set&lt;BR /&gt;# CONFIG_MMC_CLKGATE is not set&lt;BR /&gt;# MMC/SD/SDIO Card Drivers&lt;BR /&gt;CONFIG_MMC_BLOCK=y&lt;BR /&gt;CONFIG_MMC_BLOCK_MINORS=8&lt;BR /&gt;CONFIG_MMC_BLOCK_BOUNCE=y&lt;BR /&gt;# CONFIG_MMC_TEST is not set&lt;BR /&gt;# MMC/SD/SDIO Host Controller Drivers&lt;BR /&gt;CONFIG_MMC_SDHCI=y&lt;BR /&gt;CONFIG_MMC_SDHCI_IO_ACCESSORS=y&lt;BR /&gt;CONFIG_MMC_SDHCI_PLTFM=y&lt;BR /&gt;# CONFIG_MMC_SDHCI_OF_ARASAN is not set&lt;BR /&gt;CONFIG_MMC_SDHCI_ESDHC_IMX=y&lt;BR /&gt;# CONFIG_MMC_SDHCI_F_SDH30 is not set&lt;BR /&gt;# CONFIG_MMC_MXC is not set&lt;BR /&gt;# CONFIG_MMC_DW is not set&lt;BR /&gt;# CONFIG_MMC_VUB300 is not set&lt;BR /&gt;# CONFIG_MMC_USHC is not set&lt;BR /&gt;# CONFIG_MMC_USDHI6ROL0 is not set&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I search for "MMC" in the menuconfig UI, I see an additional entry that is not in my .config file:&lt;/P&gt;&lt;P&gt;Symbol: MMC_SPI [=n]&lt;BR /&gt;Type : tristate&lt;BR /&gt;Prompt: MMC/SD/SDIO over SPI&lt;BR /&gt; Location:&lt;BR /&gt; -&amp;gt; Device Drivers&lt;BR /&gt; (1) -&amp;gt; MMC/SD/SDIO card support (MMC [=y])&lt;BR /&gt; Depends on: MMC [=y] &amp;amp;&amp;amp; SPI_MASTER [=y] &amp;amp;&amp;amp; !HIGHMEM [=y] &amp;amp;&amp;amp; HAS_DMA [=y]&lt;BR /&gt; Defined at drivers/mmc/host/Kconfig:472&lt;BR /&gt; Selects: CRC7 [=m] &amp;amp;&amp;amp; CRC_ITU_T [=m]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I dont see any way in the menu to enable the MMC_SPI symbol, or to get CONFIG_MMC_SPI to showup in my .config file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-bare" href="https://github.com/torvalds/linux/blob/master/drivers/mmc/host/Kconfig" title="https://github.com/torvalds/linux/blob/master/drivers/mmc/host/Kconfig"&gt;https://github.com/torvalds/linux/blob/master/drivers/mmc/host/Kconfig&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help me get past this point? Do you agree that I need to get the mmc_spi driver compiled in? If so, how can I get it to compile in? What else might be the problem and how do I troubleshoot ?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2018 14:04:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Kernel-support-for-SD-Card-over-SPI-on-iMX7/m-p/719860#M111917</guid>
      <dc:creator>adriansapio</dc:creator>
      <dc:date>2018-03-01T14:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: Kernel support for SD Card over SPI on iMX7?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Kernel-support-for-SD-Card-over-SPI-on-iMX7/m-p/719861#M111918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The option doesn't appear because imx_v7_defconfig negates the dependency ie:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;CONFIG_HIGHMEM=y&lt;/P&gt;&lt;P&gt;2. CONFIG_HAS_DMA is not set&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You would need to re-enable and see what happens.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2018 19:46:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Kernel-support-for-SD-Card-over-SPI-on-iMX7/m-p/719861#M111918</guid>
      <dc:creator>mtx512</dc:creator>
      <dc:date>2018-03-01T19:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Kernel support for SD Card over SPI on iMX7?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Kernel-support-for-SD-Card-over-SPI-on-iMX7/m-p/719862#M111919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adrian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am afraid SD Card over SPI is not supported with i.MX7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H1&gt;&lt;/H1&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2018 23:05:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Kernel-support-for-SD-Card-over-SPI-on-iMX7/m-p/719862#M111919</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2018-03-01T23:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: Kernel support for SD Card over SPI on iMX7?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Kernel-support-for-SD-Card-over-SPI-on-iMX7/m-p/719863#M111920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the replies, Jas and Igor.&lt;/P&gt;&lt;P&gt;Looks like we'll have to find a different way forward on this design.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Take care,&lt;/P&gt;&lt;P&gt;Adrian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Mar 2018 22:29:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Kernel-support-for-SD-Card-over-SPI-on-iMX7/m-p/719863#M111920</guid>
      <dc:creator>adriansapio</dc:creator>
      <dc:date>2018-03-08T22:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: Kernel support for SD Card over SPI on iMX7?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Kernel-support-for-SD-Card-over-SPI-on-iMX7/m-p/719864#M111921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Igor,&lt;BR /&gt;&amp;nbsp;please could you explain me why the i.MX7 does not support the SD Card over SPI?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Stefano&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2018 21:22:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Kernel-support-for-SD-Card-over-SPI-on-iMX7/m-p/719864#M111921</guid>
      <dc:creator>s_querin</dc:creator>
      <dc:date>2018-03-12T21:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Kernel support for SD Card over SPI on iMX7?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Kernel-support-for-SD-Card-over-SPI-on-iMX7/m-p/719865#M111922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You say SD Card SPI mode (*) is not possible on i.MX7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you mean the uSDHC does not support this, or the ECSPI module does not support this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As the SD card SPI mode requires just a normal SPI host, the ECSPI should be able to handle it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, indeed, like Stefano asked: please explain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Leon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(*) SD card SPI mode: &lt;A class="link-titled" href="http://elm-chan.org/docs/mmc/mmc_e.html#spiinit" title="http://elm-chan.org/docs/mmc/mmc_e.html#spiinit"&gt;How to Use MMC/SDC&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 15:44:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Kernel-support-for-SD-Card-over-SPI-on-iMX7/m-p/719865#M111922</guid>
      <dc:creator>sidebranch</dc:creator>
      <dc:date>2018-09-07T15:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Kernel support for SD Card over SPI on iMX7?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Kernel-support-for-SD-Card-over-SPI-on-iMX7/m-p/719866#M111923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Leon&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/68490i01120404959EA064/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.jpg" alt="pastedImage_1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe ECSPI should be able to handle it, one can look at AN2689 document&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/docs/en/application-note/AN2689.pdf" title="https://www.nxp.com/docs/en/application-note/AN2689.pdf"&gt;https://www.nxp.com/docs/en/application-note/AN2689.pdf&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 23:47:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Kernel-support-for-SD-Card-over-SPI-on-iMX7/m-p/719866#M111923</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2018-09-07T23:47:07Z</dc:date>
    </item>
  </channel>
</rss>

