ardangelo / sharp-drm-driver

Linux DRM Driver for 2.7" Sharp Memory LCD
GNU General Public License v2.0
35 stars 18 forks source link

title: Sharp DRM Driver layout: default

Sharp Memory LCD Kernel Driver

DRM kernel driver for 2.7" 400x240 Sharp memory LCD panel.

User Guide

This is a kernel device driver to provide a display device to the Linux kernel.

Font Configuration

This module automatically adds contents to the Raspberry Pi /boot/firmware/cmdline.txt to configure the Linux framebuffer, including font size.

The option fbcon=font:VGA8x8 configures default font to a smaller size, resulting in dimensions of 30 rows and 50 columns. Can be changed to font:VGA8x16 for a larger font. More fonts and options for the fbcon module can be found at https://www.kernel.org/doc/Documentation/fb/fbcon.txt

monoset Utility

The monoset script in this repo is a helper to tune the monochrome cutoff for an application. It is installed by default on Beepy Raspbian. If an application has problems with monochrome color, you can run

monoset [0 .. 255] <command>

The default driver monochrome cutoff is 32. Setting a value of 0 will cause the whole screen to display on, and 255 to display off.

For example, the nmtui utility works best with a cutoff of 127. In the default Beepy Raspbian profile, there is an alias

alias nmtui="monoset 127 nmtui"

This will automatically apply a cutoff of 127 when nmtui is started from the shell. You can add your own aliases to your profile at ~/.profile.

Module Parameters

Several options are exposed in the directory /sys/module/sharp_drm/parameters/. Run

echo <setting> | sudo tee /sys/module/sharp_drm/parameters/<param>

To make changes persistent:

Developer Reference

Building from source

Install the Linux kernel headers

sudo apt-get install raspberrypi-kernel-headers

Build, install, and enable the kernel module:

make
sudo make install

To remove:

sudo make uninstall

Original fbdev module readme with pinouts and build instructions

References

Original SPI and GPIO kernel driver at:

https://github.com/w4ilun/Sharp-Memory-LCD-Kernel-Driver

Sharp datasheet:

https://www.sharpsde.com/fileadmin/products/Displays/2016_SDE_App_Note_for_Memory_LCD_programming_V1.3.pdf