Jump to content

Zokhoi

Members
  1. You should look at the Linux documentation for XPT2046/ADS7846 , Raspberry Pi's ADS7846 overlay and goodtft's dtparams to see how to write the overlay then.
  2. Here is my image. Well, dts files and dt overlay are files that specify the hardware on your board, and controls whether the kernel sees some of the pins as an interface like SPI. There are kernel drivers and userspace drivers, both of which requires the SPI to be activated in the device tree to work. The overlay I posted above activates spidev, which provides an SPI interface for the userspace to use, so something like Pimoroni ST7789 python library could communicate on the SPI on demand. fbtft is a kernel module that works with small SPI displays, like the ST7796U (?) panel that I have. In the overlay for fbtft, I have to specify settings for the display, so the system can recognize and initialize the panel at boot time. I needed a custom driver, as there is no ST7796 drivers in mainline kernel, and fbtft is not accepting new drivers anymore. You should check if there is an fbtft driver in the kernel for your panel that you can use right out of the box. Also the reason I put (?) after the ST7796U is that the store I bought the display from lists the panel as ST7796U, but when I try to use initialization sequence for ST7796 it didn't work. However I used the init sequence for ST7789 and it worked, but I still had to use ST7796's screen orientation settings, so I'm not sure which controller it actually is. Pins that I connected: MOSI: SPI3_MOSI_M1 / GPIO4_C3 / Pin 19 Clock: SPI3_CLK_M1 / GPIO4_C2 / Pin 23 Chip select: SPI3_CS0_M1 / GPIO4_C6 / Pin 24 Reset: GPIO3_B3 / Pin 29 Data/Command: GPIO3_B4 / Pin 31 Backlight: GPIO3_C3 / Pin 33 Overlay for ST7796 with fbtft: /dts-v1/; /plugin/; / { fragment@0 { target = <&spi3>; __overlay__ { status = "okay"; #address-cells = <1>; #size-cells = <0>; pinctrl-names = "default", "high_speed"; pinctrl-0 = <&spi3m1_cs0 &spi3m1_pins>; pinctrl-1 = <&spi3m1_cs0 &spi3m1_pins_hs>; cs-gpios = <&gpio4 22 1>; max-freq = <50000000>; st7796: panel@0 { compatible = "sitronix,st7796"; reg = <0>; status = "okay"; spi-max-frequency = <40000000>; dc-gpios = <&gpio3 12 0>; reset-gpios = <&gpio3 11 1>; led-gpios = <&gpio3 19 0>; rotate = <0>; bgr = <0>; width = <320>; height = <480>; fps = <60>; buswidth = <8>; // debug = <4000000>; }; }; }; };
  3. Tested the overlay with legacy kernel 5.10.160-legacy-rk35xx on trixie minimal, can confirm the SPI works on this kernel. Currently driving an ST7796U (?) panel with a custom fbtft driver.
  4. Legacy kernel is on 5.10, but it is deprecated and I have not tested it.
  5. Facing the same problem using kernel 6.1.75-vendor-rk35xx on trixie minimal. Trying to use SPI3 M1 CS0 with the overlay: /dts-v1/; /plugin/; / { fragment@0 { target = <&spi3>; __overlay__ { status = "okay"; #address-cells = <1>; #size-cells = <0>; pinctrl-names = "default", "high_speed"; pinctrl-0 = <&spi3m1_cs0 &spi3m1_pins>; pinctrl-1 = <&spi3m1_cs0 &spi3m1_pins_hs>; cs-gpios = <&gpio4 22 1>; max-freq = <20000000>; spidev@0 { compatible = "rockchip,spidev"; status = "okay"; reg = <0>; spi-max-frequency = <20000000>; }; }; }; }; results in: root@radxa-zero3:~# dmesg | grep spi [ 17.117658] rockchip-spi fe640000.spi: register misc device rkspi-dev3 [ 17.117691] rockchip-spi fe640000.spi: probed, poll=0, rsd=0, cs-inactive=0, ready=0 The same overlay works for Radxa debian bullseye xfce image with kernel 5.10.160-26-rk356x: root@radxa-zero3:~# dmesg | grep spi [ 18.371171] rockchip-spi fe640000.spi: probed, poll=0, rsd=0
  6. @north1 The current Rock 3C image is for the older board revisions with wifi 5 module. For board rev 1.4 with wifi 6 module, the driver is available as a dkms package from Radxa's github. The board uses SDIO for the module, therefore for the latest version firmware release as of writing: wget -O aic8800-firmware.deb https://github.com/radxa-pkg/aic8800/releases/download/3.0%2Bgit20240116.ec460377-8/aic8800-firmware_3.0+git20240116.ec460377-8_arm64.deb wget -O aic8800-sdio-dkms.deb https://github.com/radxa-pkg/aic8800/releases/download/3.0%2Bgit20240116.ec460377-8/aic8800-sdio-dkms_3.0+git20240116.ec460377-8_all.deb sudo apt install linux-headers-current-rockchip64 sudo dpkg -i aic8800-firmware.deb sudo dpkg -i aic8800-sdio-dkms.deb and then reboot.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines