Skip to content

Commit b760948

Browse files
committed
shields: Add a GDEW042T2 with fast partial refresh
Add GoodDisplay GDEW042T2 with fast partial refresh. Based on configuration from GoodDisplay's Arduino example. Signed-off-by: Andreas Sandberg <[email protected]>
1 parent 2646e49 commit b760948

File tree

4 files changed

+99
-2
lines changed

4 files changed

+99
-2
lines changed

boards/shields/waveshare_epaper/Kconfig.defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# SPDX-License-Identifier: Apache-2.0
66
#
77

8-
if SHIELD_WAVESHARE_EPAPER_GDEH029A1 || SHIELD_WAVESHARE_EPAPER_GDEH0213B1 || SHIELD_WAVESHARE_EPAPER_GDEH0213B72 || SHIELD_WAVESHARE_EPAPER_GDEW075T7 || SHIELD_WAVESHARE_EPAPER_GDEH0154A07 || SHIELD_WAVESHARE_EPAPER_GDEW042T2
8+
if SHIELD_WAVESHARE_EPAPER_GDEH029A1 || SHIELD_WAVESHARE_EPAPER_GDEH0213B1 || SHIELD_WAVESHARE_EPAPER_GDEH0213B72 || SHIELD_WAVESHARE_EPAPER_GDEW075T7 || SHIELD_WAVESHARE_EPAPER_GDEH0154A07 || SHIELD_WAVESHARE_EPAPER_GDEW042T2 || SHIELD_WAVESHARE_EPAPER_GDEW042T2_P
99

1010

1111
if DISPLAY

boards/shields/waveshare_epaper/Kconfig.shield

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ config SHIELD_WAVESHARE_EPAPER_GDEH0154A07
1818

1919
config SHIELD_WAVESHARE_EPAPER_GDEW042T2
2020
def_bool $(shields_list_contains,waveshare_epaper_gdew042t2)
21+
22+
config SHIELD_WAVESHARE_EPAPER_GDEW042T2_P
23+
def_bool $(shields_list_contains,waveshare_epaper_gdew042t2-p)

boards/shields/waveshare_epaper/doc/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Current supported displays
6363
| GDEH0154D67 | | ssd16xx | |
6464
+--------------+-----------------+--------------+------------------------------+
6565
| Good Display | WFT0420CZ15 | UC8176 / | waveshare_epaper_gdew042t2 |
66-
| GDEW042T2 | | gd7965 | |
66+
| GDEW042T2 | | gd7965 | waveshare_epaper_gdew042t2-p |
6767
+--------------+-----------------+--------------+------------------------------+
6868

6969

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
/*
2+
* Copyright (c) 2022 Andreas Sandberg
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include "waveshare_epaper_common.dtsi"
8+
9+
/ {
10+
chosen {
11+
zephyr,display = &uc8176;
12+
};
13+
};
14+
15+
&arduino_spi {
16+
/*
17+
* GoodDisplay GDEW042T2 with fast partial refresh. Based on
18+
* configuration from GoodDisplay's Arduino example.
19+
*/
20+
uc8176: uc8176@0 {
21+
compatible = "gooddisplay,gdew042t2", "ultrachip,uc8176";
22+
spi-max-frequency = <4000000>;
23+
reg = <0>;
24+
width = <400>;
25+
height = <300>;
26+
dc-gpios = <&arduino_header 15 GPIO_ACTIVE_LOW>; /* D9 */
27+
reset-gpios = <&arduino_header 14 GPIO_ACTIVE_LOW>; /* D8 */
28+
busy-gpios = <&arduino_header 13 GPIO_ACTIVE_LOW>; /* D7 */
29+
30+
softstart = [ 17 17 17 ];
31+
32+
full {
33+
cdi = <0x07>;
34+
};
35+
36+
partial {
37+
pwr = [ 03 02 2b 2b ];
38+
cdi = <0x07>;
39+
pll = <0x3c>;
40+
vdcs = <0x08>;
41+
42+
lutc = [
43+
00 01 0E 00 00 01
44+
00 00 00 00 00 00
45+
00 00 00 00 00 00
46+
00 00 00 00 00 00
47+
00 00 00 00 00 00
48+
00 00 00 00 00 00
49+
00 00 00 00 00 00
50+
00 00
51+
];
52+
53+
lutww = [
54+
00 01 0E 00 00 01
55+
00 00 00 00 00 00
56+
00 00 00 00 00 00
57+
00 00 00 00 00 00
58+
00 00 00 00 00 00
59+
00 00 00 00 00 00
60+
00 00 00 00 00 00
61+
];
62+
63+
lutkw = [
64+
20 01 0E 00 00 01
65+
00 00 00 00 00 00
66+
00 00 00 00 00 00
67+
00 00 00 00 00 00
68+
00 00 00 00 00 00
69+
00 00 00 00 00 00
70+
00 00 00 00 00 00
71+
];
72+
73+
lutwk = [
74+
10 01 0E 00 00 01
75+
00 00 00 00 00 00
76+
00 00 00 00 00 00
77+
00 00 00 00 00 00
78+
00 00 00 00 00 00
79+
00 00 00 00 00 00
80+
00 00 00 00 00 00
81+
];
82+
83+
lutkk = [
84+
00 01 0E 00 00 01
85+
00 00 00 00 00 00
86+
00 00 00 00 00 00
87+
00 00 00 00 00 00
88+
00 00 00 00 00 00
89+
00 00 00 00 00 00
90+
00 00 00 00 00 00
91+
];
92+
};
93+
};
94+
};

0 commit comments

Comments
 (0)