<?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>topic Re: SabreSD SPI Driver Queries in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/SabreSD-SPI-Driver-Queries/m-p/344003#M47371</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;Have you checked this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/message/347425"&gt;iMX53QSB cspi spidev configuration&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The customer was able to register the spidev nodes under dev.&lt;/P&gt;&lt;P&gt;The iomux needs to be configured too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Alejandro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Feb 2015 17:12:47 GMT</pubDate>
    <dc:creator>alejandrolozan1</dc:creator>
    <dc:date>2015-02-09T17:12:47Z</dc:date>
    <item>
      <title>SabreSD SPI Driver Queries</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SabreSD-SPI-Driver-Queries/m-p/344002#M47370</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 have few queries related to the SPI driver on SabreSD board. I am using Ltib on kernel 3.0. I have to configure few ICs using&amp;nbsp; &lt;STRONG&gt;ECSPI1&lt;/STRONG&gt;.(The SPI is same but the ICs will be selected using Chip Select pin). My queries are as follows:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Should I use "&lt;STRONG&gt;spidev&lt;/STRONG&gt;" for configuration? After changing &lt;STRONG&gt;.modalias&lt;/STRONG&gt; in &lt;STRONG&gt;board-mx6q_sabresd.c&lt;/STRONG&gt;, I was able to see spidev0.0 in the &lt;STRONG&gt;/dev&lt;/STRONG&gt; file structure. But if i change &lt;STRONG&gt;.bus_num&lt;/STRONG&gt; or &lt;STRONG&gt;.chip_select&lt;/STRONG&gt; to value other than 0, i am not getting any &lt;STRONG&gt;spidev&lt;/STRONG&gt; node in &lt;STRONG&gt;/dev&lt;/STRONG&gt;. Should i be really changing it if I am using only &lt;STRONG&gt;ECSPI1&lt;/STRONG&gt; (does &lt;STRONG&gt;.bus_num&lt;/STRONG&gt; = 0 correspond to &lt;STRONG&gt;ECSPI1&lt;/STRONG&gt;)?&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; How to configure the chip selects? From what i have read, I need to configure the Chip select pins as GPIO. In the &lt;STRONG&gt;board-mx6q_sabresd.c&lt;/STRONG&gt; there is one configuration given as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #define&amp;nbsp;&amp;nbsp; SABRESD_ECSPI1_CS0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IMX_GPIO_NR(4, 9)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; So, for the other two Chip Selects should it be something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #define SABRESD_ECSPI1_CS2&amp;nbsp;&amp;nbsp; IMX_GPIO_NR(3, 24)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; ECSPI1_CS2 is at pad EIM_D24&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #define SABRESD_ECSPI1_CS1&amp;nbsp;&amp;nbsp; IMX_GPIO_NR(5, 9)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; ECSPI1_CS1 is at pad DISP0_DAT15&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.&amp;nbsp; Along with the above modification I have done following changes, but still no luck:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static int mx6q_sabresd_spi_cs1[] = {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SABRESD_ECSPI1_CS1,&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static int mx6q_sabresd_spi_cs2[] = {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SABRESD_ECSPI1_CS2,&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static const struct spi_imx_master mx6q_sabresd_spi_data1 __initconst = {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .chipselect&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = mx6q_sabresd_spi_cs1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .num_chipselect = ARRAY_SIZE(mx6q_sabresd_spi_cs1),&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;static const struct spi_imx_master mx6q_sabresd_spi_data2 __initconst = {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .chipselect&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = mx6q_sabresd_spi_cs2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .num_chipselect = ARRAY_SIZE(mx6q_sabresd_spi_cs2),&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static void __init mx6_sabresd_board_init(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;-------&lt;/P&gt;&lt;P&gt;-------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; imx6q_add_ecspi(0, &amp;amp;mx6q_sabresd_spi_data1);&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; imx6q_add_ecspi(0, &amp;amp;mx6q_sabresd_spi_data2);&lt;/P&gt;&lt;P&gt;------&lt;/P&gt;&lt;P&gt;------&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still nothing. I need to know if my thinking is correct here or not? How can i configure the ICs using SPI. Is there any documentation which can be referred? Should I get different spidev (like &lt;STRONG&gt;spidev1.0&lt;/STRONG&gt;,&lt;STRONG&gt; spidev1.1&lt;/STRONG&gt; etc.) to configure the different ICs.?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 11:21:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SabreSD-SPI-Driver-Queries/m-p/344002#M47370</guid>
      <dc:creator>Shweta2015</dc:creator>
      <dc:date>2015-02-03T11:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: SabreSD SPI Driver Queries</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SabreSD-SPI-Driver-Queries/m-p/344003#M47371</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;Have you checked this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/message/347425"&gt;iMX53QSB cspi spidev configuration&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The customer was able to register the spidev nodes under dev.&lt;/P&gt;&lt;P&gt;The iomux needs to be configured too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Alejandro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 17:12:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SabreSD-SPI-Driver-Queries/m-p/344003#M47371</guid>
      <dc:creator>alejandrolozan1</dc:creator>
      <dc:date>2015-02-09T17:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: SabreSD SPI Driver Queries</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SabreSD-SPI-Driver-Queries/m-p/344004#M47372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alejandro,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the reply. I have been able to get the device nodes for spidev1.0 and spidev1.1 under /dev by doing something like:&lt;/P&gt;&lt;P&gt;static int mx6q_sabresd_spi_cs1[] = {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SABRESD_ECSPI1_CS1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SABRESD_ECSPI1_CS2,&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i still understand the IOMUXing macro:&lt;/P&gt;&lt;P&gt;#define SABRESD_ECSPI1_CS0&amp;nbsp;&amp;nbsp;&amp;nbsp; IMX_GPIO_NR(4, 9)&lt;/P&gt;&lt;P&gt;How is this configuration done? If I need to have configuration for ECSPI1_CS1, how can that be done, and what is the logic behind this macro definition?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2015 03:31:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SabreSD-SPI-Driver-Queries/m-p/344004#M47372</guid>
      <dc:creator>Shweta2015</dc:creator>
      <dc:date>2015-02-10T03:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: SabreSD SPI Driver Queries</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SabreSD-SPI-Driver-Queries/m-p/344005#M47373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shweta,&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;#define SABRESD_ECSPI1_CS0&amp;nbsp;&amp;nbsp;&amp;nbsp; IMX_GPIO_NR(4, 9)&lt;/P&gt;

