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,

    '' spi-dev = <&st7789v>;'' the spi-dev property in the mipi_dbi node should point to the SPI bus (&spi2), not to the display controller.

    And the nesting of your nodes isn't quite right - the ST7789V should be a child of the MIPI DBI node, but they should be properly separated.

    So, try this

    / {
        chosen {
            zephyr,display = &st7789v;
        };
    };
    
    &spi2 {
        status = "okay";
        sck-pin = <15>;
        mosi-pin = <13>;
        cs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
    };
    
    mipi_dbi {
        compatible = "zephyr,mipi-dbi-spi";
        reset-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
        dc-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
        spi-dev = <&spi2>;
        #address-cells = <1>;
        #size-cells = <0>;
    
        st7789v: st7789v@0 {
            compatible = "sitronix,st7789v";
            reg = <0>;
            mipi-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>;
        };
    };

  • yes . I fixed the overlay issues .  but am now facing the warning with the proj. conf . how to resolve it .  

    my proj.conf is as follows:


    # Logging
    CONFIG_LOG=y
    CONFIG_LOG_DEFAULT_LEVEL=4

    # Display framework
    CONFIG_DISPLAY=y
    CONFIG_DISPLAY_LOG_LEVEL_DBG=y

    # ST7789V driver via MIPI-DBI SPI interface
    CONFIG_MIPI_DBI=y
    CONFIG_MIPI_DBI_SPI=y
    #CONFIG_SITRONIX_ST7789V=y
    #CONFIG_SITRONIX_ST7789V_RGB565=y
    CONFIG_DISPLAY_ST7789V=y
    CONFIG_DISPLAY_ST7789V_RGB565=y
     

    # SPI & GPIO drivers
    CONFIG_SPI=y
    CONFIG_SPI_NRFX=y
    CONFIG_GPIO=y
     
    Cmakelists.txt:
    # SPDX-License-Identifier: Apache-2.0

    cmake_minimum_required(VERSION 3.20.0)
    find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
    project(st7789v_display_example)

    target_sources(app PRIVATE src/main.c)

    # Add the ST7789V driver source file
    #zephyr_library()
    zephyr_library_include_directories(drivers/display)
    zephyr_library_sources(${ZEPHYR_BASE}/drivers/display/display_st7789v.c) . please let me know if anything am miising out?

Reply
  • yes . I fixed the overlay issues .  but am now facing the warning with the proj. conf . how to resolve it .  

    my proj.conf is as follows:


    # Logging
    CONFIG_LOG=y
    CONFIG_LOG_DEFAULT_LEVEL=4

    # Display framework
    CONFIG_DISPLAY=y
    CONFIG_DISPLAY_LOG_LEVEL_DBG=y

    # ST7789V driver via MIPI-DBI SPI interface
    CONFIG_MIPI_DBI=y
    CONFIG_MIPI_DBI_SPI=y
    #CONFIG_SITRONIX_ST7789V=y
    #CONFIG_SITRONIX_ST7789V_RGB565=y
    CONFIG_DISPLAY_ST7789V=y
    CONFIG_DISPLAY_ST7789V_RGB565=y
     

    # SPI & GPIO drivers
    CONFIG_SPI=y
    CONFIG_SPI_NRFX=y
    CONFIG_GPIO=y
     
    Cmakelists.txt:
    # SPDX-License-Identifier: Apache-2.0

    cmake_minimum_required(VERSION 3.20.0)
    find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
    project(st7789v_display_example)

    target_sources(app PRIVATE src/main.c)

    # Add the ST7789V driver source file
    #zephyr_library()
    zephyr_library_include_directories(drivers/display)
    zephyr_library_sources(${ZEPHYR_BASE}/drivers/display/display_st7789v.c) . please let me know if anything am miising out?

Children
No Data
Related