Configuration of LCD with Linux

Thread Starter

CGR90

Joined Feb 22, 2018
2
Hello, I am trying to launch thePH320480T009-LAC03 tft with an IMX7 that uses an Yocto image. The driver that uses the tft is ST7769S, however the kernel of yocto does not provide this driver, therefore I am using the ili9486 that has a very similar operation. To configure this driver I have made the following configuration of the device tree to put the SPI 4-Line interface(First I have removed the previous configuration of mxcfb1 from the device tree):

Code:
&PICO_PI_ECSPI4 {

  status = "okay";

  spidev@1 {

compatible = "rohm,dh2228fv";

spi-max-frequency = <60000000>;

reg = <1>;

status = "disabled";

};

mxcfb1: fb@0 {

compatible = "ilitek,ili9486";

reg = <0>;


spi-max-frequency = <5000000>;

rotate = <0>;

buswidth = <8>;

regwidth = <16>;

reset-gpios = <&gpio 25 0>;

dc-gpios = <&gpio 24 0>;

debug = <0>;

init = <0x20000ff

  0x1000001

  0x20000ff

0x1000011

  0x20000ff

  0x10000f0 0xc3

  0x10000f0 0x96

  0x1000036 0x40

  0x10000b4 0x01

  0x10000b6 0x20 0x02 0x3b

  0x10000e8 0x40 0x8a 0x00 0x00 0x29 0x19 0xa5 0x33

  0x10000c1 0x0x06

0x10000c2 0xa7

0x10000c5 0x18

  0x10000e0 0x0f 0x09 0x0b 0x06 0x04 0x15 0x2f 0x54 0x42 0x3c 0x17 0x14 0x18 0x1b

  0x10000e1 0x0f 0x09 0x0b 0x06 0x04 0x03 0x2d 0x43 0x42 0x3b 0x16 0x14 0x17 0x1b

  0x10000f0 0xc3

  0x10000f0 0x96

  0x20000ff

  0x1000029>

};

};
The initial sequence is the recommended by the manufacturer of the tft. When I start the program, I see that the screen responds to the commands I am indicating in the initial sequence, since when the last command of that sequence is displayed (display on), the display turns on and shows many colored dots. And this is all that the screen does, when I indicate that I upload an image (I launch a program generated with the qt creator), it does not work, it still shows the colored dots. I have measured the signal that comes out of the SPI with an oscilloscope, and the signals it generates seem correct.

What could be the problem?

My theory is that the "b6h" command that is launched in the initial sequence activates a bit (RM) that is to select the RGB interface, therefore when I load an image by the SPI interface the screen ignores it, since the wait that the signal arrives for another data bus.

How would I have to configure the initial sequence to load the image by the SPI?

How would I have to configure the device tree so that it would also generate an RGB interface?
Thanks

Moderators note : Please use code tags for pieces of code
 
Last edited by a moderator:

Thread Starter

CGR90

Joined Feb 22, 2018
2
Datasheet of tft: http://www.scancraftdisplay.se/wp-content/uploads/2017/08/ph320480t009-lac03.pdf
Datasheet of ST7796S driver: http://www.datasheet4u.com/datasheet-pdf/Sitronix/ST7796S/pdf.php?id=897832
Datasheet of ili9486 driver: http://www.datasheetspdf.com/pdf/945603/ILITEK/ILI9486/30

  1. &PICO_PI_ECSPI4 {

  2. status = "okay";

  3. spidev@1 {

  4. compatible = "rohm,dh2228fv";

  5. spi-max-frequency = <60000000>;

  6. reg = <1>;

  7. status = "disabled";

  8. };

  9. mxcfb1: fb@0 {

  10. compatible = "ilitek,ili9486";

  11. reg = <0>;


  12. spi-max-frequency = <5000000>;

  13. rotate = <0>;

  14. buswidth = <8>;

  15. regwidth = <16>;

  16. reset-gpios = <&gpio 25 0>;

  17. dc-gpios = <&gpio 24 0>;

  18. debug = <0>;

  19. init = <0x20000ff // delay

  20. 0x1000001 //software reset

  21. 0x20000ff

  22. 0x1000011 //Sleep out

  23. 0x20000ff

  24. 0x10000f0 0xc3 //Command 2 enable

  25. 0x10000f0 0x96 //Command 2 enable

  26. 0x1000036 0x40 // Memory data Access control

  27. 0x10000b4 0x01 //Dispaly Inversión Control

  28. 0x10000b6 0x20 0x02 0x3b //Display funtion control

  29. 0x10000e8 0x40 0x8a 0x00 0x00 0x29 0x19 0xa5 0x33 // Display Output Ctrl Adjust

  30. 0x10000c1 0x0x06 //Power Control 2

  31. 0x10000c2 0xa7 // Power control 3

  32. 0x10000c5 0x18 // Vcom Control

  33. 0x10000e0 0x0f 0x09 0x0b 0x06 0x04 0x15 0x2f 0x54 0x42 0x3c 0x17 0x14 0x18 0x1b // Positive Gamma Control

  34. 0x10000e1 0x0f 0x09 0x0b 0x06 0x04 0x03 0x2d 0x43 0x42 0x3b 0x16 0x14 0x17 0x1b // Negative Gamma Control

  35. 0x10000f0 0xc3 // Command 2 disable

  36. 0x10000f0 0x96 // Command 2 disable

  37. 0x20000ff

  38. 0x1000029> // Display On

  39. };

  40. };
 
Top