<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Working devicetree for ST7789v display</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116909/working-devicetree-for-st7789v-display</link><description>I have several of these 135x240 display modules that work effortlessly with all of my development platforms, all except for nRF Connect of course. 
 
 I can&amp;#39;t even get Zephyr&amp;#39;s bare minimum display driver sample to work after a week of struggle. Note</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 11 May 2025 23:57:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116909/working-devicetree-for-st7789v-display" /><item><title>RE: Working devicetree for ST7789v display</title><link>https://devzone.nordicsemi.com/thread/534775?ContentTypeID=1</link><pubDate>Sun, 11 May 2025 23:57:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51cc964c-5107-49e3-943e-ffc4a057da62</guid><dc:creator>lcj</dc:creator><description>&lt;p&gt;I don&amp;#39;t know if you made any progress, but I have it running on a dk with:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;spi4 {
	compatible = &amp;quot;nordic,nrf-spim&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	pinctrl-0 = &amp;lt;&amp;amp;spi4_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;spi4_sleep&amp;gt;;
    pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
	cs-gpios = &amp;lt;&amp;amp;gpio0 11 GPIO_ACTIVE_LOW&amp;gt;;

    st7789v_st7789v_tl019fqv01: st7789v@0 {
        compatible = &amp;quot;sitronix,st7789v&amp;quot;;
        spi-max-frequency = &amp;lt;20000000&amp;gt;;
        reg = &amp;lt;0&amp;gt;;
        cmd-data-gpios = &amp;lt; &amp;amp;gpio1 11 GPIO_ACTIVE_LOW&amp;gt;;
        reset-gpios = &amp;lt; &amp;amp;gpio1 10 GPIO_ACTIVE_LOW&amp;gt;;
        width = &amp;lt;240&amp;gt;;
        height = &amp;lt;280&amp;gt;;
        x-offset = &amp;lt;0&amp;gt;;
        y-offset = &amp;lt;20&amp;gt;;
        vcom = &amp;lt;0x19&amp;gt;;
        gctrl = &amp;lt;0x35&amp;gt;;
        vrhs = &amp;lt;0x12&amp;gt;;
        vdvs = &amp;lt;0x20&amp;gt;;
        mdac = &amp;lt;0x00&amp;gt;;
        gamma = &amp;lt;0x01&amp;gt;;
        colmod = &amp;lt;0x05&amp;gt;;
        lcm = &amp;lt;0x2c&amp;gt;;
        porch-param = [0c 0c 00 33 33];
        cmd2en-param = [5a 69 02 01];
        pwctrl1-param = [a4 a1];
        pvgam-param = [D0 04 0D 11 13 2B 3F 54 4C 18 0D 0B 1F 23];
        nvgam-param = [D0 04 0C 11 13 2C 3F 44 51 2F 1F 1F 20 23];
        ram-param = [00 F0];
        rgb-param = [CD 08 14];
	};
};

/ {
    chosen {
        zephyr,display = &amp;amp;st7789v_st7789v_tl019fqv01;
    };

};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Of course I&amp;#39;m trying to get it going with 2.9.1 and mipi&amp;nbsp;and I am struggling.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Working devicetree for ST7789v display</title><link>https://devzone.nordicsemi.com/thread/513803?ContentTypeID=1</link><pubDate>Fri, 06 Dec 2024 10:20:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7f95fe6-e89a-4051-9291-bbf8d0c69c74</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;I&amp;#39;m sorry that we could not provide the correct solution for a very specific board.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Working devicetree for ST7789v display</title><link>https://devzone.nordicsemi.com/thread/513657?ContentTypeID=1</link><pubDate>Thu, 05 Dec 2024 14:23:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97a56897-116e-4da6-9f15-0a8912442334</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Thank you for acknowledging the approach of eliminating variables—it’s often a necessary step in troubleshooting setups like this. That said, I understand that you’ve already taken several key steps and verified many aspects of the configuration yourself.&lt;/p&gt;
&lt;p&gt;I ask again&lt;/p&gt;
[quote user="oys"]Have you measured the pins and verified the VDD? Do you have access to a logic analyzer to view the signal coming on the configured GPIOs?&amp;nbsp;&lt;br /&gt;[/quote]
&lt;p&gt;and&amp;nbsp;&lt;/p&gt;
[quote user="oys"]Have you verified that the correct signals on the SPI lines?&amp;nbsp;[/quote]
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Working devicetree for ST7789v display</title><link>https://devzone.nordicsemi.com/thread/513449?ContentTypeID=1</link><pubDate>Wed, 04 Dec 2024 13:54:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5048864-d654-43d0-9257-bad2ff36da4c</guid><dc:creator>&amp;#216;yvind</dc:creator><description>[quote user="ace.johnny"]As per my original post, I&amp;#39;m working from the &lt;a title="nRF Connect SDK v2.7.0 - Zephyr - Samples - Display Driver" href="https://docs.nordicsemi.com/bundle/ncs-2.7.0/page/zephyr/samples/drivers/display/README.html"&gt;Zephyr Display Driver&lt;/a&gt; sample.[/quote]
&lt;p&gt;Understood, the reason for why I ask it to look at the configurations that you&amp;#39;ve added to prj.conf. As the sample zephyr\samples\drivers\display\ does not include many configurations.&amp;nbsp;&lt;/p&gt;
[quote user="ace.johnny"]The only difference being that I connected to (and level-shifted) the DK&amp;#39;s Arduino I2C header pins.&lt;br /&gt;[/quote]
&lt;p&gt;There is a&amp;nbsp;difference in regards to I2C vs SPI, and as you point out the need for a level shifter.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you verified that the correct signals on the SPI lines?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;A colleague of mine does have an ST7789v and tested with his nRF5340DK&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/ {
    chosen {
        zephyr,display = &amp;amp;st7789v_ips_240x240;
    };
};
 
