Beaglebone Black with display TK043F1508 – AC1582

A short guide on how to connect and run TK043F1508 – AC1582 display on Beaglebone Black Linux

Basic information about display and board

  1. Display is connected with touchscreen
  2. Main controller of display is NT35510
  3. Touch screen based on Focaltech FT5216
  4. Board with display looks like on following picture
  5. Display size 4,3″

Display have many of control mode which allows to connect to MCU, MPU. In this guide display will be connected to MPU (RGB+SPI).

Display is factory configured to work with MCU, so some modification are necessary.

To be able to drive the display with RGB standard additional signals other than RGB are necessary – PCLK, DE or VSYNC, HSYNC.

Decided to use signals PCLK and DE.

Next is change control mode to RBG+SPI(16bits)

Note: On PCB IM0-3 are available but on display connector only IM0 and IM1 are present.

Based on documentation found the right pins position

According above modify configuration resistors as follow

After short investigation captured pins and their destination on Beaglebone Black and TFT LCD display

Display connector pinout on PCB

Due to not all RGB pins are present on Beaglebone Black header some of RGB signal on LCD goldpin needs to be connected to GND.

List of pin connection between Beaglebone Black and Display

To get the display work it is necessary to add somewhere into Linux code initialization procedure and modify the Kernel

Initialization procedure is simple and look as follow

