Skip to content

Commit 26a39a0

Browse files
yc-hou-0919scorpiochang
authored andcommitted
Add WaveShare 3.5" & 4" touch screen
Base on Sam's effort, modify to support WaveShare 3.5" & 4" touch screen. For 4" screen, the touch calibration is ok and do not need to configure anymore. But the 3.5" should add the calibration config file "40-libinput.conf" into /usr/share/X11/xorg.conf.d/ Change-Id: I436f4c21742f6f148994c9587ce1e19ca12123f8 Reviewed-on: https://tp-biosrd-v02/gerrit/80155 Reviewed-by: Scorpio Chang(張志賢) <Scorpio_Chang@asus.com> Tested-by: Scorpio Chang(張志賢) <Scorpio_Chang@asus.com>
1 parent 01bae2a commit 26a39a0

3 files changed

Lines changed: 119 additions & 0 deletions

File tree

arch/arm/boot/dts/overlays/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
dtbo-$(CONFIG_ARCH_ROCKCHIP) += \
44
hifiberry-dac-amp.dtbo \
5+
waveshare35a-tinker.dtbo \
56

67
targets += dtbs dtbs_install
78
targets += $(dtbo-y)
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
/dts-v1/;
2+
/plugin/;
3+
4+
/ {
5+
compatible = "rockchip,rk3288-miniarm", "rockchip,rk3288";
6+
7+
fragment@0 {
8+
target = <&spi2>;
9+
10+
__overlay__ {
11+
status = "okay";
12+
13+
spidev@0 {
14+
status = "disabled";
15+
};
16+
17+
spidev@1 {
18+
status = "disabled";
19+
};
20+
};
21+
};
22+
23+
fragment@1 {
24+
target = <&gpio5>;
25+
26+
__overlay__ {
27+
waveshare35a_pins: waveshare35a_pins {
28+
rockchip,pins = <5 19 0 &pcfg_pull_none>,
29+
<5 11 0 &pcfg_pull_none>,
30+
<5 12 0 &pcfg_pull_none>;
31+
};
32+
};
33+
};
34+
35+
fragment@2 {
36+
target = <&spi2>;
37+
38+
__overlay__ {
39+
#address-cells = <0x1>;
40+
#size-cells = <0x0>;
41+
42+
waveshare35a@0 {
43+
compatible = "ilitek,ili9486";
44+
reg = <0>;
45+
pinctrl-names = "default";
46+
pinctrl-0 = <&waveshare35a_pins>;
47+
spi-max-frequency = <15000000>;
48+
txbuflen = <32768>;
49+
rotate = <270>;
50+
bgr = <0>;
51+
fps = <30>;
52+
buswidth = <8>;
53+
regwidth = <16>;
54+
reset-gpios = <&gpio5 19 0>;
55+
dc-gpios = <&gpio5 11 0>;
56+
debug = <0>;
57+
init = <0x10000b0 0x00
58+
0x1000011
59+
0x20000ff
60+
0x100003a 0x55
61+
0x1000036 0x28
62+
0x10000c2 0x44
63+
0x10000c5 0x00 0x00 0x00 0x00
64+
0x10000e0 0x0f 0x1f 0x1c 0x0c 0x0f 0x08 0x48 0x98 0x37 0x0a 0x13 0x04 0x11 0x0d 0x00
65+
0x10000e1 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00
66+
0x10000e2 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00
67+
/* piscreen -> waveshare35a */
68+
0x1000036 0x28
69+
0x1000011
70+
0x1000029>;
71+
};
72+
73+
waveshare35a-ts@1 {
74+
compatible = "ti,ads7846";
75+
reg = <1>;
76+
spi-max-frequency = <2000000>;
77+
interrupts = <12 2>;
78+
interrupt-parent = <&gpio5>;
79+
pendown-gpio = <&gpio5 12 0>;
80+
ti,x-plate-ohms = /bits/ 16 <60>;/*[00 3c];*/
81+
ti,pressure-max = /bits/ 16 <255>;/*[00 ff];*/
82+
ti,swap-xy = <0>;
83+
};
84+
};
85+
};
86+
};

arch/arm/configs/miniarm-rk3288_defconfig

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,7 @@ CONFIG_JOYSTICK_XPAD_FF=y
434434
CONFIG_JOYSTICK_XPAD_LEDS=y
435435
CONFIG_INPUT_TABLET=y
436436
CONFIG_INPUT_TOUCHSCREEN=y
437+
CONFIG_TOUCHSCREEN_ADS7846=y
437438
CONFIG_TOUCHSCREEN_ATMEL_MXT=y
438439
CONFIG_TOUCHSCREEN_ELAN=y
439440
CONFIG_TOUCHSCREEN_USB_COMPOSITE=y
@@ -609,6 +610,37 @@ CONFIG_RTC_DRV_RK808=y
609610
CONFIG_DMADEVICES=y
610611
CONFIG_PL330_DMA=y
611612
CONFIG_STAGING=y
613+
CONFIG_FB_TFT=y
614+
CONFIG_FB_TFT_AGM1264K_FL=y
615+
CONFIG_FB_TFT_BD663474=y
616+
CONFIG_FB_TFT_HX8340BN=y
617+
CONFIG_FB_TFT_HX8347D=y
618+
CONFIG_FB_TFT_HX8353D=y
619+
CONFIG_FB_TFT_HX8357D=y
620+
CONFIG_FB_TFT_ILI9163=y
621+
CONFIG_FB_TFT_ILI9320=y
622+
CONFIG_FB_TFT_ILI9325=y
623+
CONFIG_FB_TFT_ILI9340=y
624+
CONFIG_FB_TFT_ILI9341=y
625+
CONFIG_FB_TFT_ILI9481=y
626+
CONFIG_FB_TFT_ILI9486=y
627+
CONFIG_FB_TFT_PCD8544=y
628+
CONFIG_FB_TFT_RA8875=y
629+
CONFIG_FB_TFT_S6D02A1=y
630+
CONFIG_FB_TFT_S6D1121=y
631+
CONFIG_FB_TFT_SSD1289=y
632+
CONFIG_FB_TFT_SSD1306=y
633+
CONFIG_FB_TFT_SSD1331=y
634+
CONFIG_FB_TFT_SSD1351=y
635+
CONFIG_FB_TFT_ST7735R=y
636+
CONFIG_FB_TFT_ST7789V=y
637+
CONFIG_FB_TFT_TINYLCD=y
638+
CONFIG_FB_TFT_TLS8204=y
639+
CONFIG_FB_TFT_UC1701=y
640+
CONFIG_FB_TFT_UPD161704=y
641+
CONFIG_FB_TFT_WATTEROTT=y
642+
CONFIG_FB_FLEX=y
643+
CONFIG_FB_TFT_FBTFT_DEVICE=y
612644
CONFIG_SENSORS_ISL29018=y
613645
CONFIG_TSL2583=y
614646
CONFIG_ASHMEM=y

0 commit comments

Comments
 (0)