Skip to content

Commit

Permalink
edid belongs to it66021
Browse files Browse the repository at this point in the history
  • Loading branch information
ligenxxxx committed Oct 25, 2023
1 parent 8c2071f commit f1eb9aa
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 37 deletions.
35 changes: 35 additions & 0 deletions src/driver/it66021.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ void IT66021_init() {
IT66021_Mask_WR(1, 0x0f, 0x10, 0x00);

usleep(1000);
IT66021_edid();
}

int IT66021_Sig_det() {
Expand Down Expand Up @@ -297,3 +298,37 @@ void IT66021_Set_CSMatrix(int cs) {
IT66021_Mask_WR(0, 0x65, 0x03, 0x00);
}
}

void IT66021_edid() {
// 0x49->0xc4 must set same data with edid[0x7f]
// 0x49->0xc5 must set same data with edid[0xff]
const uint8_t edid[256] = {
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x26, 0x85, 0x02, 0x66, 0x01, 0x68, 0x00, 0x00,
0x00, 0x17, 0x01, 0x03, 0x80, 0x73, 0x41, 0x78, 0x2A, 0x7C, 0x11, 0x9E, 0x59, 0x47, 0x9B, 0x27,
0x10, 0x50, 0x54, 0x00, 0x00, 0x00, 0x81, 0xC0, 0x81, 0xE8, 0xD1, 0xC0, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x3A, 0x80, 0xD0, 0x72, 0x38, 0x2D, 0x40, 0x58, 0x2C,
0x45, 0x00, 0x10, 0x09, 0x00, 0x00, 0x00, 0x1E, 0x01, 0x1D, 0x00, 0x72, 0x51, 0xD0, 0x1E, 0x20,
0x6E, 0x28, 0x55, 0x00, 0x10, 0x09, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x49,
0x54, 0x45, 0x36, 0x38, 0x30, 0x32, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0xFD,
0x00, 0x30, 0x7A, 0x0F, 0x50, 0x10, 0x00, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x01, 0x2C,
0x02, 0x03, 0x17, 0x74, 0x44, 0x84, 0x9F, 0xA9, 0x90, 0x23, 0x09, 0x07, 0x07, 0x83, 0x01, 0x00,
0x00, 0x65, 0x03, 0x0C, 0x00, 0x10, 0x00, 0x01, 0x1D, 0x00, 0x72, 0x51, 0xD0, 0x1E, 0x20, 0x6E,
0x28, 0x55, 0x00, 0x10, 0x09, 0x00, 0x00, 0x00, 0x1E, 0x02, 0x3A, 0x80, 0xD0, 0x72, 0x38, 0x2D,
0x40, 0x58, 0x2C, 0x45, 0x00, 0x10, 0x09, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDA};
uint16_t i;
I2C_L_Write(0x49, 0xc0, 0x40);
I2C_L_Write(0x49, 0xc4, edid[0x7f]);
I2C_L_Write(0x49, 0xc5, edid[0xff]);

for (i = 0; i < 256; i++) {
I2C_L_Write(0x54, i, edid[i]);
}

I2C_L_Write(0x49, 0xc0, 0x24);
usleep(2000);
I2C_L_Write(0x49, 0xc0, 0x04);
}
1 change: 1 addition & 0 deletions src/driver/it66021.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ int IT66021_Get_VTMG(int *freq_ref);
int IT66021_Get_CS();
void IT66021_Set_CSMatrix(int cs);
int IT66021_Get_PCLKFREQ();
void IT66021_edid();
#endif
36 changes: 0 additions & 36 deletions src/driver/it66121.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,40 +134,4 @@ void IT66121_init() {
I2C_R_Write(ADDR_IT66121, 0x98, 0x02);
I2C_R_Write(ADDR_IT66121, 0x99, 0xd2);
I2C_R_Write(ADDR_IT66121, 0x0f, 0x08);

IT66121_edid();
}

void IT66121_edid() {
// 0x49->0xc4 must set same data with edid[0x7f]
// 0x49->0xc5 must set same data with edid[0xff]
const uint8_t edid[256] = {
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x26, 0x85, 0x02, 0x66, 0x01, 0x68, 0x00, 0x00,
0x00, 0x17, 0x01, 0x03, 0x80, 0x73, 0x41, 0x78, 0x2A, 0x7C, 0x11, 0x9E, 0x59, 0x47, 0x9B, 0x27,
0x10, 0x50, 0x54, 0x00, 0x00, 0x00, 0x81, 0xC0, 0x81, 0xE8, 0xD1, 0xC0, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x3A, 0x80, 0xD0, 0x72, 0x38, 0x2D, 0x40, 0x58, 0x2C,
0x45, 0x00, 0x10, 0x09, 0x00, 0x00, 0x00, 0x1E, 0x01, 0x1D, 0x00, 0x72, 0x51, 0xD0, 0x1E, 0x20,
0x6E, 0x28, 0x55, 0x00, 0x10, 0x09, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x49,
0x54, 0x45, 0x36, 0x38, 0x30, 0x32, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0xFD,
0x00, 0x30, 0x7A, 0x0F, 0x50, 0x10, 0x00, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x01, 0x2C,
0x02, 0x03, 0x17, 0x74, 0x44, 0x84, 0x9F, 0xA9, 0x90, 0x23, 0x09, 0x07, 0x07, 0x83, 0x01, 0x00,
0x00, 0x65, 0x03, 0x0C, 0x00, 0x10, 0x00, 0x01, 0x1D, 0x00, 0x72, 0x51, 0xD0, 0x1E, 0x20, 0x6E,
0x28, 0x55, 0x00, 0x10, 0x09, 0x00, 0x00, 0x00, 0x1E, 0x02, 0x3A, 0x80, 0xD0, 0x72, 0x38, 0x2D,
0x40, 0x58, 0x2C, 0x45, 0x00, 0x10, 0x09, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDA};
uint16_t i;
I2C_L_Write(0x49, 0xc0, 0x40);
I2C_L_Write(0x49, 0xc4, edid[0x7f]);
I2C_L_Write(0x49, 0xc5, edid[0xff]);

for (i = 0; i < 256; i++) {
I2C_L_Write(0x54, i, edid[i]);
}

I2C_L_Write(0x49, 0xc0, 0x24);
usleep(2000);
I2C_L_Write(0x49, 0xc0, 0x04);
}
1 change: 0 additions & 1 deletion src/driver/it66121.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@

void IT66121_close();
void IT66121_init();
void IT66121_edid();
#endif

0 comments on commit f1eb9aa

Please sign in to comment.