&lt;/BLOCKQUOTE&gt;&lt;P&gt;it means the CS0 of SPI1 is connected to pin no. 105 of i.MX6 :smileyhappy: and for programming or coding purpose this only number will useful and also system understand this number only to communication with the CS0 of SPI1 while programming.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMX_GPIO_NR(4,9)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here 4 indicates the bank number and 9 indicates the bit number, now from below simple formula you can derive the actual hardware pin no., and from this pin no. you have to check your SOM board's&amp;nbsp; schematic or diagram whatever you have and then you will find the connector or actual hardware pin on main board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The number of a GPIO is determined by formula :&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;STRONG&gt;(bank no. -1) * 32 + bit number&lt;/STRONG&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;for your case it is 105 GPIO pin no.,&lt;/P&gt;&lt;P&gt;For help of this pin no. you will fin the CS0 pin on hardware connector where it OUT on connector.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;JAYMIN D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2015 04:45:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SabreSD-SPI-Driver-Queries/m-p/344005#M47373</guid>
      <dc:creator>jaymind</dc:creator>
      <dc:date>2015-02-10T04:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: SabreSD SPI Driver Queries</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SabreSD-SPI-Driver-Queries/m-p/344006#M47374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jaymin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply. I have gone though this formula and calculated the 105 value pin number, but I am not able to map it with the data sheet pin number. In the imx6 data sheet, only ball numbers are mentioned and for GPIO4_IO09, the ball number is U6. How does this correspond to 105 pin number (105 number is not given anywhere) ? If say, my ECSPI1_SS2 is on pad EIM_D24, how can I define its IMX_GPIO_NR macro?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, according to the reference manual the default mode set is ALT5 for KEY_ROW1 pad which corresponds to GPIO4_IO09 signal. For setting it to ECSPI1_CS0 signal we need to change the mode to ALT0, where can that be achieved? I got some clue by looking into the file, board-mx6q_sabresd.h, where MX6Q_PAD_KEY_ROW1__GPIO_4_9 has been given, but I feel that it should have been MX6Q_PAD_KEY_ROW1__ECSPI1_SS0 instead for ECSPI1, chip select0. Totally confused here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2015 05:41:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SabreSD-SPI-Driver-Queries/m-p/344006#M47374</guid>
      <dc:creator>Shweta2015</dc:creator>
      <dc:date>2015-02-10T05:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: SabreSD SPI Driver Queries</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SabreSD-SPI-Driver-Queries/m-p/344007#M47375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shweta,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1st thing that the user manual is 5,800 something page approx., hope you referring correct one. :smileycheck:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and if it is correct you have then go to page no. 2087 and topic no. 36.4.125Pad Mux Register (IOMUXC_SW_MUX_CTL_PAD_KEY_ROW1) and page no.&lt;/P&gt;&lt;P&gt;2653 topic no. 36.4.507Select Input Register (IOMUXC_ECSPI1_SS0_SELECT_INPUT) on wards.find for this name in document "&lt;STRONG&gt;IOMUXC_ECSPI1_SS0_SELECT_INPUT field descriptions&lt;/STRONG&gt;" and "&lt;STRONG&gt;IOMUXC_SW_MUX_CTL_PAD_KEY_ROW1 field descriptions&lt;/STRONG&gt;" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as per the table the value of IOMUXC_SW_MUX_CTL_PAD_KEY_ROW1 should be 0x0000 for ALT0 — Select signal ECSPI1_SS0 as I think.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will give you more input regarding to its soon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check it and please find out iomuxreg file in your source directory where we can change the value of IOMUXC_SW_MUX_CTL_PAD_KEY_ROW1 reg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;JAYMIN D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2015 07:49:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SabreSD-SPI-Driver-Queries/m-p/344007#M47375</guid>
      <dc:creator>jaymind</dc:creator>
      <dc:date>2015-02-10T07:49:30Z</dc:date>
    </item>
  </channel>
</rss>

