m5stack / CoreMP135_buildroot-external-st

External Buildroot tree for STMicroelectronics boards configurations
MIT License
7 stars 2 forks source link

Backport drivers from CoreMP135-Arch project, take 1 #4

Closed MeemeeLab closed 1 week ago

MeemeeLab commented 1 week ago

Patchset source

https://github.com/MeemeeLab/linux/commits/m5stack-coremp135-backport-stm61/

This commit adds following drivers:

This commit removes following drivers:

ili9341_m5: Old FB driver, replaced with TinyDRM. compatibility for old FB programs should not be a problem. Old AXP2101 backlight: The previous backlight driver contained inside fb_ili9341.c, which has been removed.

This commit fixes following issues:

AXP2101 Backlight

Backlight driver has been re-written to separate file, drivers/video/backlight/axp2101_m5stack_bl.c. This driver has support for DTS support, and DTS should be edited to include m5stack,axp2101-backlight compatible.

Test

# echo 0 > /sys/class/backlight/axp2101_m5stack_bl/brightness
# echo 80 > /sys/class/backlight/axp2101_m5stack_bl/brightness
# echo 100 > /sys/class/backlight/axp2101_m5stack_bl/brightness

https://github.com/m5stack/CoreMP135_buildroot-external-st/assets/57629983/8418e489-6e29-4dd0-ba80-295676ef2b06

AXP2101 Poweroff

Poweroff drivers, discussed in #3. DTS support, must include x-powers,axp2101-poweroff compatible.

Test

# poweroff

https://github.com/m5stack/CoreMP135_buildroot-external-st/assets/57629983/494271f1-e147-499b-9813-1b6cf837bb90

ILI9342C TinyDRM

DRM makes modern GUI programs like wayland (e.g. cage, wlroots) able to run. DRM devices have backward compatibility with programs make use of FB devices, e.g. /dev/fb0, and should not be a problem.

Test

# modetest -D /dev/dri/card0 -M ili9342c -s 31@34:320x240

image