FYSETC / FYSETC-CTP40

This repo contains the infomations and drivers for FYSETC CTP40 display
10 stars 3 forks source link

Raspberry pi zero 2w #10

Closed yzheka closed 1 year ago

yzheka commented 1 year ago

Is there any way to make it work on rpi zero 2w?

Vossberger commented 1 year ago

same question here, actually working on 64-Bit bullseye (Zero 2W). Display comes up at boot and turns of after 1 second. I used the Pi4 64-bit install script.

yzheka commented 1 year ago

ok, it works on 64-bit image but I am unable to rotate display. it also works on 32 bit image but there touch is not working

ayufan commented 1 year ago

To make this work you just need. It should work on any RPI board.

# /boot/config.txt
dtoverlay=vc4-kms-v3d
dtoverlay=vc4-kms-dpi-hyperpixel4,rotate=270,touchscreen-swapped-x-y,touchscreen-inverted-x

# /etc/X11/xorg.conf.d/90-monitor.conf 
Section "Monitor"
    Identifier "DPI-1"
    Option "Rotate" "left"
EndSection
yzheka commented 1 year ago

To make this work you just need. It should work on any RPI board.

# /boot/config.txt
dtoverlay=vc4-kms-v3d
dtoverlay=vc4-kms-dpi-hyperpixel4,rotate=270,touchscreen-swapped-x-y,touchscreen-inverted-x

# /etc/X11/xorg.conf.d/90-monitor.conf 
Section "Monitor"
    Identifier "DPI-1"
    Option "Rotate" "left"
EndSection

This is for clean raspberry os? No need to install any drivers from this repo?

ayufan commented 1 year ago

@yzheka Correct. Latest Raspbian OS. No need for any drivers.

yzheka commented 1 year ago

@yzheka Correct. Latest Raspbian OS. No need for any drivers.

Wow, it works, thank y very much

yzheka commented 1 year ago

For me it was enough only to add

dtoverlay=vc4-kms-v3d
dtoverlay=vc4-kms-dpi-hyperpixel4,rotate=90

into config.txt All other parameters break touch orientation

ayufan commented 1 year ago

@yzheka It does depend what type of rotation you want. However, ultimately this is some combination of above.

The important thing is that everything is built-in.

yzheka commented 1 year ago

@ayufan right. But for me it seemed to work ok without touch related parameters. Touch orientation follow screen rotation. Maybe it depends on display revision, I don't know. But any way thank you very much for such simple solution, you saved me much time on digging and solving that