<?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>Using LVGL library  ST7789 DISPLAY+FT6336 with nRF52840 using Zephyr</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/122500/using-lvgl-library-st7789-display-ft6336-with-nrf52840-using-zephyr</link><description>i am working on custom board nRF52840 with display ST7789 + touch Ft6336 
 1) i want to use LVGL library with Display how do i get started with LVGL .Any tutorials or sample code in zephyr to get started with LVGL 
 2) how can we use FT6336 touch with</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 26 Jun 2025 10:27:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/122500/using-lvgl-library-st7789-display-ft6336-with-nrf52840-using-zephyr" /><item><title>RE: Using LVGL library  ST7789 DISPLAY+FT6336 with nRF52840 using Zephyr</title><link>https://devzone.nordicsemi.com/thread/540569?ContentTypeID=1</link><pubDate>Thu, 26 Jun 2025 10:27:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a40e35fb-0533-468e-9303-a084d0c10c60</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1) i want to use LVGL library with Display how do i get started with LVGL .Any tutorials or sample code in zephyr&amp;nbsp; to get started with LVGL&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You can start with the zephyr LVGL sample (zephyr\samples\subsys\display\lvgl).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The&amp;nbsp;&lt;/span&gt;&lt;strong&gt;official Zephyr migration guide&lt;/strong&gt;&lt;span&gt;&amp;nbsp;for version 3.7 specifically addresses the ST7789V display and shows how the overlay should be structured using the new MIPI DBI driver class. Here is the relevant example from the documentation:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&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;;
        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;;
        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;;
        lcm = &amp;lt;0x2c&amp;gt;;
        colmod = &amp;lt;0x05&amp;gt;;
        gamma = &amp;lt;0x01&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;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You also need to add some config in thr prj.conf file which you can see in the LVGL sample. For example:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_DISPLAY=y
CONFIG_LVGL=y
CONFIG_LV_MEM_CUSTOM=y
# ... other LVGL and display configs ...&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;source:&amp;nbsp;&amp;nbsp;&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;https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/peripherals/posts/lvgl-on-a-tft-lcd-display-with-the-nrf9160-dk&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;one previous case:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/112255/cst816s-failed-reading-chip-id-with-waveshare-1-69-touch-lcd"&gt;(+) &amp;#39;cst816s: failed reading chip id&amp;#39; with Waveshare 1.69&amp;quot; Touch LCD - Nordic Q&amp;amp;A - Nordic DevZone - Nordic DevZone&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2) how can we use FT6336 touch with LVGL any sample code or links will be helpful&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;There is not direct sample for touch FT6336, but you can look at this case where customer successfully implemented one touch LCD&lt;strong&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/112255/cst816s-failed-reading-chip-id-with-waveshare-1-69-touch-lcd"&gt;(+) &amp;#39;cst816s: failed reading chip id&amp;#39; with Waveshare 1.69&amp;quot; Touch LCD - Nordic Q&amp;amp;A - Nordic DevZone - Nordic DevZone&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you have access to a device tree binding for FT6336 or know that a compatible driver exists, you could attempt to add it as an I2C device in your overlay, similar to how other I2C touch controllers are added. However, I have not seen any concrete example or confirm support for FT6336 in zephyr.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;
&lt;p&gt;Kazi&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>