static void initialise_lcd_panael(void)
{
udelay(50000);

spi_send_cmd_nt35510(0xF000);spi_send_data_nt35510(0x55);
spi_send_cmd_nt35510(0xF001);spi_send_data_nt35510(0xAA);
spi_send_cmd_nt35510(0xF002);spi_send_data_nt35510(0x52);
spi_send_cmd_nt35510(0xF003);spi_send_data_nt35510(0x08);
spi_send_cmd_nt35510(0xF004);spi_send_data_nt35510(0x01);

spi_send_cmd_nt35510(0xBC01);spi_send_data_nt35510(0xA8);
spi_send_cmd_nt35510(0xBC02);spi_send_data_nt35510(0x10);
spi_send_cmd_nt35510(0xBD01);spi_send_data_nt35510(0xA8);
spi_send_cmd_nt35510(0xBD02);spi_send_data_nt35510(0x10);

spi_send_cmd_nt35510(0xBE01);spi_send_data_nt35510(0x6C);
//R+
spi_send_cmd_nt35510(0xD100);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD101);spi_send_data_nt35510(0x5D);
spi_send_cmd_nt35510(0xD102);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD103);spi_send_data_nt35510(0x69);
spi_send_cmd_nt35510(0xD104);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD105);spi_send_data_nt35510(0x7F);
spi_send_cmd_nt35510(0xD106);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD107);spi_send_data_nt35510(0x92);
spi_send_cmd_nt35510(0xD108);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD109);spi_send_data_nt35510(0xA3);
spi_send_cmd_nt35510(0xD10A);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD10B);spi_send_data_nt35510(0xBF);
spi_send_cmd_nt35510(0xD10C);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD10D);spi_send_data_nt35510(0xD8);
spi_send_cmd_nt35510(0xD10E);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD10F);spi_send_data_nt35510(0xFE);
spi_send_cmd_nt35510(0xD110);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD111);spi_send_data_nt35510(0x1D);
spi_send_cmd_nt35510(0xD112);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD113);spi_send_data_nt35510(0x4E);
spi_send_cmd_nt35510(0xD114);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD115);spi_send_data_nt35510(0x73);
spi_send_cmd_nt35510(0xD116);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD117);spi_send_data_nt35510(0xAD);
spi_send_cmd_nt35510(0xD118);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD119);spi_send_data_nt35510(0xDC);
spi_send_cmd_nt35510(0xD11A);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD11B);spi_send_data_nt35510(0xDD);
spi_send_cmd_nt35510(0xD11C);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD11D);spi_send_data_nt35510(0x05);
spi_send_cmd_nt35510(0xD11E);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD11F);spi_send_data_nt35510(0x2D);
spi_send_cmd_nt35510(0xD120);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD121);spi_send_data_nt35510(0x43);
spi_send_cmd_nt35510(0xD122);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD123);spi_send_data_nt35510(0x60);
spi_send_cmd_nt35510(0xD124);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD125);spi_send_data_nt35510(0x79);
spi_send_cmd_nt35510(0xD126);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD127);spi_send_data_nt35510(0xA5);
spi_send_cmd_nt35510(0xD128);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD129);spi_send_data_nt35510(0xCE);
spi_send_cmd_nt35510(0xD12A);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD12B);spi_send_data_nt35510(0x0F);
spi_send_cmd_nt35510(0xD12C);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD12D);spi_send_data_nt35510(0x49);
spi_send_cmd_nt35510(0xD12E);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD12F);spi_send_data_nt35510(0x83);
spi_send_cmd_nt35510(0xD130);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD131);spi_send_data_nt35510(0xC7);
spi_send_cmd_nt35510(0xD132);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD133);spi_send_data_nt35510(0xCC);
//G+
spi_send_cmd_nt35510(0xD200);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD201);spi_send_data_nt35510(0x5D);
spi_send_cmd_nt35510(0xD202);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD203);spi_send_data_nt35510(0x69);
spi_send_cmd_nt35510(0xD204);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD205);spi_send_data_nt35510(0x7F);
spi_send_cmd_nt35510(0xD206);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD207);spi_send_data_nt35510(0x92);
spi_send_cmd_nt35510(0xD208);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD209);spi_send_data_nt35510(0xA3);
spi_send_cmd_nt35510(0xD20A);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD20B);spi_send_data_nt35510(0xBF);
spi_send_cmd_nt35510(0xD20C);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD20D);spi_send_data_nt35510(0xD8);
spi_send_cmd_nt35510(0xD20E);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD20F);spi_send_data_nt35510(0xFE);
spi_send_cmd_nt35510(0xD210);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD211);spi_send_data_nt35510(0x1D);
spi_send_cmd_nt35510(0xD212);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD213);spi_send_data_nt35510(0x4E);
spi_send_cmd_nt35510(0xD214);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD215);spi_send_data_nt35510(0x73);
spi_send_cmd_nt35510(0xD216);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD217);spi_send_data_nt35510(0xAD);
spi_send_cmd_nt35510(0xD218);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD219);spi_send_data_nt35510(0xDC);
spi_send_cmd_nt35510(0xD21A);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD21B);spi_send_data_nt35510(0xDD);
spi_send_cmd_nt35510(0xD21C);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD21D);spi_send_data_nt35510(0x05);
spi_send_cmd_nt35510(0xD21E);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD21F);spi_send_data_nt35510(0x2D);
spi_send_cmd_nt35510(0xD220);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD221);spi_send_data_nt35510(0x43);
spi_send_cmd_nt35510(0xD222);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD223);spi_send_data_nt35510(0x60);
spi_send_cmd_nt35510(0xD224);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD225);spi_send_data_nt35510(0x79);
spi_send_cmd_nt35510(0xD226);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD227);spi_send_data_nt35510(0xA5);
spi_send_cmd_nt35510(0xD228);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD229);spi_send_data_nt35510(0xCE);
spi_send_cmd_nt35510(0xD22A);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD22B);spi_send_data_nt35510(0x0F);
spi_send_cmd_nt35510(0xD22C);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD22D);spi_send_data_nt35510(0x49);
spi_send_cmd_nt35510(0xD22E);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD22F);spi_send_data_nt35510(0x83);
spi_send_cmd_nt35510(0xD230);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD231);spi_send_data_nt35510(0xC7);
spi_send_cmd_nt35510(0xD232);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD233);spi_send_data_nt35510(0xCC);
//B+
spi_send_cmd_nt35510(0xD300);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD301);spi_send_data_nt35510(0x5D);
spi_send_cmd_nt35510(0xD302);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD303);spi_send_data_nt35510(0x69);
spi_send_cmd_nt35510(0xD304);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD305);spi_send_data_nt35510(0x7F);
spi_send_cmd_nt35510(0xD306);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD307);spi_send_data_nt35510(0x92);
spi_send_cmd_nt35510(0xD308);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD309);spi_send_data_nt35510(0xA3);
spi_send_cmd_nt35510(0xD30A);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD30B);spi_send_data_nt35510(0xBF);
spi_send_cmd_nt35510(0xD30C);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD30D);spi_send_data_nt35510(0xD8);
spi_send_cmd_nt35510(0xD30E);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD30F);spi_send_data_nt35510(0xFE);
spi_send_cmd_nt35510(0xD310);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD311);spi_send_data_nt35510(0x1D);
spi_send_cmd_nt35510(0xD312);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD313);spi_send_data_nt35510(0x4E);
spi_send_cmd_nt35510(0xD314);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD315);spi_send_data_nt35510(0x73);
spi_send_cmd_nt35510(0xD316);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD317);spi_send_data_nt35510(0xAD);
spi_send_cmd_nt35510(0xD318);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD319);spi_send_data_nt35510(0xDC);
spi_send_cmd_nt35510(0xD31A);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD31B);spi_send_data_nt35510(0xDD);
spi_send_cmd_nt35510(0xD31C);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD31D);spi_send_data_nt35510(0x05);
spi_send_cmd_nt35510(0xD31E);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD31F);spi_send_data_nt35510(0x2D);
spi_send_cmd_nt35510(0xD320);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD321);spi_send_data_nt35510(0x43);
spi_send_cmd_nt35510(0xD322);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD323);spi_send_data_nt35510(0x60);
spi_send_cmd_nt35510(0xD324);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD325);spi_send_data_nt35510(0x79);
spi_send_cmd_nt35510(0xD326);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD327);spi_send_data_nt35510(0xA5);
spi_send_cmd_nt35510(0xD328);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD329);spi_send_data_nt35510(0xCE);
spi_send_cmd_nt35510(0xD32A);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD32B);spi_send_data_nt35510(0x0F);
spi_send_cmd_nt35510(0xD32C);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD32D);spi_send_data_nt35510(0x49);
spi_send_cmd_nt35510(0xD32E);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD32F);spi_send_data_nt35510(0x83);
spi_send_cmd_nt35510(0xD330);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD331);spi_send_data_nt35510(0xC7);
spi_send_cmd_nt35510(0xD332);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD333);spi_send_data_nt35510(0xCC);
//R-
spi_send_cmd_nt35510(0xD400);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD401);spi_send_data_nt35510(0x5D);
spi_send_cmd_nt35510(0xD402);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD403);spi_send_data_nt35510(0x69);
spi_send_cmd_nt35510(0xD404);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD405);spi_send_data_nt35510(0x7F);
spi_send_cmd_nt35510(0xD406);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD407);spi_send_data_nt35510(0x92);
spi_send_cmd_nt35510(0xD408);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD409);spi_send_data_nt35510(0xA3);
spi_send_cmd_nt35510(0xD40A);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD40B);spi_send_data_nt35510(0xBF);
spi_send_cmd_nt35510(0xD40C);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD40D);spi_send_data_nt35510(0xD8);
spi_send_cmd_nt35510(0xD40E);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD40F);spi_send_data_nt35510(0xFE);
spi_send_cmd_nt35510(0xD410);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD411);spi_send_data_nt35510(0x1D);
spi_send_cmd_nt35510(0xD412);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD413);spi_send_data_nt35510(0x4E);
spi_send_cmd_nt35510(0xD414);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD415);spi_send_data_nt35510(0x73);
spi_send_cmd_nt35510(0xD416);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD417);spi_send_data_nt35510(0xAD);
spi_send_cmd_nt35510(0xD418);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD419);spi_send_data_nt35510(0xDC);
spi_send_cmd_nt35510(0xD41A);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD41B);spi_send_data_nt35510(0xDD);
spi_send_cmd_nt35510(0xD41C);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD41D);spi_send_data_nt35510(0x05);
spi_send_cmd_nt35510(0xD41E);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD41F);spi_send_data_nt35510(0x2D);
spi_send_cmd_nt35510(0xD420);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD421);spi_send_data_nt35510(0x43);
spi_send_cmd_nt35510(0xD422);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD423);spi_send_data_nt35510(0x60);
spi_send_cmd_nt35510(0xD424);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD425);spi_send_data_nt35510(0x79);
spi_send_cmd_nt35510(0xD426);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD427);spi_send_data_nt35510(0xA5);
spi_send_cmd_nt35510(0xD428);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD429);spi_send_data_nt35510(0xCE);
spi_send_cmd_nt35510(0xD42A);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD42B);spi_send_data_nt35510(0x0F);
spi_send_cmd_nt35510(0xD42C);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD42D);spi_send_data_nt35510(0x49);
spi_send_cmd_nt35510(0xD42E);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD42F);spi_send_data_nt35510(0x83);
spi_send_cmd_nt35510(0xD430);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD431);spi_send_data_nt35510(0xC7);
spi_send_cmd_nt35510(0xD432);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD433);spi_send_data_nt35510(0xCC);
//G-
spi_send_cmd_nt35510(0xD500);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD501);spi_send_data_nt35510(0x5D);
spi_send_cmd_nt35510(0xD502);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD503);spi_send_data_nt35510(0x69);
spi_send_cmd_nt35510(0xD504);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD505);spi_send_data_nt35510(0x7F);
spi_send_cmd_nt35510(0xD506);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD507);spi_send_data_nt35510(0x92);
spi_send_cmd_nt35510(0xD508);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD509);spi_send_data_nt35510(0xA3);
spi_send_cmd_nt35510(0xD50A);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD50B);spi_send_data_nt35510(0xBF);
spi_send_cmd_nt35510(0xD50C);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD50D);spi_send_data_nt35510(0xD8);
spi_send_cmd_nt35510(0xD50E);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD50F);spi_send_data_nt35510(0xFE);
spi_send_cmd_nt35510(0xD510);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD511);spi_send_data_nt35510(0x1D);
spi_send_cmd_nt35510(0xD512);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD513);spi_send_data_nt35510(0x4E);
spi_send_cmd_nt35510(0xD514);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD515);spi_send_data_nt35510(0x73);
spi_send_cmd_nt35510(0xD516);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD517);spi_send_data_nt35510(0xAD);
spi_send_cmd_nt35510(0xD518);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD519);spi_send_data_nt35510(0xDC);
spi_send_cmd_nt35510(0xD51A);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD51B);spi_send_data_nt35510(0xDD);
spi_send_cmd_nt35510(0xD51C);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD51D);spi_send_data_nt35510(0x05);
spi_send_cmd_nt35510(0xD51E);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD51F);spi_send_data_nt35510(0x2D);
spi_send_cmd_nt35510(0xD520);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD521);spi_send_data_nt35510(0x43);
spi_send_cmd_nt35510(0xD522);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD523);spi_send_data_nt35510(0x60);
spi_send_cmd_nt35510(0xD524);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD525);spi_send_data_nt35510(0x79);
spi_send_cmd_nt35510(0xD526);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD527);spi_send_data_nt35510(0xA5);
spi_send_cmd_nt35510(0xD528);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD529);spi_send_data_nt35510(0xCE);
spi_send_cmd_nt35510(0xD52A);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD52B);spi_send_data_nt35510(0x0F);
spi_send_cmd_nt35510(0xD52C);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD52D);spi_send_data_nt35510(0x49);
spi_send_cmd_nt35510(0xD52E);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD52F);spi_send_data_nt35510(0x83);
spi_send_cmd_nt35510(0xD530);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD531);spi_send_data_nt35510(0xC7);
spi_send_cmd_nt35510(0xD532);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD533);spi_send_data_nt35510(0xCC);
//B-
spi_send_cmd_nt35510(0xD600);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD601);spi_send_data_nt35510(0x5D);
spi_send_cmd_nt35510(0xD602);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD603);spi_send_data_nt35510(0x69);
spi_send_cmd_nt35510(0xD604);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD605);spi_send_data_nt35510(0x7F);
spi_send_cmd_nt35510(0xD606);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD607);spi_send_data_nt35510(0x92);
spi_send_cmd_nt35510(0xD608);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD609);spi_send_data_nt35510(0xA3);
spi_send_cmd_nt35510(0xD60A);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD60B);spi_send_data_nt35510(0xBF);
spi_send_cmd_nt35510(0xD60C);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD60D);spi_send_data_nt35510(0xD8);
spi_send_cmd_nt35510(0xD60E);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0xD60F);spi_send_data_nt35510(0xFE);
spi_send_cmd_nt35510(0xD610);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD611);spi_send_data_nt35510(0x1D);
spi_send_cmd_nt35510(0xD612);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD613);spi_send_data_nt35510(0x4E);
spi_send_cmd_nt35510(0xD614);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD615);spi_send_data_nt35510(0x73);
spi_send_cmd_nt35510(0xD616);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD617);spi_send_data_nt35510(0xAD);
spi_send_cmd_nt35510(0xD618);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD619);spi_send_data_nt35510(0xDC);
spi_send_cmd_nt35510(0xD61A);spi_send_data_nt35510(0x01);
spi_send_cmd_nt35510(0xD61B);spi_send_data_nt35510(0xDD);
spi_send_cmd_nt35510(0xD61C);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD61D);spi_send_data_nt35510(0x05);
spi_send_cmd_nt35510(0xD61E);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD61F);spi_send_data_nt35510(0x2D);
spi_send_cmd_nt35510(0xD620);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD621);spi_send_data_nt35510(0x43);
spi_send_cmd_nt35510(0xD622);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD623);spi_send_data_nt35510(0x60);
spi_send_cmd_nt35510(0xD624);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD625);spi_send_data_nt35510(0x79);
spi_send_cmd_nt35510(0xD626);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD627);spi_send_data_nt35510(0xA5);
spi_send_cmd_nt35510(0xD628);spi_send_data_nt35510(0x02);
spi_send_cmd_nt35510(0xD629);spi_send_data_nt35510(0xCE);
spi_send_cmd_nt35510(0xD62A);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD62B);spi_send_data_nt35510(0x0F);
spi_send_cmd_nt35510(0xD62C);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD62D);spi_send_data_nt35510(0x49);
spi_send_cmd_nt35510(0xD62E);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD62F);spi_send_data_nt35510(0x83);
spi_send_cmd_nt35510(0xD630);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD631);spi_send_data_nt35510(0xC7);
spi_send_cmd_nt35510(0xD632);spi_send_data_nt35510(0x03);
spi_send_cmd_nt35510(0xD633);spi_send_data_nt35510(0xCC);

