Giter Club home page Giter Club logo

tinydrm_it8951's Introduction

tinydrm kernel module for Waveshare it8951 based eink kits.

Tested on raspberry pi zero w with kernel 4.19, only 6" panel is supported.

Compile

cd tinydrm_it8951
make

you can test it with

sudo sh utils/load.sh

Enable display at boot

Raspberry Pi

  • copy it8951.ko in your /lib/modules directory (eg /lib/modules/4.19.66+/kernel/drivers/gpu/drm/tinydrm/)
  • generate overlay : sudo make rpi_overlay
  • add modules tinydrm and it8951 in /etc/modules
  • add a line "dtoverlay=it8951" in /boot/config.txt
  • add "fbcon=map:1 vt.color=0xf0" at the end of /boot/cmdline.txt
  • to disable cursor blinking, add a line "echo 0 > /sys/class/graphics/fbcon/cursor_blink" in /etc/rc.local

Beaglebone

  • generate overlay: sudo make bb_spi0_overlay
  • edit /boot/uEnv.txt to add dtb : dtb_overlay=/lib/firmware/BB-IT8951-SPI0-00A0.dtbo
  • add "vt.color=0xf0" at the end of cmdline= in /boot/uEnv.txt

You can now reboot, the eink panel will be the screen by default

Kernel module options

You should change the VCOM value to match your panel, eg for -2.04V:

modprobe it8951 vcom=-2040

I successfully got 24Mhz SPI clock on beaglebone, you can change default frequency:

modprobe it8951 spi_freq=24000000

Finally, the driver include an automatic waveform selector, you can disable it at module load and set a predefined mode:

modprobe it8951 update_mode=2

Where update_mode can be one of:

#define IT8951_MODE_INIT  0
#define IT8951_MODE_DU    1
#define IT8951_MODE_GC16  2
#define IT8951_MODE_GL16  3
#define IT8951_MODE_GLR16 4
#define IT8951_MODE_GLD16 5

You can change the waveform at any moment with a /sys entry (eg on BBB):

cat /sys/devices/platform/ocp/48030000.spi/spi_master/spi0/spi0.0/update_mode
echo 2 > /sys/devices/platform/ocp/48030000.spi/spi_master/spi0/spi0.0/update_mode

You can also set the refresh rate for ghosting (number of refresh before full refresh):

cat /sys/devices/platform/ocp/48030000.spi/spi_master/spi0/spi0.0/ghosting_refresh
echo 50 > /sys/devices/platform/ocp/48030000.spi/spi_master/spi0/spi0.0/ghosting_refresh

tinydrm_it8951's People

Contributors

julbouln avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tinydrm_it8951's Issues

tiny drm is gone

Hi Julien
When I found this I was really excited it is something I have looked for a long time.
I built a new PI and went to compile it and got this
fatal error: drm/tinydrm/tinydrm.h: No such file or directory
#include <drm/tinydrm/tinydrm.h>
I have installed the official headers as you suggested to another person.
I was looking at your code and I thought I could get it to work on the higher resolution screens
but the kernel part of the code escapes me.

it looks like tinydrm is finished
see https://github.com/notro/tinydrm/wiki

Are you still interested in this project.

thanks,
:) Greg

/lib/modules/4.19.75+/build: No such file or directory. Stop.

I have got the errors when i made it.
Can you help me?

pi@raspberrypi:~/tinydrm_it8951 $ make make -C /lib/modules/uname -r/build M=$PWD make[1]: *** /lib/modules/4.19.75+/build: No such file or directory. Stop. make: *** [Makefile:4: default] Error 2

Error!!!

Hello! Compile your program to appear "Cannot fork" on Raspberry Pi 4B 1G
image

Moving to higher resolution it8951-driven panels

I've recently purchased a newer, higher resolution 6 inch panel to replace the 800x600 panel.

As far as I can tell looking at reference materials, the LUT constants etc. are the same between the panels and although the IT8951 board is badged as "IT8951 (B)" (and has a higher pin count on the ribbon) it also appears to follow the same reference specs and TCON commands etc.

When I swap the old panel (and driver board) for the new I get the 800x600 framebuffer mashed into one corner.

I can see a single place where the resolution is hardcoded in it8951.c. If I adjust that, I lose all picture entirely.

Any thoughts on whether there's anything else that will be hardcoding the driver to the old panel or the old resolution?

Please could you advise me what I should do?

I have got an error when I compile. Please could you advise me what I should do? Thanks a lot!
dtc -I dts -O dtb -o boot/overlays/it8951.dtb rpi-overlays/it8951-overlay.dts boot/overlays/it8951.dtb: Warning (unit_address_vs_reg): /fragment@0/__overlay__/spidev@0: node has a unit name, but no reg property boot/overlays/it8951.dtb: Warning (unit_address_vs_reg): /fragment@0/__overlay__/spidev@1: node has a unit name, but no reg property FATAL ERROR: Couldn't open output file boot/overlays/it8951.dtb: No such file or directory make: *** [Makefile:13: rpi_overlay] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.