Skip to content

Commit

Permalink
feat: add waveshare lcd for 5a/5c/5d
Browse files Browse the repository at this point in the history
Signed-off-by: Nascs Fang <[email protected]>
  • Loading branch information
nascs committed Aug 12, 2024
1 parent 7e31890 commit 1ae5db7
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/arm64/boot/dts/rockchip/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,8 @@ dtb-$(CONFIG_CLK_RK3588) += \
rk3588-spi1-m2-cs1-spidev.dtbo \
rk3588-spi2-m1-cs0-spidev.dtbo \
rk3588-spi4-m2-cs0-spidev.dtbo \
rk3588-spi4-m2-cs0-waveshare35.dtbo \
rk3588-spi4-m2-cs0-waveshare35b.dtbo \
rk3588-uart1-m2.dtbo \
rk3588-uart2-m0.dtbo \
rk3588-uart2-m2.dtbo \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#define DISPLAY_SPI spi4
#include "waveshare35-lcd.dtsi"

/ {
metadata {
title = "Enable Waveshare 3.5inch RPi LCD (C) on SPI4";
compatible = "radxa,rock-5a", "radxa,rock-5c", "radxa,rock-5d";
category = "misc";
exclusive = "GPIO1_A2", "GPIO1_A0", "GPIO1_A1", "GPIO1_A3", "GPIO1_B0", "GPIO1_B5", "GPIO4_B3";
description = "Enable Waveshare 3.5inch RPi LCD (C) on SPI4.";
};
};

&DISPLAY_SPI {
pinctrl-names = "default", "high_speed";
pinctrl-0 = <&spi4m2_cs0 &spi4m2_pins>;
};

&ili9486 {
reset-gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>;
dc-gpios = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>;
};

&ads7846 {
status = "disabled";
interrupts = <RK_PB3 IRQ_TYPE_EDGE_FALLING>;
interrupt-parent = <&gpio4>;
pendown-gpio = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#define DISPLAY_SPI spi4
#include "rk3588-spi4-m2-cs0-waveshare35.dts"

/ {
metadata {
title = "Enable Waveshare 3.5inch RPi LCD (B) on SPI4";
description = "Enable Waveshare 3.5inch RPi LCD (B) on SPI4.";
};
};

&ili9486 {
init = <0x10000b0 0x0
0x1000011
0x20000ff
0x1000021
0x100003a 0x55
0x10000c2 0x33
0x10000c5 0x0 0x1e 0x80
0x1000036 0x28
0x10000b1 0xb0
0x10000e0 0x0 0x13 0x18 0x4 0xf 0x6 0x3a 0x56 0x4d 0x3 0xa 0x6 0x30 0x3e 0xf
0x10000e1 0x0 0x13 0x18 0x1 0x11 0x6 0x38 0x34 0x4d 0x6 0xd 0xb 0x31 0x37 0xf
0x1000011
0x20000ff
0x1000029>;
};

0 comments on commit 1ae5db7

Please sign in to comment.