spi_send_cmd_nt35510(0xB000);spi_send_data_nt35510(0x12);
spi_send_cmd_nt35510(0xB001);spi_send_data_nt35510(0x12);
spi_send_cmd_nt35510(0xB002);spi_send_data_nt35510(0x12);

spi_send_cmd_nt35510(0xB100);spi_send_data_nt35510(0x0A);
spi_send_cmd_nt35510(0xB101);spi_send_data_nt35510(0x0A);
spi_send_cmd_nt35510(0xB102);spi_send_data_nt35510(0x0A);

spi_send_cmd_nt35510(0xBA00);spi_send_data_nt35510(0x24);
spi_send_cmd_nt35510(0xBA01);spi_send_data_nt35510(0x24);
spi_send_cmd_nt35510(0xBA02);spi_send_data_nt35510(0x24);

spi_send_cmd_nt35510(0xB900);spi_send_data_nt35510(0x34);
spi_send_cmd_nt35510(0xB901);spi_send_data_nt35510(0x34);
spi_send_cmd_nt35510(0xB902);spi_send_data_nt35510(0x34);

spi_send_cmd_nt35510(0xF000);spi_send_data_nt35510(0x55);
spi_send_cmd_nt35510(0xF001);spi_send_data_nt35510(0xAA);
spi_send_cmd_nt35510(0xF002);spi_send_data_nt35510(0x52);
spi_send_cmd_nt35510(0xF003);spi_send_data_nt35510(0x08);
spi_send_cmd_nt35510(0xF004);spi_send_data_nt35510(0x00);

