Inquiry on ST7789V MIPI-DBI Driver Configuration in NCS 2.9.0

Dear,

I recently upgraded my project from NCS 2.4.0 to NCS 2.9.0 and encountered an issue with the ST7789V display driver.

Previously, I used SPI0 to interface with the ST7789V display, and the configuration in my device tree worked fine. However, after upgrading to NCS 2.9.0, I noticed that the driver type for ST7789V has changed to MIPI-DBI, and my previous device tree configuration is no longer applicable.

I have reviewed the nRF Connect SDK documentation, but I could not find any clear guidance on how to correctly configure MIPI-DBI for ST7789V in the new version. Below is my previous device tree configuration that worked in NCS 2.4.0:

&spi0 {
	st7789v@0 {
		compatible = "sitronix,st7789v";
		reg = <0x0>;
		cmd-data-gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
		label = "ST7789V";
		status = "okay";
		spi-max-frequency = <2000000>;
		width = <240>;
		height = <280>;
		x-offset = <0>;
		y-offset = <20>;
		vcom = <0x32>;
		gctrl = <0x35>;
		vrhs = <0x15>;
		mdac = <0x00>;
		gamma = <0x01>;
		colmod = <0x55>;
		lcm = <0x2c>;
		porch-param = [0c 0c 00 33 33];
		cmd2en-param = [5a 69 02 01];
		pwctrl1-param = [a4 a1];
		pvgam-param = [d0 08 0e 09 09 05 31 33 48 17 14 15 31 34];
		nvgam-param = [d0 08 0e 09 09 15 31 33 48 17 14 15 31 34];
		ram-param = [00 f8];
		rgb-param = [cd 08 14];
		vdvs = <0x20>;
		reset-gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
		supply-gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
	};

	status = "okay";
	cs-gpios = <&gpio0 30 GPIO_ACTIVE_LOW>;
};

&spi0_default {
	group1 {
		psels = <NRF_PSEL(SPIM_SCK, 0, 3)>, <NRF_PSEL(SPIM_MOSI, 0, 4)>;
	};
};

/ {
	chosen {
		zephyr,display = &{/soc/spi@40003000/st7789v@0/};
	};
};

Could you please advise on:

  1. How to correctly configure the device tree for ST7789V using MIPI-DBI in NCS 2.9.0?
  2. Are there any specific changes in the SPI or display subsystem that I need to consider?
  3. Is there an example or reference documentation available for migrating from the old driver to the new one?

I appreciate your support and look forward to your guidance.

Best regards,

emmovo

  • Hello.

    I get the same error.
    But it resolved the issue with pixel-format which I could include.


    here is the full overlay.

    #include <zephyr/dt-bindings/display/panel.h>
    #include <zephyr/dt-bindings/mipi_dbi/mipi_dbi.h>
    
    / {
        chosen {
            zephyr,display = &gc9a01;
        };
    
        mipi_dbi {
            compatible = "zephyr,mipi-dbi-spi";
            dc-gpios = <&gpio0 30 GPIO_ACTIVE_HIGH>;
            reset-gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
            spi-dev = <&spi3>;
            #address-cells = <1>;
            #size-cells = <0>;
    
            gc9a01: gc9a01@0 {
                status = "okay";
                compatible = "galaxycore,gc9x01x";
                reg = <0>;
                mipi-max-frequency = <100000000>;
                pixel-format = <PANEL_PIXEL_FORMAT_RGB_565>;
                width = <240>;
                height = <240>;
                display-inversion;
                orientation = "180"; // Set to rotate the display
            };
        };
    };
    
    &spi3_default {
    	group1 {
    		psels = <NRF_PSEL(SPIM_SCK, 0, 28)>,
    				<NRF_PSEL(SPIM_MISO, 0, 4)>,
    				<NRF_PSEL(SPIM_MOSI, 0, 29)>;
    		nordic,drive-mode = <NRF_DRIVE_H0H1>;
    	};
    };

  • OK I did a completely clean build. now it works 100% all good.

  • Great! so with these two

    #include <zephyr/dt-bindings/display/panel.h>
    #include <zephyr/dt-bindings/mipi_dbi/mipi_dbi.h>

    header files and the overlay file I attached before solved the issue?

  • I am having the exact same issue with ST7789V, it works and can display when configured with SPI (NCS SDK 2.7.0), but cannot display when configured with MIPI DBI (NCS SDK 3.0.1). Does it need further configuration? I tried it with the display sample (sample/driver/display).

    overaly:

    / {
    	chosen {
    		zephyr,display = &st7789v;
    	};
    
    	leds {
            compatible = "gpio-leds";
            lcd_backlight: lcd_backlight {
                gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
                label = "LCD Backlight";
            };
        };
    
        mipi_dbi {
            compatible = "zephyr,mipi-dbi-spi";
            status = "okay";
            reset-gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
            dc-gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>;
            spi-dev = <&spi0>;
            write-only;
            #address-cells = <1>;
            #size-cells = <0>;
    
            st7789v: st7789v@0 {
                compatible = "sitronix,st7789v";
                status = "okay";
                reg = <0>;
                mipi-max-frequency = <DT_FREQ_M(8)>;
                mipi-mode = "MIPI_DBI_MODE_SPI_4WIRE";
                width = <240>;
                height = <240>;
                x-offset = <0>;
                y-offset = <0>;
                vcom = <0x19>;
                gctrl = <0x35>;
                vrhs = <0x12>;
                vdvs = <0x20>;
                mdac = <0x00>;
                gamma = <0x01>;
                colmod = <0x05>;
                lcm = <0x2c>;
                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];
            };
        };
    };

Related