I use this 1.54 lcd . work well with the driver at kernel 4.9
But when I use the lastest official raspbian os . then driver not work, so I do a dts by my self
Code: Select all
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
fragment@0 {
target = <&spi0>;
__overlay__ {
status = "okay";
spidev@0{
status = "disabled";
};
spidev@1{
status = "disabled";
};
};
};
fragment@1 {
target = <&gpio>;
__overlay__ {
pitft_pins: pitft_pins {
brcm,pins = <22 27>;
brcm,function = <1 1>; /* out */
brcm,pull = <0>; /* none */
};
};
};
fragment@2 {
target = <&spi0>;
__overlay__ {
/* needed to avoid dtc warning */
#address-cells = <1>;
#size-cells = <0>;
pitft: pitft@0{
compatible = "sitronix,st7789v";
reg = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pitft_pins>;
spi-max-frequency = <48000000>;
rotate = <0>;
width = <240>;
height = <240>;
fps = <30>;
buswidth = <8>;
reset-gpios = <&gpio 27 1>;
dc-gpios = <&gpio 22 0>;
debug = <0>;
init = <0x1000011
0x20000ff
0x1000036 0x70
0x100003a 0x05
0x10000b2 0x0c 0x0c 0x00 0x33 0x33
0x10000b7 0x35
0x10000bb 0x1a
0x10000c0 0x2c
0x10000c2 0x01
0x10000c3 0x0b
0x10000c4 0x20
0x10000c6 0x0f
0x10000d0 0xa4 0xa1
0x1000021
0x10000e0 0x00 0x19 0x1E 0x0A 0x09 0x15 0x3D 0x44 0x51 0x12 0x03 0x00 0x3F 0x3F
0x10000e1 0x00 0x18 0x1E 0x0A 0x09 0x25 0x3F 0x43 0x52 0x33 0x03 0x00 0x3F 0x3F
0x1000029>;
};
};
};
__overrides__ {
speed = <&pitft>,"spi-max-frequency:0";
rotate = <&pitft>,"rotate:0";
width = <&pitft>,"width:0";
height = <&pitft>,"height:0";
fps = <&pitft>,"fps:0";
debug = <&pitft>,"debug:0";
};
};

the old driver at /etc/rc.local work well
Code: Select all
sudo modprobe flexfb setaddrwin=0 buswidth=8 width=240 height=240 init=-1,0x11,-2,120,-1,0x36,0x00,-1,0x3A,0x05,-1,0xB2,0x0C,0x0C,0x00,0x33,0x33,-1,0xB7,0x35,-1,0xBB,0x1A,-1,0xC0,0x2C,-1,0xC2,0x01,-1,0xC3,0x0B,-1,0xC4,0x20,-1,0xC6,0x0F,-1,0xD0,0xA4,0xA1,-1,0x21,-1,0xE0,0x00,0x19,0x1E,0x0A,0x09,0x15,0x3D,0x44,0x51,0x12,0x03,0x00,0x3F,0x3F,-1,0xE1,0x00,0x18,0x1E,0x0A,0x09,0x25,0x3F,0x43,0x52,0x33,0x03,0x00,0x3F,0x3F,-1,0x29,-3
sudo modprobe fbtft_device debug=3 rotate=90 name=flexfb speed=48000000 gpios=reset:27,dc:22