<?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: SPI Communication Issue with MISO/MOSI on i.MX8MP for LED Board</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/SPI-Communication-Issue-with-MISO-MOSI-on-i-MX8MP-for-LED-Board/m-p/2022159#M232626</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;Both &lt;STRONG&gt;CS&amp;nbsp;&lt;/STRONG&gt;and &lt;STRONG&gt;SCLK&amp;nbsp;&lt;/STRONG&gt;are typically essential, along with &lt;STRONG&gt;MOSI &lt;/STRONG&gt;and &lt;STRONG&gt;MISO&lt;/STRONG&gt;. Without these, the communication protocol would not function correctly.&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Zhiming&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jan 2025 01:03:06 GMT</pubDate>
    <dc:creator>Zhiming_Liu</dc:creator>
    <dc:date>2025-01-06T01:03:06Z</dc:date>
    <item>
      <title>SPI Communication Issue with MISO/MOSI on i.MX8MP for LED Board</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SPI-Communication-Issue-with-MISO-MOSI-on-i-MX8MP-for-LED-Board/m-p/2020895#M232505</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Hi NXP Team,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;We are working on a custom board with the i.MX8MP processor and are trying to establish SPI communication with an LED board connected via the following pins:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;UART3_CTS_3V3&lt;/STRONG&gt; = &lt;STRONG&gt;ECSPI1_MISO&lt;/STRONG&gt; = &lt;STRONG&gt;LED_DOUT_3V3&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;UART3_RXD_3V3&lt;/STRONG&gt; = &lt;STRONG&gt;ECSPI1_MOSI&lt;/STRONG&gt; = &lt;STRONG&gt;LED_DIN_3V3&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;We have the following device tree configuration:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;&lt;SPAN&gt;269 &amp;amp;ecspi1 {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;270 &amp;nbsp; &amp;nbsp; pinctrl-names = "default";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;271 &amp;nbsp; &amp;nbsp; pinctrl-0 = &amp;lt;&amp;amp;pinctrl_ecspi1&amp;gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;272 &amp;nbsp; &amp;nbsp; status = "okay";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;273&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;274 &amp;nbsp; &amp;nbsp; leds-gpio@1 {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;275 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; compatible = "custom,leds-gpio"; /* Update to your specific LED driver */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;276 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; reg = &amp;lt;1&amp;gt;; /* SPI chip select 0 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;278 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; spi-max-frequency = &amp;lt;1200000&amp;gt;; /* 1 MHz */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;279 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; status = "okay";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;282 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; leds {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;283 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; compatible = "spi,rgb-leds";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;284 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; led-names = "red", "green", "blue";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;285 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; led-count = &amp;lt;8&amp;gt;; /* Adjust based on the number of LEDs */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;286 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;287 &amp;nbsp; &amp;nbsp; };&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;288 };&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1154 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pinctrl_ecspi1: ecspi1grp {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1155 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fsl,pins = &amp;lt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1157 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MX8MP_IOMUXC_ECSPI1_MOSI__ECSPI1_MOSI &amp;nbsp; 0x00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1158 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MX8MP_IOMUXC_ECSPI1_MISO__ECSPI1_MISO &amp;nbsp; 0x00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1159&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1160&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;H3&gt;Current Issues:&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;No Chip Select (CS) or SCLK Connection&lt;/STRONG&gt;&lt;BR /&gt;The LED board is only connected to the MISO and MOSI pins, without a CS pin or SCLK connection. Can SPI communication be achieved with only these two pins?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Driver Initialization&lt;/STRONG&gt;&lt;BR /&gt;The SPI driver initializes without errors, as seen in the logs:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;[ 142.944595] LED count not specified &lt;SPAN class=""&gt;in&lt;/SPAN&gt; DT, defaulting to 8 [ 142.950130] Sending data to RGB LEDs... [ 142.950655] SPI data sent successfully [ 142.950669] leds-gpio spi1.1: RGB LED SPI driver initialized [ 142.956376] RGB LED SPI driver initialized&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Device Testing Fails&lt;/STRONG&gt;&lt;BR /&gt;The device appears under /sys/bus/spi/devices/spi1.0:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;root@imx8mp-lpddr4-evk:~&lt;SPAN class=""&gt;# cat /sys/bus/spi/devices/spi1.0/modalias&lt;/SPAN&gt; spi:leds-gpio&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;However, when attempting to test the device using spidev_test, it fails:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;root@imx8mp-lpddr4-evk:~&lt;SPAN class=""&gt;# spidev_test -D /dev/spidev1.0 -v&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;can&lt;SPAN class=""&gt;'t open device: No such file Aborted &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;No LEDs in /sys/class/leds&lt;/STRONG&gt;&lt;BR /&gt;The LEDs are not exposed under /sys/class/leds, and I cannot control them directly:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;root@imx8mp-lpddr4-evk:~&lt;SPAN class=""&gt;# ls /sys/class/leds/&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;mmc1:: mmc2::&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;H3&gt;Questions:&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;Is the above DTS configuration correct for SPI communication over MISO and MOSI without CS or SCLK?&lt;/LI&gt;&lt;LI&gt;Can SPI communication with the LED board be established using only MISO and MOSI?&lt;/LI&gt;&lt;LI&gt;How can I resolve the issue with the device node /dev/spidev1.0 not being accessible?&lt;/LI&gt;&lt;LI&gt;What changes are required to expose the LEDs in /sys/class/leds for direct control?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Any guidance or suggestions would be greatly appreciated.&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jan 2025 14:12:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SPI-Communication-Issue-with-MISO-MOSI-on-i-MX8MP-for-LED-Board/m-p/2020895#M232505</guid>
      <dc:creator>MJD</dc:creator>
      <dc:date>2025-01-01T14:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: SPI Communication Issue with MISO/MOSI on i.MX8MP for LED Board</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SPI-Communication-Issue-with-MISO-MOSI-on-i-MX8MP-for-LED-Board/m-p/2022159#M232626</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;Both &lt;STRONG&gt;CS&amp;nbsp;&lt;/STRONG&gt;and &lt;STRONG&gt;SCLK&amp;nbsp;&lt;/STRONG&gt;are typically essential, along with &lt;STRONG&gt;MOSI &lt;/STRONG&gt;and &lt;STRONG&gt;MISO&lt;/STRONG&gt;. Without these, the communication protocol would not function correctly.&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Zhiming&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2025 01:03:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SPI-Communication-Issue-with-MISO-MOSI-on-i-MX8MP-for-LED-Board/m-p/2022159#M232626</guid>
      <dc:creator>Zhiming_Liu</dc:creator>
      <dc:date>2025-01-06T01:03:06Z</dc:date>
    </item>
  </channel>
</rss>

