I purchased a Waveshare 1.3inch LCD HAT. Its Wiki is https://www.waveshare.com/wiki/1.3inch_LCD_HAT. I wrote a Python program for the 1.3inch_LCD_HAT on a Raspberry Pi Zero 2W. Now, I want to run it on a Radxa ZERO 3W. What modifications do I need to make? Since my development and testing have always been based on Raspberry OS, I’m not sure how to replicate it on RadxaOS. For example, enabling the SPI interface and the differences in GPIO.
I’m a newbie developer and this is my first time working with hardware development. I apologize for any inconvenience caused and hope to receive assistance.
1.3inch LCD HAT - Waveshare for Radxa ZERO 3W
you need to know the display ic and touch ic, and write a dts file to enable it
I tried writing Overlays and enabled it in rsetup.
/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include <dt-bindings/interrupt-controller/irq.h>
/ {
metadata {
title = "Waveshare 1.3inch LCD HAT on SPI3";
compatible = "radxa,zero3";
category = "misc";
exclusive = "GPIO4_C6", "GPIO4_C2", "GPIO4_C3", "GPIO3_C1", "GPIO3_B2", "GPIO3_A2";
description = "Waveshare 1.3inch LCD HAT on SPI3 For Radxa Zero 3W.";
};
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>;
st7789v@0 {
compatible = "sitronix,st7789v";
reg = <0>;
spi-max-frequency = <40000000>;
width = <240>;
height = <240>;
buswidth = <8>;
regwidth = <8>;
fps = <60>;
rotate = <0>;
debug = <0>;
// configure pin assigment below
dc-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_LOW>;
};
};
};
};
But it doesn’t seem to work. I still haven’t been able to light it up.
Could you please answer this question or provide relevant examples? I would be extremely grateful.
I’ve been trying to find a solution but haven’t succeeded in testing it yet. Could you please provide me with some overlays examples and a related Python demo? I would really appreciate your help.