About add a new panel for Vim3

Which Khadas SBC do you use?

VIM3

Which system do you use? Android, Ubuntu, OOWOW or others?

Android

Which version of system do you use? Khadas official images, self built images, or others?

Khadas official images ( Android_9)

Please describe your issue below:

I’m try to add a new panel for the vim3.

I already build up a set to connect the new panel with Vim3, as the follows:

I already check the MIPI and I2C are connected.

but…I have no Clue where should I start for modify the Andorid Kernel source code.

Is there any Instrcetion or gulidline?

thx~

Modify the timing parameter of your MIPI screen in the following file
commonarch/arm64/boot/dts/amlogic/mesong12b_skt-panel.dtsi

Hi xiong.zhang:

nice to see you again~

Is the “mesong12b_skt-panel.dtsi” is all I only need to modify?

if it is true. how can I build it?

Do I only build the “make -j20 bootimage” and burn the boot.img via fastboot?

or I have to build the uboot.

thx for your replies

What is the touch IC of your MIPI screen? After modification, you need to compile the entire Android firmware after modification

my IC Chip is ILI9881C

OK~i will do the entire build~

Then you also need to replace the driver of the touch IC with ILI9881C

Okay I will try to porting the touch driver. I will update my status once I success.

You can use the following commands under the common path to view some modifications and submission of TP -related modifications

git log  --grep=tp

Hi Xiong:

Because I found out the vim3 didn’t even prob LCD.

may I ask how the vim3 decides which LCD’s .dtsi should he use? through I2C? or MIPI?

thx ~

Hello, fix the return value of value to 1 in the board_lcd_detect function in the kvim3.c file in the following path, and do not make detection judgments.

bootloader\uboot\board\khadas\kvim3\kvim3.c

#if (defined (CONFIG_AML_LCD) && defined(CONFIG_TCA6408))
// detect whether the LCD is exist
extern int khadas_mipi_id;
void board_lcd_detect(void)
{
    u8 mask = 0, value = 0;
    int ret = 0;

    // detect RESET pin
    // if the LCD is connected, the RESET pin will be plll high
    // if the LCD is not connected, the RESET pin will be low
    mask = TCA_LCD_RESET_MASK;

    ret = tca6408_get_value(&value, mask);
    if (ret) {
       printf("%s: failed to read LCD_RESET status! error: %d\n", __func__, ret);
       return;
    }

	if (khadas_mipi_id == 2) {//TS101
		value = 1;
	}

    printf("LCD_RESET PIN: %d\n", value);
    setenv_ulong("lcd_exist", value);
}

yes~ I just got tracing to the same place!!

I will continue porting~ thx for your reply~

Hi Xiong:

May I ask how much Voltage of the RESET pin will be considered as High/Low?

Because the panel I connected had provided 2.46V on the RESET pin

but I found TS050 panel had provide 3V.

maybe this reason why the VIM3 can’t prob the panel I connected?

Hello, this can refer to the reset of the TS050, but you can first check whether the voltage of the RESET voltage in the screen of the screen you need to light up can reach 3V. If you can, you can modify the lower circuit. The value of the value is fixed to 1 to skip the detection of LCD existence

Hi xiong:

Now the panel light is on! But there is a problem with the image. I will try to check whether the DDI initial code in .dtsi is correct or not. but I wanna ask is there any other setting I have to set? because my panel resolution is 578 * 1280

hardware-amlogic-hwcomposer

There are also some width and height settings under this path. You can refer to my git log submission.

hi xiong:

I try to search your change in git commit ID:94396709f4393f0f01c92c8572e3824175ef446b

because under the /hardware/amlogic/hwcomposer. there so many setting about resolution…

so i guess i just need change HwcConfig() ?

thx~~

These are modifications to the UI resolution display that are also needed

Hi xiong:

which commit should I reference or which should I need to trace…

thx for your kindly reply

thx…

Track LCD related submissions

git log  --grep=LCD

OK~I trace all your “LCD” changes. it seem need to modify the follows files:

  1. /home/AOSP/AOSP_9/bootloader/uboot/board/khadas/configs/kvim3.h
  2. /home/AOSP/AOSP_9/hardware/amlogic/hwcomposer/common/hwc/HwcConfig.cpp