sharp-drm-driver-radxa-zero/README.md

81 lines
2.0 KiB
Markdown
Raw Normal View History

2018-05-17 10:09:26 -04:00
# Sharp Memory LCD Kernel Driver
2018-05-17 12:45:14 -04:00
**Note**: I did not write this driver. I only modified it to clean up compiler warnings/errors. The original can be found here:
(http://www.librecalc.com/en/wp-content/uploads/sites/4/2014/10/sharp.c)
2018-05-17 13:05:21 -04:00
2018-05-17 12:45:14 -04:00
More information can be found here:
(http://www.librecalc.com/en/downloads/)
This driver is for the LS027B7DH01. It *should* work with other Sharp Mem LCD displays by modifying all 400/240 references with the correct dimensions for your screen.
## Hookup Guide
Connect the following pins:
2018-05-17 13:05:21 -04:00
Display | RasPi
------- | ---------
VIN | 3.3V
3V3 | N/C
GND | GND
SCLK | 11 (SCLK)
MOSI | 10 (MOSI)
CS | 23
EXTMD | 3.3V
DISP | 24
EXTIN | 25
2018-05-17 12:45:14 -04:00
## Compile/Install the driver
Verify that you have the linux kernel headers for your platform. For the RasPi these can be obtained by:
2018-05-17 13:05:21 -04:00
```
sudo apt-get install raspberrypi-kernel-headers
```
2018-05-17 12:45:14 -04:00
or more generally:
2018-05-17 13:05:21 -04:00
```
sudo apt-get install linux-headers-$(uname -r)
```
2018-05-17 12:45:14 -04:00
To compile the driver, run:
2018-05-17 13:05:21 -04:00
```
make
```
2018-05-17 12:45:14 -04:00
To install the driver, run:
2018-05-17 13:05:21 -04:00
```
sudo make modules_install
```
2018-05-17 12:45:14 -04:00
If you want the module to load at boot you'll need to add it to the /etc/modules file, like:
```
...
# This file contains...
# at boot time...
sharp
```
## Compile/Install the Device Tree Overlay
The included sharp.dts file is for the Raspberry Pi Zero W. To compile it, run:
2018-05-17 13:05:21 -04:00
```
dtc -@ -I dts -O dtb -o sharp.dtbo sharp.dts
```
2018-05-17 12:45:14 -04:00
To load it at runtime, copy it to /boot/overlays:
2018-05-17 13:05:21 -04:00
```
sudo cp sharp.dtbo /boot/overlays
```
2018-05-17 12:45:14 -04:00
And then add the following line to /boot/config.txt:
2018-05-17 13:05:21 -04:00
```
dtoverlay=sharp
```
2018-05-17 12:45:14 -04:00
## Console on Display
If you want the boot console to show up on the display, you'll need to append `fbcon=map:10` to /boot/cmdline.txt after *rootwait*, like:
2018-05-17 13:05:21 -04:00
```
... rootwait ... fbcon=map:10
```
2018-05-17 12:45:14 -04:00
To make sure the console fits on screen, uncomment the following lines in /boot/config.txt and set the resolution appropriately:
```
framebuffer_width=400
framebuffer_height=240
2018-05-17 13:05:21 -04:00
```