&amp;amp;arduino_spi {
    status = &amp;quot;okay&amp;quot;;
    cs-gpios = &amp;lt;&amp;amp;arduino_header 16 GPIO_ACTIVE_LOW&amp;gt;;    /* D10 */
 
    st7789v_ips_240x240: st7789v@0 {
        compatible = &amp;quot;sitronix,st7789v&amp;quot;;
        spi-max-frequency = &amp;lt;20000000&amp;gt;;
        reg = &amp;lt;0&amp;gt;;
        cmd-data-gpios = &amp;lt;&amp;amp;arduino_header 15 GPIO_ACTIVE_LOW&amp;gt;;  /* D9 */
        reset-gpios = &amp;lt;&amp;amp;arduino_header 14 GPIO_ACTIVE_LOW&amp;gt;; /* D8 */
        width = &amp;lt;240&amp;gt;;
        height = &amp;lt;240&amp;gt;;
        x-offset = &amp;lt;0&amp;gt;;
        y-offset = &amp;lt;0&amp;gt;;
        vcom = &amp;lt;0x19&amp;gt;;
        gctrl = &amp;lt;0x35&amp;gt;;
        vrhs = &amp;lt;0x12&amp;gt;;
        vdvs = &amp;lt;0x20&amp;gt;;
        mdac = &amp;lt;0x00&amp;gt;;
        gamma = &amp;lt;0x01&amp;gt;;
        colmod = &amp;lt;0x05&amp;gt;;
        lcm = &amp;lt;0x2c&amp;gt;;
        porch-param = [0c 0c 00 33 33];
        cmd2en-param = [5a 69 02 01];
        pwctrl1-param = [a4 a1];
        pvgam-param = [D0 04 0D 11 13 2B 3F 54 4C 18 0D 0B 1F 23];
        nvgam-param = [D0 04 0C 11 13 2C 3F 44 51 2F 1F 1F 20 23];
        ram-param = [00 F0];
        rgb-param = [CD 08 14];
    };
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This is &lt;span&gt;lvgl example&amp;nbsp;&lt;/span&gt;built for&amp;nbsp;&lt;span&gt;nrf5340dk_nrf5340_cpuapp_ns.overlay and with the following configurations in prj.conf&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;CONFIG_LV_Z_MEM_POOL_NUMBER_BLOCKS=8
CONFIG_MAIN_STACK_SIZE=2048
 
CONFIG_DISPLAY=y
CONFIG_DISPLAY_LOG_LEVEL_ERR=y
 
CONFIG_LOG=y
 
CONFIG_LVGL=y
CONFIG_LV_MEM_CUSTOM=y
CONFIG_LV_USE_LOG=y
CONFIG_LV_USE_LABEL=y
CONFIG_LV_USE_BTN=y
CONFIG_LV_USE_IMG=y
CONFIG_LV_FONT_MONTSERRAT_14=y
 
# SPI ST7789
CONFIG_ST7789V=y
CONFIG_ST7789V_RGB565=y
 
# ST7789 Settings for LVGL
CONFIG_LV_Z_BITS_PER_PIXEL=16
CONFIG_LV_COLOR_DEPTH_16=y
CONFIG_LV_COLOR_16_SWAP=y&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Have a look at this .pdf as well:&amp;nbsp;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nRF5340_5F00_5F00_5F00_Display1.3.pdf"&gt;devzone.nordicsemi.com/.../nRF5340_5F00_5F00_5F00_Display1.3.pdf&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I hope this helps.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Working devicetree for ST7789v display</title><link>https://devzone.nordicsemi.com/thread/513347?ContentTypeID=1</link><pubDate>Wed, 04 Dec 2024 07:56:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0419ee5c-867e-4fe0-8eed-20dc88873dfb</guid><dc:creator>&amp;#216;yvind</dc:creator><description>[quote user="ace.johnny"]I&amp;#39;ve already scoured DevZone and GitHub for answers (I only asked for help because I&amp;#39;m stumped), and have studied both the guide you mentioned, along with one for the SSD1306 as well.[/quote]
&lt;p&gt;I fully agree with you with regards to getting the SSD1306 up and running. The ST7789 should be as straight forward when using the Zephyr drivers. I do not currently have this display, but am looking internally for one.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Assuming that you are using same the SPI pins as the SSD1306?&lt;/p&gt;
[quote user="ace.johnny"]Please note, as I previously stated, that I&amp;#39;m on NCS v2.7.0 (Zephyr v3.6), so the MIPI wrapper advice is not applicable. I&amp;#39;m well aware of the instability and breaking changes in NCS v2.8.0 (Zephyr 3.7), which is why I&amp;#39;m still waiting for the dust to settle.[/quote]
&lt;p&gt;Yeah, it was a long shot, hoping that it might be something there to use.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;What board are you building for?&lt;/p&gt;
[quote user=""]I&amp;#39;m using the &lt;strong&gt;nRF5340 Audio DK&lt;/strong&gt; which is fixed at 1v8, so I&amp;#39;m correctly level-shifting the SPI signals to 3v3 for the display module, and I&amp;#39;m using the appropriate Arduino SPI header pins on the DK for the connections, with the backlight directly tied to 3v3 and always on.[/quote]
&lt;p&gt;Have you measured the pins and verified the VDD? Do you have access to a logic analyzer to view the signal coming on the configured GPIOs?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Could you share the SSD1306 application that works for you?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;br /&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Working devicetree for ST7789v display</title><link>https://devzone.nordicsemi.com/thread/513178?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2024 11:22:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9c480b1-7993-4eaf-ab74-029ad364b7b9</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My initial search in DevZone gave me the following guide:&lt;a href="https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/peripherals/posts/lvgl-on-a-tft-lcd-display-with-the-nrf9160-dk"&gt;LVGL on a TFT LCD Display with the nRF9160 DK&lt;/a&gt;Did you see this? Here we show how to use the ST7789 on an nRF9160DK.&lt;/p&gt;
&lt;p&gt;Note that the drivers to this display is not provided by Nordic Semiconductor but the Zephyr Project community.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;From the &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/releases/migration-guide-3.7.html#display"&gt;migration notes of v3.7.0 of the Zephyr OS it states about display&lt;/a&gt;:&amp;nbsp;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span&gt;ST7789V based displays now use the MIPI DBI driver class. These displays must now be declared within a MIPI DBI driver wrapper device, which will manage interfacing with the display. (&lt;/span&gt;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/issues/73750"&gt;GitHub #73750&lt;/a&gt;&lt;span&gt;) Note that the&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span&gt;cmd-data-gpios&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;pin has changed polarity with this update, to align better with the new&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span&gt;dc-gpios&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;name.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/* Legacy ST7789V display definition */
&amp;amp;spi0 {
    st7789: st7789@0 {
        compatible = &amp;quot;sitronix,st7789v&amp;quot;;
        reg = &amp;lt;0&amp;gt;;
        spi-max-frequency = &amp;lt;32000000&amp;gt;;
        reset-gpios = &amp;lt;&amp;amp;gpio0 6 GPIO_ACTIVE_LOW&amp;gt;;
        cmd-data-gpios = &amp;lt;&amp;amp;gpio0 12 GPIO_ACTIVE_LOW&amp;gt;;
        ...
    };
};

/* New display definition with MIPI DBI device */

#include &amp;lt;zephyr/dt-bindings/mipi_dbi/mipi_dbi.h&amp;gt;

...

mipi_dbi {
    compatible = &amp;quot;zephyr,mipi-dbi-spi&amp;quot;;
    reset-gpios = &amp;lt;&amp;amp;gpio0 6 GPIO_ACTIVE_LOW&amp;gt;;
    dc-gpios = &amp;lt;&amp;amp;gpio0 12 GPIO_ACTIVE_HIGH&amp;gt;;
    spi-dev = &amp;lt;&amp;amp;spi0&amp;gt;;
    #address-cells = &amp;lt;1&amp;gt;;
    #size-cells = &amp;lt;0&amp;gt;;

    st7789: st7789@0 {
        compatible = &amp;quot;sitronix,st7789v&amp;quot;;
        reg = &amp;lt;0&amp;gt;;
        mipi-max-frequency = &amp;lt;32000000&amp;gt;;
        mipi-mode = &amp;lt;MIPI_DBI_MODE_SPI_4WIRE&amp;gt;;
        ...
    };
};
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;span&gt;If this does not help, I suggest &lt;a href="https://discord.com/invite/Ck7jw53nU2"&gt;reaching out to the Zephyr Community on Discord&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>