spi_send_cmd_nt35510(0xB100);spi_send_data_nt35510(0xCC);

spi_send_cmd_nt35510(0xBC00);spi_send_data_nt35510(0x05);
spi_send_cmd_nt35510(0xBC01);spi_send_data_nt35510(0x05);
spi_send_cmd_nt35510(0xBC02);spi_send_data_nt35510(0x05);

spi_send_cmd_nt35510(0xB800);spi_send_data_nt35510(0x01);

spi_send_cmd_nt35510(0xB700);spi_send_data_nt35510(0x55);
spi_send_cmd_nt35510(0xB701);spi_send_data_nt35510(0x55);

spi_send_cmd_nt35510(0xBD02);spi_send_data_nt35510(0x07);
spi_send_cmd_nt35510(0xBD03);spi_send_data_nt35510(0x31);
spi_send_cmd_nt35510(0xBE02);spi_send_data_nt35510(0x07);
spi_send_cmd_nt35510(0xBE03);spi_send_data_nt35510(0x31);
spi_send_cmd_nt35510(0xBF02);spi_send_data_nt35510(0x07);
spi_send_cmd_nt35510(0xBF03);spi_send_data_nt35510(0x31);

spi_send_cmd_nt35510(0xFF00);spi_send_data_nt35510(0xAA);
spi_send_cmd_nt35510(0xFF01);spi_send_data_nt35510(0x55);
spi_send_cmd_nt35510(0xFF02);spi_send_data_nt35510(0x25);
spi_send_cmd_nt35510(0xFF03);spi_send_data_nt35510(0x01);

