Skip to content

Commit 32b8593

Browse files
authored
Merge pull request #359 from nascs/waveshare35_lcd_5acd
feat: add waveshare lcd for 5a/5c/5d
2 parents d65fd17 + 3d06485 commit 32b8593

File tree

3 files changed

+59
-0
lines changed

3 files changed

+59
-0
lines changed

arch/arm64/boot/dts/rockchip/overlays/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,8 @@ dtb-$(CONFIG_CLK_RK3588) += \
424424
rk3588-spi1-m2-cs1-spidev.dtbo \
425425
rk3588-spi2-m1-cs0-spidev.dtbo \
426426
rk3588-spi4-m2-cs0-spidev.dtbo \
427+
rk3588-spi4-m2-cs0-waveshare35.dtbo \
428+
rk3588-spi4-m2-cs0-waveshare35b.dtbo \
427429
rk3588-uart1-m2.dtbo \
428430
rk3588-uart2-m0.dtbo \
429431
rk3588-uart2-m2.dtbo \
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#define DISPLAY_SPI spi4
2+
#include "waveshare35-lcd.dtsi"
3+
4+
/ {
5+
metadata {
6+
title = "Enable Waveshare 3.5inch RPi LCD (C) on SPI4";
7+
compatible = "radxa,rock-5a", "radxa,rock-5c", "radxa,rock-5d";
8+
category = "misc";
9+
exclusive = "GPIO1_A2", "GPIO1_A0", "GPIO1_A1", "GPIO1_A3", "GPIO1_B0", "GPIO1_B5", "GPIO4_B3";
10+
description = "Enable Waveshare 3.5inch RPi LCD (C) on SPI4.
11+
Touch panel is currently unsupported.";
12+
};
13+
};
14+
15+
&DISPLAY_SPI {
16+
pinctrl-0 = <&spi4m2_pins>;
17+
num-cs = <2>;
18+
cs-gpios = <&gpio1 RK_PA3 GPIO_ACTIVE_LOW
19+
&gpio1 RK_PA4 GPIO_ACTIVE_LOW>;
20+
};
21+
22+
&ili9486 {
23+
reset-gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>;
24+
dc-gpios = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>;
25+
};
26+
27+
&ads7846 {
28+
status = "disabled";
29+
interrupt-parent = <&gpio4>;
30+
interrupts = <RK_PB3 IRQ_TYPE_EDGE_FALLING>;
31+
pendown-gpio = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>;
32+
};
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#include "rk3588-spi4-m2-cs0-waveshare35.dts"
2+
3+
/ {
4+
metadata {
5+
title = "Enable Waveshare 3.5inch RPi LCD (B) on SPI4";
6+
description = "Enable Waveshare 3.5inch RPi LCD (B) on SPI4.";
7+
};
8+
};
9+
10+
&ili9486 {
11+
init = <0x10000b0 0x0
12+
0x1000011
13+
0x20000ff
14+
0x1000021
15+
0x100003a 0x55
16+
0x10000c2 0x33
17+
0x10000c5 0x0 0x1e 0x80
18+
0x1000036 0x28
19+
0x10000b1 0xb0
20+
0x10000e0 0x0 0x13 0x18 0x4 0xf 0x6 0x3a 0x56 0x4d 0x3 0xa 0x6 0x30 0x3e 0xf
21+
0x10000e1 0x0 0x13 0x18 0x1 0x11 0x6 0x38 0x34 0x4d 0x6 0xd 0xb 0x31 0x37 0xf
22+
0x1000011
23+
0x20000ff
24+
0x1000029>;
25+
};

0 commit comments

Comments
 (0)