Likewise I have been able to get the display and touch working, however I am using Pi OS Lite and testing with something like kmscube I can only get 19fps, not sure why; I should be able to get 60fps?O.k.! I'm using my 'standard wiring scheme' (GPIO usage which you can see in all examples here) in my overlay atm.
As my display is connected by wire harness let me change it to the pogo-pin connection scheme, test it and then I'll post an overlay dtbo file which you can use.
Right now backlight is controlled by GPIO only. Will change that to PWM from GPIO18 as well.
EDIT: here is what I'm working with on Pi5. It follows waveshare pin assignment -> can be used for direct mount (TP_RST should be connected by wire) and when using the wire harness. Backlight has PWM control.
copy the compiled .dtbo from the zip-archive into your overlays folder and add below to config.txtCode:
dtoverlay=spi0-waveshare-SK30896-pi5,i2c1Code:
/* * spi0-waveshare-SK30896-pi5-overlay.dts * TCON: ST7796S * Touch controller: Goodix GT911 * aBUGSwowrstnightmare *//dts-v1/;/plugin/;#include "i2c-buses.dtsi"#include <dt-bindings/interrupt-controller/irq.h>#include <dt-bindings/input/input.h>#include <dt-bindings/gpio/gpio.h>/ {compatible = "brcm,bcm2712";fragment@0 {target = <&spi0_cs_pins>;frag0: __overlay__ {brcm,pins = <8>;};};fragment@1 {target = <&spi0>;frag1: __overlay__ {cs-gpios = <&gpio 8 1>;status = "okay";};};fragment@2 {target = <&spidev0>;__overlay__ {status = "disabled";};};fragment@3 {target = <&spidev1>;__overlay__ {status = "disabled";};};fragment@4 {target = <&gpio>;__overlay__ {control_lcd0: control_lcd0 {brcm,pins = <27 22>; // LCD_RST LCD_DCbrcm,function = <1 1>; // 0 = input, 1 = outputbrcm,pull = <0 0>; // 0 = none, 1 = pull down, 2 = pull up};};};fragment@5 {target = <&spi0>;__overlay__ {/* needed to avoid dtc warning */#address-cells = <1>;#size-cells = <0>;status = "okay";panel_lcd0: panel@0 {compatible = "wavesku30896", "panel-mipi-dbi-spi";reg = <0>;pinctrl-names = "default";pinctrl-0 = <&control_lcd0>;spi-max-frequency = <48000000>;write-only;spi-cpha;spi-cpol;reset-gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;dc-gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;width-mm = <49>;height-mm = <74>;timing0: panel-timing {hactive = <320>;vactive = <480>;hback-porch = <0>;vback-porch = <0>;clock-frequency = <0>;hfront-porch = <0>;hsync-len = <0>;vfront-porch = <0>;vsync-len = <0>;};};};};fragment@6 {target = <&panel_lcd0>;__overlay__ {backlight = <&backlight_pwm>;};};fragment@7 {target-path = "/";__overlay__ {backlight_pwm: backlight_pwm {compatible = "pwm-backlight";brightness-levels = <0 6 8 12 16 24 32 40 48 64 96 128 160 192 224 255>;default-brightness-level = <15>;pwms = <&rp1_pwm0 2 1000000 0>;};};};fragment@8 {target = <&rp1_gpio>;__overlay__ {pwm_pins: pwm_pins {pins = "gpio18";function = "pwm0";};};};fragment@9 {target = <&rp1_pwm0>;__overlay__ {pinctrl-names = "default";pinctrl-0 = <&pwm_pins>;/* in Hz *//* Max supported frequency is 50MHz */assigned-clock-rates = <50000000>;status = "okay";};};fragment@10 {target = <&gpio>;__overlay__ {goodix_pins: goodix_pins {brcm,pins = <4 17>; // TP_INT TP_RSTbrcm,function = <0 1>; // 0 = input, 1 = outputbrcm,pull = <2 0>; // 0 = none, 1 = pull down, 2 = pull up};};};fragment@11 {target = <&i2cbus>;__overlay__ {#address-cells = <1>;#size-cells = <0>;status = "okay";gt911: gt911@5d {compatible = "goodix,gt911";reg = <0x5d>;pinctrl-names = "default";pinctrl-0 = <&goodix_pins>;interrupt-parent = <&gpio>;interrupts = <4 2>; // high-to-low edge triggeredirq-gpios = <&gpio 4 0>; // Pin7 on GPIO headerreset-gpios = <&gpio 17 0>; // Pin11 on GPIO headertouchscreen-size-x = <320>;touchscreen-size-y = <480>;touchscreen-x-mm = <49>;touchscreen-y-mm = <74>;};};};};
Statistics: Posted by cpdev — Wed Apr 30, 2025 10:22 pm