Integrate MHS-3.5inch RPi Display
|Status:||In Progress||Start date:||23 Apr 2021|
|Target version:||2.0 - Harkonnen|
|Severity:||01 - Critical|
- This has scripts (LCD35-show) that can be used as a basis for installing and configuring what's required. It could probably be made into a config opkg.
- https://github.com/goodtft/LCD-show/blob/master/etc/modprobe.d/fbtft.conf (it supported via fbtft)
This display has only a 480x320 display area. I can scale icons to fit this but should expect that, because I'm not using EGL as a Cairo backend (yet) that things might be a little slow.
The build seems to work on the dev platform if I use the following command from a terminal window.
This is with the HDMI plugged in and acting as the default display. Touchscreen works but might be rotated incorrectly - the display is in landscape mode but touchscreen appears to be in portrait mode. I'll deal with the touchscreen later.
So now I need to see how I can force the TFT to be used at boot. I might need to use fbcon on the cmdline or con2fbmap 1 1. But mostly I just need to find out if there are one or two fb devices when HDMI is not plugged in, then set the X.org startup to use the correct device. This could be done, potentially, by using different xorg.conf files and specifying the TFT device conf like so.
Section "Device" Identifier "Allwinner A10/A13/A20 FBDEV" Driver "fbturbo" Option "fbdev" "/dev/fb1" Option "SwapbuffersWait" "true" EndSection
I have scripts to switch from HDMI to TFT and back, but they're hacks that just rerun startx. Exiting the xterm that gets started from that drops me back to the last startx. So running pibox-tft puts me on the TFT and exiting that puts me back on the HDMI.
That's good enough for testing purposes to get the rest of the display working but not a production method of swapping. I need either fbcp or con2fbmap apparently.
The current problem is the display size. Setting the framebuffer wxh did squeeze the width but not the height.I need to review the following links and gather information on how to complete this project:
- https://philipp-weissmann.de/touch-display-auf-raspberry-pi-mit-arch-linux/ (German)
- https://forum.armbian.com/topic/13221-fbtft-with-device-tree-overlay-on-mainline/ (DTS info) #