Facing the issue with the nrf52840-nrf52840dk.overlay file

Hi , am working on nrf52840 .with nrf desktop v2.9.1 . I am working on display ST7789V with the nrf52840 using Zephyr. I have integrated overlay file . while working on it am facing the issue like MiPi_dbi error . even though i integrated it still it is not getting fixed . my .overlay file is as follows: 

/ {
    chosen {
        zephyr,display = &st7789v;
    };
};

/* Configure SPI2 for the display */
&spi2 {
    compatible = "nordic,nrf-spi";
    status = "okay";
    sck-pin = <13>;
    mosi-pin = <15>;
    cs-gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;

    st7789v: st7789v@0 {
        compatible = "sitronix,st7789v";
        reg = <0>;
        spi-max-frequency = <8000000>;
        label = "ST7789V";

        dc-gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
        reset-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
        backlight-gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>;

        width = <240>;
        height = <240>;
        pixel-format = "rgb565";

        x-offset = <0>;
        y-offset = <0>;

        /* Add missing MIPI-DBI property */
        mipi-mode = <0x02>; /* SPI 4-wire mode */
        buswidth = <8>;

        gctrl = <0x35>;
        vcom = <0x19>;
        vrhs = <0x12>;
        vdvs = <0x20>;
        mdac = <0x00>;
        lcm = <0x2c>;
        colmod = <0x05>;
        gamma = <0x01>;

        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];
    };
};
also attaching my proj.conf file as awell
# Enable logging
CONFIG_LOG=y
CONFIG_LOG_DEFAULT_LEVEL=4

# Enable display support
CONFIG_DISPLAY=y
CONFIG_DISPLAY_LOG_LEVEL_DBG=y

# Enable ST7789V display driver
CONFIG_ST7789V=y
CONFIG_ST7789V_RGB565=y

# Enable SPI (needed for ST7789V)
CONFIG_SPI=y
CONFIG_SPI_NRFX=y
CONFIG_MIPI_DBI=y

# Enable GPIO (needed for reset, backlight, and DC signals)
CONFIG_GPIO=y
 any leads /how can i resolve this
Parents
  • Hello,

    Did you include this ''#include <zephyr/dt-bindings/mipi_dbi/mipi_dbi.h>'' on top of the configuration?

  • yes . Include it still no change .  can you verify my overlay file .? also any sample eaxmple will you be able to provide to get started  with ? am using nRf sdk desktop 5.0.3 ncsv 2.9.1 . with nrf 52840 sdk.

    / {
        chosen {
            zephyr,display = &st7789v;
        };
    };

    &spi2 {
        status = "okay";
        sck-pin = <15>;
        mosi-pin = <13>;
        cs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;

       
        mipi_dbi: mipi_dbi@0 {
            compatible = "zephyr,mipi-dbi-spi";
            reg = <0>;  // SPI chip select 0
            reset-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
            dc-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
            spi-max-frequency = <8000000>;
            spi-dev = <&st7789v>;

         
            #address-cells = <1>;
            #size-cells = <0>;
     

            st7789v: st7789v@0 {
               compatible = "sitronix,st7789v";
               reg = <0>;  // Just needs to be unique from mipi_dbi
               spi-max-frequency = <8000000>;

               width = <240>;
               height = <240>;
               pixel-format = "rgb565";
               x-offset = <0>;
               y-offset = <0>;

               buswidth = <8>;
               mipi-mode = <2>; // SPI 4-wire

               gctrl = <0x35>;
               vcom = <0x19>;
               vrhs = <0x12>;
               vdvs = <0x20>;
               mdac = <0x00>;
               lcm = <0x2c>;
               colmod = <0x05>;
               gamma = <0x01>;

               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];
               backlight-gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
        };
    };
    };
     
    also let me know any changes required to this overlay let me know.

Reply
  • yes . Include it still no change .  can you verify my overlay file .? also any sample eaxmple will you be able to provide to get started  with ? am using nRf sdk desktop 5.0.3 ncsv 2.9.1 . with nrf 52840 sdk.

    / {
        chosen {
            zephyr,display = &st7789v;
        };
    };

    &spi2 {
        status = "okay";
        sck-pin = <15>;
        mosi-pin = <13>;
        cs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;

       
        mipi_dbi: mipi_dbi@0 {
            compatible = "zephyr,mipi-dbi-spi";
            reg = <0>;  // SPI chip select 0
            reset-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
            dc-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
            spi-max-frequency = <8000000>;
            spi-dev = <&st7789v>;

         
            #address-cells = <1>;
            #size-cells = <0>;
     

            st7789v: st7789v@0 {
               compatible = "sitronix,st7789v";
               reg = <0>;  // Just needs to be unique from mipi_dbi
               spi-max-frequency = <8000000>;

               width = <240>;
               height = <240>;
               pixel-format = "rgb565";
               x-offset = <0>;
               y-offset = <0>;

               buswidth = <8>;
               mipi-mode = <2>; // SPI 4-wire

               gctrl = <0x35>;
               vcom = <0x19>;
               vrhs = <0x12>;
               vdvs = <0x20>;
               mdac = <0x00>;
               lcm = <0x2c>;
               colmod = <0x05>;
               gamma = <0x01>;

               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];
               backlight-gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
        };
    };
    };
     
    also let me know any changes required to this overlay let me know.

Children
No Data
Related