-
- Posts: 216
- Joined: Tue May 01, 2012 8:47 am
- Location: Germany (old europe)
Re: new kernel regression with fbtft
no, I haven't built my own kernel. When is the new kernel available?
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 3664
- Joined: Mon Sep 29, 2014 1:07 pm
- Location: Cambridge
Re: new kernel regression with fbtft
There is a build of the updated kernel available now using "sudo rpi-update".
-
- Posts: 216
- Joined: Tue May 01, 2012 8:47 am
- Location: Germany (old europe)
Re: new kernel regression with fbtft
I've upgraded to "Linux pump 5.4.64-v7+ #1340 SMP Fri Sep 11 14:09:35 BST 2020 armv7l GNU/Linux" via rpi-update and apt update/upgrade
but display doen't work at all. Looks like that the entry in /boot/config.txt
doesn't take the dc_pin and reset_pin parameter
but display doen't work at all. Looks like that the entry in /boot/config.txt
Code: Select all
dtoverlay=adafruit18_green,dc_pin=9,reset_pin=27,bgr=1,rotate=270,debug=3,verbose=3
Code: Select all
[ 7.567535] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
[ 7.571131] fb_st7735r: module is from the staging directory, the quality is unknown, you have been warned.
[ 7.572169] fbtft_of_value: buswidth = 8
[ 7.572179] fbtft_of_value: bpp = 1
[ 7.572185] fbtft_of_value: debug = 3
[ 7.572192] fbtft_of_value: rotate = 270
[ 7.572201] fbtft_of_value: fps = 25
[ 7.572270] fb_st7735r spi0.0: fbtft_gamma_parse_str() str=
[ 7.572277] fb_st7735r spi0.0: 02 1c 07 12 37 32 29 2d 29 25 2B 39 00 01 03 10
03 1d 07 06 2E 2C 29 2D 2E 2E 37 3F 00 00 02 10
[ 7.572347] fb_st7735r spi0.0: fbtft_request_one_gpio: 'reset' GPIO
[ 7.572380] fb_st7735r spi0.0: fbtft_request_one_gpio: 'dc' GPIO
[ 7.572406] fb_st7735r spi0.0: fbtft_request_one_gpio: 'rd' GPIO
[ 7.572430] fb_st7735r spi0.0: fbtft_request_one_gpio: 'wr' GPIO
[ 7.572456] fb_st7735r spi0.0: fbtft_request_one_gpio: 'cs' GPIO
[ 7.572480] fb_st7735r spi0.0: fbtft_request_one_gpio: 'latch' GPIO
[ 7.572504] fb_st7735r spi0.0: fbtft_request_one_gpio: 'db' GPIO
[ 7.572528] fb_st7735r spi0.0: fbtft_request_one_gpio: 'led' GPIO
[ 7.572552] fb_st7735r spi0.0: fbtft_request_one_gpio: 'aux' GPIO
[ 7.572577] fb_st7735r spi0.0: fbtft_request_one_gpio: 'db' GPIO
[ 7.572601] fb_st7735r spi0.0: fbtft_request_one_gpio: 'led' GPIO
[ 7.572625] fb_st7735r spi0.0: fbtft_request_one_gpio: 'aux' GPIO
[ 7.572649] fb_st7735r spi0.0: fbtft_request_one_gpio: 'db' GPIO
[ 7.572673] fb_st7735r spi0.0: fbtft_request_one_gpio: 'led' GPIO
[ 7.572698] fb_st7735r spi0.0: fbtft_request_one_gpio: 'aux' GPIO
[ 7.572722] fb_st7735r spi0.0: fbtft_request_one_gpio: 'db' GPIO
[ 7.572746] fb_st7735r spi0.0: fbtft_request_one_gpio: 'led' GPIO
[ 7.572770] fb_st7735r spi0.0: fbtft_request_one_gpio: 'aux' GPIO
[ 7.572794] fb_st7735r spi0.0: fbtft_request_one_gpio: 'db' GPIO
[ 7.572818] fb_st7735r spi0.0: fbtft_request_one_gpio: 'led' GPIO
[ 7.572844] fb_st7735r spi0.0: fbtft_request_one_gpio: 'aux' GPIO
[ 7.572868] fb_st7735r spi0.0: fbtft_request_one_gpio: 'db' GPIO
[ 7.572892] fb_st7735r spi0.0: fbtft_request_one_gpio: 'led' GPIO
[ 7.572916] fb_st7735r spi0.0: fbtft_request_one_gpio: 'aux' GPIO
[ 7.572940] fb_st7735r spi0.0: fbtft_request_one_gpio: 'db' GPIO
[ 7.572965] fb_st7735r spi0.0: fbtft_request_one_gpio: 'led' GPIO
[ 7.572989] fb_st7735r spi0.0: fbtft_request_one_gpio: 'aux' GPIO
[ 7.573013] fb_st7735r spi0.0: fbtft_request_one_gpio: 'db' GPIO
[ 7.573037] fb_st7735r spi0.0: fbtft_request_one_gpio: 'led' GPIO
[ 7.573061] fb_st7735r spi0.0: fbtft_request_one_gpio: 'aux' GPIO
[ 7.573086] fb_st7735r spi0.0: fbtft_request_one_gpio: 'db' GPIO
[ 7.573110] fb_st7735r spi0.0: fbtft_request_one_gpio: 'led' GPIO
[ 7.573134] fb_st7735r spi0.0: fbtft_request_one_gpio: 'aux' GPIO
[ 7.573158] fb_st7735r spi0.0: fbtft_request_one_gpio: 'db' GPIO
[ 7.573182] fb_st7735r spi0.0: fbtft_request_one_gpio: 'led' GPIO
[ 7.573208] fb_st7735r spi0.0: fbtft_request_one_gpio: 'aux' GPIO
[ 7.573575] fb_st7735r spi0.0: fbtft_request_one_gpio: 'db' GPIO
[ 7.573602] fb_st7735r spi0.0: fbtft_request_one_gpio: 'led' GPIO
[ 7.573626] fb_st7735r spi0.0: fbtft_request_one_gpio: 'aux' GPIO
[ 7.573650] fb_st7735r spi0.0: fbtft_request_one_gpio: 'db' GPIO
[ 7.573674] fb_st7735r spi0.0: fbtft_request_one_gpio: 'led' GPIO
[ 7.573699] fb_st7735r spi0.0: fbtft_request_one_gpio: 'aux' GPIO
[ 7.573723] fb_st7735r spi0.0: fbtft_request_one_gpio: 'db' GPIO
[ 7.573747] fb_st7735r spi0.0: fbtft_request_one_gpio: 'led' GPIO
[ 7.573771] fb_st7735r spi0.0: fbtft_request_one_gpio: 'aux' GPIO
[ 7.573795] fb_st7735r spi0.0: fbtft_request_one_gpio: 'db' GPIO
[ 7.573819] fb_st7735r spi0.0: fbtft_request_one_gpio: 'led' GPIO
[ 7.573844] fb_st7735r spi0.0: fbtft_request_one_gpio: 'aux' GPIO
[ 7.573868] fb_st7735r spi0.0: fbtft_request_one_gpio: 'db' GPIO
[ 7.573892] fb_st7735r spi0.0: fbtft_request_one_gpio: 'led' GPIO
[ 7.573916] fb_st7735r spi0.0: fbtft_request_one_gpio: 'aux' GPIO
[ 7.573940] fb_st7735r spi0.0: fbtft_request_one_gpio: 'db' GPIO
[ 7.573965] fb_st7735r spi0.0: fbtft_request_one_gpio: 'led' GPIO
[ 7.573989] fb_st7735r spi0.0: fbtft_request_one_gpio: 'aux' GPIO
[ 7.573996] fb_st7735r spi0.0: fbtft_verify_gpios()
[ 7.574004] fb_st7735r spi0.0: fbtft_reset()
[ 7.704356] fb_st7735r spi0.0: init: write(0x01)
[ 7.704410] fb_st7735r spi0.0: init: mdelay(150)
[ 7.854427] fb_st7735r spi0.0: init: write(0x11)
[ 7.854465] fb_st7735r spi0.0: init: mdelay(500)
[ 8.354498] fb_st7735r spi0.0: init: write(0xB1) 0x01 0x2C 0x2D
[ 8.354596] fb_st7735r spi0.0: init: write(0xB2) 0x01 0x2C 0x2D
[ 8.354647] fb_st7735r spi0.0: init: write(0xB3) 0x01 0x2C 0x2D 0x01 0x2C 0x2D
[ 8.354700] fb_st7735r spi0.0: init: write(0xB4) 0x07
[ 8.354743] fb_st7735r spi0.0: init: write(0xC0) 0xA2 0x02 0x84
[ 8.354789] fb_st7735r spi0.0: init: write(0xC1) 0xC5
[ 8.354830] fb_st7735r spi0.0: init: write(0xC2) 0x0A 0x00
[ 8.354874] fb_st7735r spi0.0: init: write(0xC3) 0x8A 0x2A
[ 8.354918] fb_st7735r spi0.0: init: write(0xC4) 0x8A 0xEE
[ 8.354962] fb_st7735r spi0.0: init: write(0xC5) 0x0E
[ 8.355002] fb_st7735r spi0.0: init: write(0x20)
[ 8.355027] fb_st7735r spi0.0: init: write(0x3A) 0x05
[ 8.355067] fb_st7735r spi0.0: init: write(0x29)
[ 8.355091] fb_st7735r spi0.0: init: mdelay(100)
[ 8.455108] fb_st7735r spi0.0: init: write(0x13)
[ 8.455152] fb_st7735r spi0.0: init: mdelay(10)
[ 8.549771] fb_st7735r spi0.0: Display update: 472 kB/s, fps=0
[ 8.558155] graphics fb1: fb_st7735r frame buffer, 160x128, 40 KiB video memory, 4 KiB buffer memory, fps=25, spi0.0 at 4 MHz
-
- Posts: 216
- Joined: Tue May 01, 2012 8:47 am
- Location: Germany (old europe)
Re: new kernel regression with fbtft
moving back to 4.19 kernel via
it recognizes the dc_pin and reset parameter, display works (with pixel artefacts)
Code: Select all
rpi-update e1050e94821a70b2e4c72b318d6c6c968552e9a2
uname -a
Linux pump 4.19.118-v7+ #1311 SMP Mon Apr 27 14:21:24 BST 2020 armv7l GNU/Linux
Code: Select all
[ 5.407008] fb_st7735r spi0.0: fbtft_request_one_gpio: 'reset-gpios' = GPIO27
[ 5.409343] fb_st7735r spi0.0: fbtft_request_one_gpio: 'dc-gpios' = GPIO9
Code: Select all
[ 5.403121] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
[ 5.406145] fb_st7735r: module is from the staging directory, the quality is unknown, you have been warned.
[ 5.406804] fbtft_of_value: buswidth = 8
[ 5.406817] fbtft_of_value: bpp = 1
[ 5.406821] fbtft_of_value: debug = 3
[ 5.406828] fbtft_of_value: rotate = 270
[ 5.406833] fbtft_of_value: fps = 25
[ 5.406922] fb_st7735r spi0.0: fbtft_gamma_parse_str() str=
[ 5.406927] fb_st7735r spi0.0: 02 1c 07 12 37 32 29 2d 29 25 2B 39 00 01 03 10
03 1d 07 06 2E 2C 29 2D 2E 2E 37 3F 00 00 02 10
[ 5.407008] fb_st7735r spi0.0: fbtft_request_one_gpio: 'reset-gpios' = GPIO27
[ 5.409343] fb_st7735r spi0.0: fbtft_request_one_gpio: 'dc-gpios' = GPIO9
[ 5.409391] fb_st7735r spi0.0: fbtft_verify_gpios()
[ 5.409398] fb_st7735r spi0.0: fbtft_reset()
[ 5.548817] fb_st7735r spi0.0: init: write(0x01)
[ 5.548864] fb_st7735r spi0.0: init: mdelay(150)
[ 5.698899] fb_st7735r spi0.0: init: write(0x11)
[ 5.698985] fb_st7735r spi0.0: init: mdelay(500)
[ 6.199019] fb_st7735r spi0.0: init: write(0xB1) 0x01 0x2C 0x2D
[ 6.199104] fb_st7735r spi0.0: init: write(0xB2) 0x01 0x2C 0x2D
[ 6.199137] fb_st7735r spi0.0: init: write(0xB3) 0x01 0x2C 0x2D 0x01 0x2C 0x2D
[ 6.199173] fb_st7735r spi0.0: init: write(0xB4) 0x07
[ 6.199201] fb_st7735r spi0.0: init: write(0xC0) 0xA2 0x02 0x84
[ 6.199230] fb_st7735r spi0.0: init: write(0xC1) 0xC5
[ 6.199254] fb_st7735r spi0.0: init: write(0xC2) 0x0A 0x00
[ 6.199281] fb_st7735r spi0.0: init: write(0xC3) 0x8A 0x2A
[ 6.199310] fb_st7735r spi0.0: init: write(0xC4) 0x8A 0xEE
[ 6.199343] fb_st7735r spi0.0: init: write(0xC5) 0x0E
[ 6.199368] fb_st7735r spi0.0: init: write(0x20)
[ 6.199384] fb_st7735r spi0.0: init: write(0x3A) 0x05
[ 6.199410] fb_st7735r spi0.0: init: write(0x29)
[ 6.199426] fb_st7735r spi0.0: init: mdelay(100)
[ 6.299439] fb_st7735r spi0.0: init: write(0x13)
[ 6.299512] fb_st7735r spi0.0: init: mdelay(10)
[ 6.394260] fb_st7735r spi0.0: Display update: 471 kB/s, fps=0
[ 6.401748] graphics fb1: fb_st7735r frame buffer, 160x128, 40 KiB video memory, 4 KiB buffer memory, fps=25, spi0.0 at 4 MHz
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 3664
- Joined: Mon Sep 29, 2014 1:07 pm
- Location: Cambridge
Re: new kernel regression with fbtft
Fair enough - try this one:
Code: Select all
/*
* Device Tree overlay for Adafruit 1.8" TFT LCD with ST7735R chip 160x128
*/
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835";
fragment@0 {
target = <&spidev0>;
__overlay__ {
status = "disabled";
};
};
fragment@1 {
target = <&spi0>;
__overlay__ {
/* needed to avoid dtc warning */
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
af18: adafruit18@0 {
compatible = "fbtft,adafruit18";
reg = <0>;
pinctrl-names = "default";
spi-max-frequency = <40000000>;
rotate = <90>;
buswidth = <8>;
fps = <50>;
height = <160>;
width = <128>;
reset-gpios = <&gpio 25 0>;
dc-gpios = <&gpio 24 0>;
led-gpios = <&gpio 18 0>;
bgr;
debug = <0>;
};
};
};
__overrides__ {
green = <&af18>, "compatible=fbtft,adafruit18_green";
speed = <&af18>,"spi-max-frequency:0";
rotate = <&af18>,"rotate:0";
fps = <&af18>,"fps:0";
bgr = <&af18>,"bgr?";
debug = <&af18>,"debug:0";
dc_pin = <&af18>,"dc-gpios:4";
reset_pin = <&af18>,"reset-gpios:4";
led_pin = <&af18>,"led-gpios:4";
};
};
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 3664
- Joined: Mon Sep 29, 2014 1:07 pm
- Location: Cambridge
Re: new kernel regression with fbtft
And if that doesn't work, try this:
This overlay marks the reset GPIO as being active-low, something that was necessary for at least one other display under 5.4.
Code: Select all
/*
* Device Tree overlay for Adafruit 1.8" TFT LCD with ST7735R chip 160x128
*/
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835";
fragment@0 {
target = <&spidev0>;
__overlay__ {
status = "disabled";
};
};
fragment@1 {
target = <&spi0>;
__overlay__ {
/* needed to avoid dtc warning */
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
af18: adafruit18@0 {
compatible = "fbtft,adafruit18";
reg = <0>;
pinctrl-names = "default";
spi-max-frequency = <40000000>;
rotate = <90>;
buswidth = <8>;
fps = <50>;
height = <160>;
width = <128>;
reset-gpios = <&gpio 25 1>;
dc-gpios = <&gpio 24 0>;
led-gpios = <&gpio 18 0>;
bgr;
debug = <0>;
};
};
};
__overrides__ {
green = <&af18>, "compatible=fbtft,adafruit18_green";
speed = <&af18>,"spi-max-frequency:0";
rotate = <&af18>,"rotate:0";
fps = <&af18>,"fps:0";
bgr = <&af18>,"bgr?";
debug = <&af18>,"debug:0";
dc_pin = <&af18>,"dc-gpios:4";
reset_pin = <&af18>,"reset-gpios:4";
led_pin = <&af18>,"led-gpios:4";
};
};
-
- Posts: 216
- Joined: Tue May 01, 2012 8:47 am
- Location: Germany (old europe)
Re: new kernel regression with fbtft
with the following .dts my display (waveshare1.8 / adafruit1.8 green) is working.
pixelartefacts are gone with rotation 0. with rotation 90 (.dts from phil) are still there.
bgr parameter is not working. red pixel appear blue and blue pixel appear red.
my /boot/config.txt
my /boot/cmdline.txt
pixelartefacts are gone with rotation 0. with rotation 90 (.dts from phil) are still there.
bgr parameter is not working. red pixel appear blue and blue pixel appear red.
my /boot/config.txt
Code: Select all
dtoverlay=adafruit18,green,dc_pin=9,reset_pin=27,debug=3
my /boot/cmdline.txt
Code: Select all
console=serial0,115200 console=tty1 .... rootwait fbcon=map:10 fbcon=rotate:1
Code: Select all
/*
* Device Tree overlay for Adafruit/Waveshare 1.8" TFT LCD with ST7735 chip 160x128
*
* compile:
* dtc -@ -I dts -Odtc -@ -I dts -O dtb -o /boot/overlays/adafruit18.dtbo adafruit18.dts
*/
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835";
fragment@0 {
target = <&spidev0>;
__overlay__ {
status = "disabled";
};
};
fragment@1 {
target = <&spi0>;
__overlay__ {
/* needed to avoid dtc warning */
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
st7735: st7735@0 {
compatible = "fbtft,adafruit18";
reg = <0>;
pinctrl-names = "default";
spi-max-frequency = <40000000>;
rotate = <0>;
buswidth = <8>;
fps = <25>;
height = <160>;
width = <128>;
reset-gpios = <&gpio 25 1>;
dc-gpios = <&gpio 24 0>;
led-gpios = <&gpio 18 0>;
bgr = <0>;
debug = <0>;
};
};
};
__overrides__ {
green = <&st7735>,"compatible=fbtft,adafruit18_green";
height = <&st7735>,"height:0";
width = <&st7735>,"width:0";
speed = <&st7735>,"spi-max-frequency:0";
rotate = <&st7735>,"rotate:0";
fps = <&st7735>,"fps:0";
bgr = <&st7735>,"bgr:0";
debug = <&st7735>,"debug:0";
dc_pin = <&st7735>,"dc-gpios:4";
reset_pin = <&st7735>,"reset-gpios:4";
led_pin = <&st7735>,"led-gpios:4";
};
};
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 3664
- Joined: Mon Sep 29, 2014 1:07 pm
- Location: Cambridge
Re: new kernel regression with fbtft
The bgr parameter is a Device Tree boolean - true if the property is present, false if it's absent. This should work better:
I don't know what to do about the pixel artifacts when the display is rotated.
Code: Select all
/*
* Device Tree overlay for Adafruit/Waveshare 1.8" TFT LCD with ST7735 chip 160x128
*
* compile:
* dtc -@ -I dts -Odtc -@ -I dts -O dtb -o /boot/overlays/adafruit18.dtbo adafruit18.dts
*/
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835";
fragment@0 {
target = <&spidev0>;
__overlay__ {
status = "disabled";
};
};
fragment@1 {
target = <&spi0>;
__overlay__ {
/* needed to avoid dtc warning */
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
st7735: st7735@0 {
compatible = "fbtft,adafruit18";
reg = <0>;
pinctrl-names = "default";
spi-max-frequency = <40000000>;
rotate = <0>;
buswidth = <8>;
fps = <25>;
height = <160>;
width = <128>;
reset-gpios = <&gpio 25 1>;
dc-gpios = <&gpio 24 0>;
led-gpios = <&gpio 18 0>;
debug = <0>;
};
};
};
__overrides__ {
green = <&st7735>,"compatible=fbtft,adafruit18_green";
height = <&st7735>,"height:0";
width = <&st7735>,"width:0";
speed = <&st7735>,"spi-max-frequency:0";
rotate = <&st7735>,"rotate:0";
fps = <&st7735>,"fps:0";
bgr = <&st7735>,"bgr?";
debug = <&st7735>,"debug:0";
dc_pin = <&st7735>,"dc-gpios:4";
reset_pin = <&st7735>,"reset-gpios:4";
led_pin = <&st7735>,"led-gpios:4";
};
};
-
- Posts: 216
- Joined: Tue May 01, 2012 8:47 am
- Location: Germany (old europe)
Re: new kernel regression with fbtft
still not working:
Code: Select all
dtoverlay=adafruit18,green,bgr,dc_pin=9,reset_pin=27,debug=3
Code: Select all
[ 4.231045] fb_st7735r: module is from the staging directory, the quality is unknown, you have been warned.
[ 4.231436] fbtft_of_value: width = 128
[ 4.231443] fbtft_of_value: height = 160
[ 4.231450] fbtft_of_value: buswidth = 8
[ 4.231458] fbtft_of_value: debug = 3
[ 4.231464] fbtft_of_value: rotate = 0
[ 4.231471] fbtft_of_value: fps = 25
-
- Posts: 216
- Joined: Tue May 01, 2012 8:47 am
- Location: Germany (old europe)
Re: new kernel regression with fbtft
pixerartefacts are gone, if we use rotate=0 in .dts
and if we do the rotation on application level e.g. gfx library and in cmdline.txt for fbcon.
and if we do the rotation on application level e.g. gfx library and in cmdline.txt for fbcon.
Re: new kernel regression with fbtft
Rotation is panel specific and implemented for a particular panel. The set_var() function uses command 0x36 to set the rotation. The solution for panels for which rotation doesn't work is to uses the init= property to override 0x36, but unfortunately this doesn't work with drivers that has set_var() since it is applied after init().
But rotation didn't work when you used fbtft_device, right?
fbtft is full of strange things since I didn't know anything about these displays and their controllers when I wrote the first drivers (neither did I know anything about the Linux kernel).
But rotation didn't work when you used fbtft_device, right?
fbtft is full of strange things since I didn't know anything about these displays and their controllers when I wrote the first drivers (neither did I know anything about the Linux kernel).
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 3664
- Joined: Mon Sep 29, 2014 1:07 pm
- Location: Cambridge
Re: new kernel regression with fbtft
There is no debug output for the bgr property - it is handled by a different function. Are you saying that using the bgr parameter makes no difference?still not working:
Code: Select all
dtoverlay=adafruit18,green,bgr,dc_pin=9,reset_pin=27,debug=3
Code: Select all
[ 4.231045] fb_st7735r: module is from the staging directory, the quality is unknown, you have been warned. [ 4.231436] fbtft_of_value: width = 128 [ 4.231443] fbtft_of_value: height = 160 [ 4.231450] fbtft_of_value: buswidth = 8 [ 4.231458] fbtft_of_value: debug = 3 [ 4.231464] fbtft_of_value: rotate = 0 [ 4.231471] fbtft_of_value: fps = 25
-
- Posts: 216
- Joined: Tue May 01, 2012 8:47 am
- Location: Germany (old europe)
Re: new kernel regression with fbtft
using bgr in config.txt makes no difference. red pixels apear blue and blue pixels apear red.
As notro wrote there is a MADCTL (36h) register that flips RGB to BGR color order.
I have no idea, how to pass bgr parameter from config.txt to the driver
As notro wrote there is a MADCTL (36h) register that flips RGB to BGR color order.
Code: Select all
‘1’ =BGR, (When MADCTL (36h) D3=’1’)
‘0’ =RGB, (When MADCTL (36h) D3=’0’)
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 3664
- Joined: Mon Sep 29, 2014 1:07 pm
- Location: Cambridge
Re: new kernel regression with fbtft
Be careful - there are now multiple versions of the overlay around with different default values.
The last version I posted has BGR mode disabled by default - use "dtoverlay=adafruit,green,bgr" or "dtoverlay=adafruit,green,bgr=on" to enable it.
Other versions have BGR mode enabled by default - use "dtoverlay=adafruit,green,bgr=off" to disable it.
It's clearer and safer to always include either "bgr=on" or "bgr=off". I've seen the driver set the appropriate bit to either a 1 or zero according to the parameter value, so it should work with the real display.
The last version I posted has BGR mode disabled by default - use "dtoverlay=adafruit,green,bgr" or "dtoverlay=adafruit,green,bgr=on" to enable it.
Other versions have BGR mode enabled by default - use "dtoverlay=adafruit,green,bgr=off" to disable it.
It's clearer and safer to always include either "bgr=on" or "bgr=off". I've seen the driver set the appropriate bit to either a 1 or zero according to the parameter value, so it should work with the real display.
-
- Posts: 216
- Joined: Tue May 01, 2012 8:47 am
- Location: Germany (old europe)
Re: new kernel regression with fbtft
bgr=off does the trick.
how can I set this parameter to off in .dts file ?
how can I set this parameter to off in .dts file ?
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 3664
- Joined: Mon Sep 29, 2014 1:07 pm
- Location: Cambridge
Re: new kernel regression with fbtft
Delete any line like these:
Code: Select all
bgr = <0>;
bgr;
-
- Posts: 216
- Joined: Tue May 01, 2012 8:47 am
- Location: Germany (old europe)
Re: new kernel regression with fbtft
but if I want to set bgr=on (for other display)?
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 3664
- Joined: Mon Sep 29, 2014 1:07 pm
- Location: Cambridge
Re: new kernel regression with fbtft
Use the parameter.
There are two different things called "bgr" (three if you include the bit in the hardware register) - the property that controls the bit, and the parameter that sets (creates) or clears (deletes) the property. If your overlay includes the property then the BGR bit defaults to on; if your overlay doesn't include the property then the BGR bit defaults to off. As long as you include the parameter declaration (bgr = <&st7735>,"bgr?") then you can always override the default in either direction.
There are two different things called "bgr" (three if you include the bit in the hardware register) - the property that controls the bit, and the parameter that sets (creates) or clears (deletes) the property. If your overlay includes the property then the BGR bit defaults to on; if your overlay doesn't include the property then the BGR bit defaults to off. As long as you include the parameter declaration (bgr = <&st7735>,"bgr?") then you can always override the default in either direction.
-
- Posts: 216
- Joined: Tue May 01, 2012 8:47 am
- Location: Germany (old europe)
Re: new kernel regression with fbtft
i have some products in the field, where config.txt doesn't contain bgr=off. and I have my own dtoverlay (not adafruit18), created with my .dts file.
on next update, I just want to copy my new overlay to /boot/overlays. I don't want to write a script that maintains config.txt
in my .dts I just want to set bgr to off as default.
on next update, I just want to copy my new overlay to /boot/overlays. I don't want to write a script that maintains config.txt
in my .dts I just want to set bgr to off as default.
-
- Posts: 216
- Joined: Tue May 01, 2012 8:47 am
- Location: Germany (old europe)
Re: new kernel regression with fbtft
solved, I've just dropt bgr;
philE, Thank you very much for your support.
philE, Thank you very much for your support.
Re: new kernel regression with fbtft
Hello,
I had recently the same problem with the sainsmart18 display and last linux kernel. My solution was to go back to 4.19.118+.
I see now you found a solution, great.
But I can not follow all the steps...
Can you give a short advice which of the steps are really necessary to get it running?
Thanks
Micha
I had recently the same problem with the sainsmart18 display and last linux kernel. My solution was to go back to 4.19.118+.
I see now you found a solution, great.
But I can not follow all the steps...
Can you give a short advice which of the steps are really necessary to get it running?
Thanks
Micha
-
- Posts: 216
- Joined: Tue May 01, 2012 8:47 am
- Location: Germany (old europe)
Re: new kernel regression with fbtft
Hi Micha,
this is my solution:
/boot/cmdline.txt
/boot/config.txt
I've created my own device (fluidicworks18)
fluidicworks18.dts
COMPILE it:
my OS version:
this is my solution:
/boot/cmdline.txt
Code: Select all
console=serial0,115200 console=tty1 ... rootwait fbcon=map:10 fbcon=rotate:1
/boot/config.txt
Code: Select all
dtoverlay=fluidicworks18,green,dc_pin=9,reset_pin=27,debug=3
I've created my own device (fluidicworks18)
fluidicworks18.dts
Code: Select all
/*
* Device Tree overlay for Adafruit/Waveshare 1.8" TFT LCD with ST7735 chip 160x128
*
* compile:
* dtc -@ -I dts -Odtc -@ -I dts -O dtb -o /boot/overlays/adafruit18.dtbo adafruit18.dts
*/
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835";
fragment@0 {
target = <&spidev0>;
__overlay__ {
status = "disabled";
};
};
fragment@1 {
target = <&spi0>;
__overlay__ {
/* needed to avoid dtc warning */
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
st7735: st7735@0 {
compatible = "fbtft,adafruit18";
reg = <0>;
pinctrl-names = "default";
spi-max-frequency = <40000000>;
rotate = <0>;
buswidth = <8>;
fps = <25>;
height = <160>;
width = <128>;
reset-gpios = <&gpio 25 1>;
dc-gpios = <&gpio 24 0>;
led-gpios = <&gpio 18 0>;
debug = <0>;
};
};
};
__overrides__ {
green = <&st7735>,"compatible=fbtft,adafruit18_green";
height = <&st7735>,"height:0";
width = <&st7735>,"width:0";
speed = <&st7735>,"spi-max-frequency:0";
rotate = <&st7735>,"rotate:0";
fps = <&st7735>,"fps:0";
bgr = <&st7735>,"bgr?";
debug = <&st7735>,"debug:0";
dc_pin = <&st7735>,"dc-gpios:4";
reset_pin = <&st7735>,"reset-gpios:4";
led_pin = <&st7735>,"led-gpios:4";
};
};
COMPILE it:
Code: Select all
dtc -@ -I dts -O dtb -o /boot/overlays/fluidicworks18.dtbo fluidicworks18.dts
Code: Select all
uname -a
Linux pump 5.4.72-v7l+ #1356 SMP Thu Oct 22 13:57:51 BST 2020 armv7l GNU/Linux
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 3664
- Joined: Mon Sep 29, 2014 1:07 pm
- Location: Cambridge
Re: new kernel regression with fbtft
Note that you will need to use sudo dtc if you want to write the compiled overlay direct to the overlays directory.
Re: new kernel regression with fbtft
Hallo Rudi,
thanks for your response. I did not saw for long time, hence I was not online here. Will check soon, if it is working.
Thanks for support,
Michael
thanks for your response. I did not saw for long time, hence I was not online here. Will check soon, if it is working.
Thanks for support,
Michael