SRGB Q&A

How to light up an SRGB type panel?

Take ST7789V+2.4 inch panel as an example:

  1. Determine the chip PAD_MUX according to the schematic diagram and Check List.

    It can be seen from the figure that PAD_TTL0~PAD_TTL3 are multiplexed as SPI interface; PAD_TTL4 is multiplexed as GPIO mode, which should be kept high as the screen reset pin normally; PAD_TTL12~PAD_TTL17 are multiplexed as LCD RGB interface.

    Determine the PAD multiplexing mode according to Check List.

  2. Configure the kernel dts file

    Create a new .dts file in kernel/arch/arm/boot/dts, and find the corresponding register and multiplexing mode in kernel/drivers/sstar/gpio/pioneer3/mhal_pinmux.c, and add the following content to .dts :

    Note: The evaluation version is the panel of rgb888 by default. If the panel is rgb565, the remaining PAD_TTL8 and PAD_TTL11 can be used as gpio.

  3. Configure SPI Mode according to the panel specifications.

    SRGB panel generally sends a command to initialize the panel driver IC through the SPI interface, and the command is provided by the manufacturer. By configuring the SPI mode through the panel specification file , we can see that the high bit (MSB) of the SPI data is first, as the judgment bit of the command/data, so we configure the host SPI to 9bits mode.

  4. Configure panel parameters according to panel specifications

    Refer to TTL Panel to configure parameters.

    Write the panel parameters to config.ini, for example, the path of the SSD21X panel parameter file is project/board/ini/misc/config.ini. There is a panel list in this file, and only one of each interface type (TTL, MIPI, SRGB) can be filled in:

    [ROOT]
    
    m_pnlList = {\
    
    ST7710S,\           //MIPI
    
    ST7789V,\          //SRGB
    
    SAT070AT50,\    //TTL
    
    }
    

    ST7789V panel parameters are as follows

    There are some related options in the config file of /project/configs/defconfigs.

    CONFIG_IS_DEMO_BOARD=3 //select demo board
    
    CONFIG_DISP_OUT_NAME="ST7789V" //select panel parameter
    
    CONFIG_KERNEL_CONFIG="pioneer3_ssc021a_s01a_spinand_defconfig" //Select the compile config of kernel
    
  5. Initialize Panel through MI interface

    Use MI_PANEL_Init for initialization, it will load the screen parameters found in config.ini. After that, run /customer/riu_w 1128 7 a, display the disp image on the panel, and the operation is end.

    If you failed to light up the panel, first of all, check whether the register corresponding to PIN_MUX is set correctly; then run /config/dump_config on the board to check whether the newly added panel parameters in config.ini are loaded successfully. Run cat /proc/mi_modules/mi_panel/mi_panel0 to view the actual panel parameters currently in use.

...