屏幕手册
各位大神指点一下,这块屏幕要如何驱动呀?
看到内核(zero-5.2.y)里面有这个驱动drivers/gpu/drm/panel/panel-sitronix-st7701.c,好像时mipi的
屏幕厂家给的初始化序列,具体要怎么办呀
//PAGE1
SPI_WriteComm(0xFF);
SPI_WriteData(0x77);
SPI_WriteData(0x01);
SPI_WriteData(0x00);
SPI_WriteData(0x00);
SPI_WriteData(0x10);
SPI_WriteComm(0xC0);
SPI_WriteData(0x3B);
SPI_WriteData(0x00);
SPI_WriteComm(0xC1);
SPI_WriteData(0x0D);
SPI_WriteData(0x02);
SPI_WriteComm(0xC2);
SPI_WriteData(0x31);
SPI_WriteData(0x05);
SPI_WriteComm(0xCd);
SPI_WriteData(0x08);
SPI_WriteComm(0xB0);
SPI_WriteData(0x00); //Positive Voltage Gamma Control
SPI_WriteData(0x11);
SPI_WriteData(0x18);
SPI_WriteData(0x0E);
SPI_WriteData(0x11);
SPI_WriteData(0x06);
SPI_WriteData(0x07);
SPI_WriteData(0x08);
SPI_WriteData(0x07);
SPI_WriteData(0x22);
SPI_WriteData(0x04);
SPI_WriteData(0x12);
SPI_WriteData(0x0F);
SPI_WriteData(0xAA);
SPI_WriteData(0x31);
SPI_WriteData(0x18);
SPI_WriteComm(0xB1);
SPI_WriteData(0x00); //Negative Voltage Gamma Control
SPI_WriteData(0x11);
SPI_WriteData(0x19);
SPI_WriteData(0x0E);
SPI_WriteData(0x12);
SPI_WriteData(0x07);
SPI_WriteData(0x08);
SPI_WriteData(0x08);
SPI_WriteData(0x08);
SPI_WriteData(0x22);
SPI_WriteData(0x04);
SPI_WriteData(0x11);
SPI_WriteData(0x11);
SPI_WriteData(0xA9);
SPI_WriteData(0x32);
SPI_WriteData(0x18);
//PAGE1
SPI_WriteComm(0xFF);
SPI_WriteData(0x77);
SPI_WriteData(0x01);
SPI_WriteData(0x00);
SPI_WriteData(0x00);
SPI_WriteData(0x11);
SPI_WriteComm(0xB0); SPI_WriteData(0x60); //Vop=4.7375v
SPI_WriteComm(0xB1); SPI_WriteData(0x32); //VCOM=32
SPI_WriteComm(0xB2); SPI_WriteData(0x07); //VGH=15v
SPI_WriteComm(0xB3); SPI_WriteData(0x80);
SPI_WriteComm(0xB5); SPI_WriteData(0x49); //VGL=-10.17v
SPI_WriteComm(0xB7); SPI_WriteData(0x85);
SPI_WriteComm(0xB8); SPI_WriteData(0x21); //AVDD=6.6 & AVCL=-4.6
SPI_WriteComm(0xC1); SPI_WriteData(0x78);
SPI_WriteComm(0xC2); SPI_WriteData(0x78);
SPI_WriteComm(0xE0);
SPI_WriteData(0x00);
SPI_WriteData(0x1B);
SPI_WriteData(0x02);
SPI_WriteComm(0xE1);
SPI_WriteData(0x08);
SPI_WriteData(0xA0);
SPI_WriteData(0x00);
SPI_WriteData(0x00);
SPI_WriteData(0x07);
SPI_WriteData(0xA0);
SPI_WriteData(0x00);
SPI_WriteData(0x00);
SPI_WriteData(0x00);
SPI_WriteData(0x44);
SPI_WriteData(0x44);
SPI_WriteComm(0xE2);
SPI_WriteData(0x11);
SPI_WriteData(0x11);
SPI_WriteData(0x44);
SPI_WriteData(0x44);
SPI_WriteData(0xED);
SPI_WriteData(0xA0);
SPI_WriteData(0x00);
SPI_WriteData(0x00);
SPI_WriteData(0xEC);
SPI_WriteData(0xA0);
SPI_WriteData(0x00);
SPI_WriteData(0x00);
SPI_WriteComm(0xE3);
SPI_WriteData(0x00);
SPI_WriteData(0x00);
SPI_WriteData(0x11);
SPI_WriteData(0x11);
SPI_WriteComm(0xE4);
SPI_WriteData(0x44);
SPI_WriteData(0x44);
SPI_WriteComm(0xE5);
SPI_WriteData(0x0A);
SPI_WriteData(0xE9);
SPI_WriteData(0xD8);
SPI_WriteData(0xA0);
SPI_WriteData(0x0C);
SPI_WriteData(0xEB);
SPI_WriteData(0xD8);
SPI_WriteData(0xA0);
SPI_WriteData(0x0E);
SPI_WriteData(0xED);
SPI_WriteData(0xD8);
SPI_WriteData(0xA0);
SPI_WriteData(0x10);
SPI_WriteData(0xEF);
SPI_WriteData(0xD8);
SPI_WriteData(0xA0);
SPI_WriteComm(0xE6);
SPI_WriteData(0x00);
SPI_WriteData(0x00);
SPI_WriteData(0x11);
SPI_WriteData(0x11);
SPI_WriteComm(0xE7);
SPI_WriteData(0x44);
SPI_WriteData(0x44);
SPI_WriteComm(0xE8);
SPI_WriteData(0x09);
SPI_WriteData(0xE8);
SPI_WriteData(0xD8);
SPI_WriteData(0xA0);
SPI_WriteData(0x0B);
SPI_WriteData(0xEA);
SPI_WriteData(0xD8);
SPI_WriteData(0xA0);
SPI_WriteData(0x0D);
SPI_WriteData(0xEC);
SPI_WriteData(0xD8);
SPI_WriteData(0xA0);
SPI_WriteData(0x0F);
SPI_WriteData(0xEE);
SPI_WriteData(0xD8);
SPI_WriteData(0xA0);
SPI_WriteComm(0xEB);
SPI_WriteData(0x02);
SPI_WriteData(0x00);
SPI_WriteData(0xE4);
SPI_WriteData(0xE4);
SPI_WriteData(0x88);
SPI_WriteData(0x00);
SPI_WriteData(0x40);
SPI_WriteComm(0xEC);
SPI_WriteData(0x3C);
SPI_WriteData(0x00);
SPI_WriteComm(0xED);
SPI_WriteData(0xAB);
SPI_WriteData(0x89);
SPI_WriteData(0x76);
SPI_WriteData(0x54);
SPI_WriteData(0x02);
SPI_WriteData(0xFF);
SPI_WriteData(0xFF);
SPI_WriteData(0xFF);
SPI_WriteData(0xFF);
SPI_WriteData(0xFF);
SPI_WriteData(0xFF);
SPI_WriteData(0x20);
SPI_WriteData(0x45);
SPI_WriteData(0x67);
SPI_WriteData(0x98);
SPI_WriteData(0xBA);
SPI_WriteComm(0x36);
SPI_WriteData(0x00);
//-----------VAP & VAN---------------
SPI_WriteComm(0xFF);
SPI_WriteData(0x77);
SPI_WriteData(0x01);
SPI_WriteData(0x00);
SPI_WriteData(0x00);
SPI_WriteData(0x13);
SPI_WriteComm(0xE5);
SPI_WriteData(0xE4);
SPI_WriteComm(0xFF);
SPI_WriteData(0x77);
SPI_WriteData(0x01);
SPI_WriteData(0x00);
SPI_WriteData(0x00);
SPI_WriteData(0x00);
SPI_WriteComm(0x3a);
SPI_WriteData(0x66);
SPI_WriteComm(0x21);
Delay(1);
SPI_WriteComm(0x11);
Delay(120);
SPI_WriteComm(0x29);
离线
你改成RGB初始化就可以了
有点没明白要在哪里改,需要改驱动文件吗
离线
可以用GPIO模拟SPI来点屏
离线