//spi_send_cmd_nt35510(0xF304);spi_send_data_nt35510(0x11);
//spi_send_cmd_nt35510(0xF306);spi_send_data_nt35510(0x10);
//spi_send_cmd_nt35510(0xF408);spi_send_data_nt35510(0x00);

spi_send_cmd_nt35510(0x3500);spi_send_data_nt35510(0x00);
spi_send_cmd_nt35510(0x3A00);spi_send_data_nt35510(0x50);

//SLEEP OUT
spi_send_cmd_nt35510(0x1100);
udelay(120000);

//DISPLY ON
spi_send_cmd_nt35510(0x2900);
udelay(120000);
}
#define NT35510_READ 1
#define NT35510_WRITE 0

#define NT35510_DATA 1
#define NT35510_CMD 0

#define NT35510_HIGH 1
#define NT35510_LOW 0
#define SPI1 (1)
#define SPI3 (3)
#define NT35510_SPI_CHANEL SPI3
static void spi_send_cmd_nt35510(u16 cmd)
{
    u8 cmd_high=0,cmd_low=0,ctl_byte=0;
    u16 temp_data;
    cmd_high = cmd>>8;
    cmd_low = cmd&0xFF;
    //first transiction
    ctl_byte = (NT35510_WRITE<<7)|(NT35510_CMD<<6)|(NT35510_HIGH<<5);
    temp_data = (ctl_byte<<8)|cmd_high;
    omap3_mcspi_send_sync(NT35510_SPI_CHANEL, &temp_data,1);
    udelay(1000);
    //second transiction
    ctl_byte = (NT35510_WRITE<<7)|(NT35510_CMD<<6)|(NT35510_LOW<<5);
    temp_data = (ctl_byte<<8)|cmd_low;
    omap3_mcspi_send_sync(NT35510_SPI_CHANEL, &temp_data,1);

    udelay(1000);
}
static void spi_send_data_nt35510(u8 data)
{
    u8 ctl_byte=0;
    u16 temp_data=0;
    ctl_byte = (NT35510_WRITE<<7)|(NT35510_DATA<<6)|(NT35510_LOW<<5);
    temp_data = (ctl_byte<<8)|data;
    omap3_mcspi_send_sync(NT35510_SPI_CHANEL, &temp_data,1);
    udelay(1000);
}

Note: Above code is not mine, found somewhere into internet

Lucjan Bryndza

Embedded software engineer