Git Product home page Git Product logo

hypertouch40's Introduction

HyperTouch 4.0 Kernel driver

(Also compatible for HyperPixel 4.0 rectangle, but without backlight control)

HyperTouch 4.0 kernel driver

Guide for raspberry pi

Warning

Please mate the extension header with the display pcb only one time. When you dissassemble the extension header from the display, it can happen that you accidentially remove some goldpins and maybe loose some. When you remove the Raspberry Pi from the display please hold the extension header plastic during that process.

1. Prerequisites

Update system and reboot:

sudo apt-get update
sudo apt-get upgrade
sudo reboot

The reboot is necessary for dkms finding the current kernel-headers.

sudo apt-get install dkms git raspberrypi-kernel-headers

2. Clone repository into home directory

cd
git clone https://github.com/shpi/hypertouch40

3. Install

cd hypertouch40
sudo ln -s /home/pi/hypertouch40 /usr/src/hypertouch40-1.0
sudo dkms install hypertouch40/1.0

4. Configure i²c address and compile dtb

i²c address of the touchscreen varies between 0x14 and 0x5d.

Choose a method:

Automatic method with helper script:

sudo bash compile-dtb

You may also skip autodetect and force a specific address instead. i2cdetect -y 11 tells you the correct address. For example 5d:

sudo bash compile-dtb 5d

Manual method: Find the correct i²c address:

i2cdetect -y 11

If 14 is highlighted, the address is set correctly already. Proceed with compile step.

If 5d is highlighted, edit hypertouch40.dts with a text editor and replace the addresses to 5d on line 57 and 59:

            ft6236: ft6236@5d {
...
                reg = <0x5d>;

Compile hypertouch40.dts into /boot/overlays/hypertouch40.dtbo:

sudo dtc -I dts -O dtb -o /boot/overlays/hypertouch40.dtbo hypertouch40.dts

4. Update /boot/config.txt

Modify config.txt to enable and configure the drivers. Please make sure spi, i2c, display autodetect is removed before. You can also try our config.txt in this repository, if it doesn't work.

sudo nano /boot/config.txt
# Comment out or delete the internal GPIO interfaces because DPI requires most of the pins itself.
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on


# Include and configure hypertouch driver
dtoverlay=hypertouch40
enable_dpi_lcd=1
dpi_group=2
dpi_mode=87
dpi_output_format=0x7f216
dpi_timings=480 0 10 16 59 800 0 15 113 15 0 0 0 60 0 32000000 6

# Disable (comment out) HDMI output driver.
# Dual output is probably not supported on all models.
#dtoverlay=vc4-kms-v3d

# Reduce framebuffers to 1 for the hypertouch display. Saves RAM.
max_framebuffers=1


# Select one orientation below!

# Standard: Landscape, top is at pin header:
display_rotate=3
dtparam=touchscreen-swapped-x-y
dtparam=touchscreen-inverted-x


# 180° rotated: Landscape, top is on the opposite of pin header
# display_rotate=1
# dtparam=touchscreen-swapped-x-y
# dtparam=touchscreen-inverted-y


# 270° rotated: Portrait, top is on opposite of flex connector cable
# display_rotate=0


# 90° rotated: Portrait, top is at flex connector cable
# display_rotate=2
# dtparam=touchscreen-inverted-y
# dtparam=touchscreen-inverted-x

5. reboot

Reboot the pi after a change to config.txt to apply the new settings.

sudo reboot

Control backlight (min:0 max:31)

Our kernel module provides a fully compliant backlight interface that conforms to the Linux subsystem. All known backlight controls and features will work. However if you want to manually control the backlight, you can do that via command line also:

echo 31 | sudo tee /sys/class/backlight/soc\:backlight/brightness

hypertouch40's People

Contributors

shpi avatar lutzh86 avatar sausix avatar

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.