<?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中的主题 problem with sspi command in Uboot</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/problem-with-sspi-command-in-Uboot/m-p/708973#M110177</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am recently working on spi driver for ECSPI1 in Uboot. I have brought up the command interface by adding a macro "CONFIG_CMD_SPI" in my config file "imx6qdl-sabreauto.dtsi". I looped back MISO and MOSI for ECSPI1. When I issued the command like "sspi 0:0.0 8 8" , I am always receiving "00". I added following in my board config file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#ifdef CONFIG_MXC_SPI&lt;BR /&gt; iomux_v3_cfg_t const ecspi1_pads[] = {&lt;BR /&gt; MX6_PAD_EIM_D18__ECSPI1_MOSI | MUX_PAD_CTRL(SPI_PAD_CTRL),&lt;BR /&gt; MX6_PAD_EIM_D17__ECSPI1_MISO | MUX_PAD_CTRL(SPI_PAD_CTRL),&lt;BR /&gt; MX6_PAD_EIM_D16__ECSPI1_SCLK | MUX_PAD_CTRL(SPI_PAD_CTRL),&lt;BR /&gt; MX6_PAD_EIM_EB2__GPIO2_IO30 | MUX_PAD_CTRL(NO_PAD_CTRL),&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;void setup_spi(void)&lt;BR /&gt;{&lt;BR /&gt; imx_iomux_v3_setup_multiple_pads(ecspi1_pads,&lt;BR /&gt; ARRAY_SIZE(ecspi1_pads));&lt;BR /&gt; gpio_direction_output(IMX_GPIO_NR(2, 30), 0);&lt;BR /&gt;}&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I called "setup_spi" in "board_early_init_f". What did I missed? Any help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;yong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Aug 2017 08:02:19 GMT</pubDate>
    <dc:creator>yongggg</dc:creator>
    <dc:date>2017-08-28T08:02:19Z</dc:date>
    <item>
      <title>problem with sspi command in Uboot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/problem-with-sspi-command-in-Uboot/m-p/708973#M110177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am recently working on spi driver for ECSPI1 in Uboot. I have brought up the command interface by adding a macro "CONFIG_CMD_SPI" in my config file "imx6qdl-sabreauto.dtsi". I looped back MISO and MOSI for ECSPI1. When I issued the command like "sspi 0:0.0 8 8" , I am always receiving "00". I added following in my board config file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#ifdef CONFIG_MXC_SPI&lt;BR /&gt; iomux_v3_cfg_t const ecspi1_pads[] = {&lt;BR /&gt; MX6_PAD_EIM_D18__ECSPI1_MOSI | MUX_PAD_CTRL(SPI_PAD_CTRL),&lt;BR /&gt; MX6_PAD_EIM_D17__ECSPI1_MISO | MUX_PAD_CTRL(SPI_PAD_CTRL),&lt;BR /&gt; MX6_PAD_EIM_D16__ECSPI1_SCLK | MUX_PAD_CTRL(SPI_PAD_CTRL),&lt;BR /&gt; MX6_PAD_EIM_EB2__GPIO2_IO30 | MUX_PAD_CTRL(NO_PAD_CTRL),&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;void setup_spi(void)&lt;BR /&gt;{&lt;BR /&gt; imx_iomux_v3_setup_multiple_pads(ecspi1_pads,&lt;BR /&gt; ARRAY_SIZE(ecspi1_pads));&lt;BR /&gt; gpio_direction_output(IMX_GPIO_NR(2, 30), 0);&lt;BR /&gt;}&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I called "setup_spi" in "board_early_init_f". What did I missed? Any help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;yong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2017 08:02:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/problem-with-sspi-command-in-Uboot/m-p/708973#M110177</guid>
      <dc:creator>yongggg</dc:creator>
      <dc:date>2017-08-28T08:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: problem with sspi command in Uboot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/problem-with-sspi-command-in-Uboot/m-p/708974#M110178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi yong&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one can check signals with oscilloscope and seems this may be easily debugged using&lt;/P&gt;&lt;P&gt;some ecspi1 baremetal example like sdk:&lt;/P&gt;&lt;P&gt;Github SDK&lt;BR /&gt;&lt;A href="https://github.com/backenklee/swp-report/tree/master/iMX6_Platform_SDK"&gt;https://github.com/backenklee/swp-report/tree/master/iMX6_Platform_SDK&lt;/A&gt;&lt;/P&gt;&lt;P&gt;What uboot version used in the case, please note that latest official uboot release is&lt;/P&gt;&lt;P&gt;imx_v2016.03, please try to test on it&lt;/P&gt;&lt;P&gt;&lt;A href="http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/tree/?h=imx_v2016.03_4.1.15_2.0.0_ga"&gt;http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/tree/?h=imx_v2016.03_4.1.15_2.0.0_ga&lt;/A&gt;&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2017 10:05:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/problem-with-sspi-command-in-Uboot/m-p/708974#M110178</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2017-08-28T10:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: problem with sspi command in Uboot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/problem-with-sspi-command-in-Uboot/m-p/708975#M110179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help! It was pin conflicts problem. I have checked MISO, MOSI, and SCLK. All these three signals are working fine but I am not observing the chip select signal toggling on my scope. I am using GPIO for my CS signal. I tired 2 GPIO for this signal. Neither of both shows any toggling.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In function&amp;nbsp;&lt;STRONG&gt;int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,&amp;nbsp;&lt;/STRONG&gt;&lt;STRONG&gt;void *din, unsigned long flags)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;before transfer begins,&amp;nbsp; spi_cs_activate(slave) is called. I assumed this function toggles the chip select signal.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;void spi_cs_activate(struct spi_slave *slave)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; struct mxc_spi_slave *mxcs = to_mxc_spi_slave(slave);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; if (mxcs-&amp;gt;gpio &amp;gt; 0)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; gpio_set_value(mxcs-&amp;gt;gpio, mxcs-&amp;gt;ss_pol);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mxcs-&amp;gt;gpio is initialized to -1 for gpio.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;yong&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Aug 2017 06:35:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/problem-with-sspi-command-in-Uboot/m-p/708975#M110179</guid>
      <dc:creator>yongggg</dc:creator>
      <dc:date>2017-08-31T06:35:03Z</dc:date>
    </item>
  </channel>
</rss>

