Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit e670144

Browse files
committed
fbtft_device: added support for waveshare32b
Added support based on issue #181
1 parent 8116d72 commit e670144

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

fbtft_device.c

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,16 @@ static int pitft_init_sequence[] = {
164164
0x0E,0x09,0x00,-1,0xE1,0x00,0x0E,0x14,0x03,0x11,0x07,0x31,0xC1,0x48,
165165
0x08,0x0F,0x0C,0x31,0x36,0x0F,-1,0x11,-2,100,-1,0x29,-2,20,-3 };
166166

167+
static int waveshare32b_init_sequence[] = {
168+
-1,0xCB,0x39,0x2C,0x00,0x34,0x02,-1,0xCF,0x00,0xC1,0x30,
169+
-1,0xE8,0x85,0x00,0x78,-1,0xEA,0x00,0x00,-1,0xED,0x64,0x03,0x12,0x81,
170+
-1,0xF7,0x20,-1,0xC0,0x23,-1,0xC1,0x10,-1,0xC5,0x3e,0x28,-1,0xC7,0x86,
171+
-1,0x36,0x28,-1,0x3A,0x55,-1,0xB1,0x00,0x18,-1,0xB6,0x08,0x82,0x27,
172+
-1,0xF2,0x00,-1,0x26,0x01,
173+
-1,0xE0,0x0F,0x31,0x2B,0x0C,0x0E,0x08,0x4E,0xF1,0x37,0x07,0x10,0x03,0x0E,0x09,0x00,
174+
-1,0xE1,0x00,0x0E,0x14,0x03,0x11,0x07,0x31,0xC1,0x48,0x08,0x0F,0x0C,0x31,0x36,0x0F,
175+
-1,0x11,-2,120,-1,0x29,-1,0x2c,-3 };
176+
167177
/* Supported displays in alphabetical order */
168178
static struct fbtft_device_display displays[] = {
169179
{
@@ -999,6 +1009,26 @@ static struct fbtft_device_display displays[] = {
9991009
},
10001010
}
10011011
}
1012+
}, {
1013+
.name = "waveshare32b",
1014+
.spi = &(struct spi_board_info) {
1015+
.modalias = "fb_ili9340",
1016+
.max_speed_hz = 48000000,
1017+
.mode = SPI_MODE_0,
1018+
.platform_data = &(struct fbtft_platform_data) {
1019+
.display = {
1020+
.buswidth = 8,
1021+
.backlight = 1,
1022+
.init_sequence = waveshare32b_init_sequence,
1023+
},
1024+
.bgr = true,
1025+
.gpios = (const struct fbtft_gpio []) {
1026+
{ "reset", 27 },
1027+
{ "dc", 22 },
1028+
{},
1029+
},
1030+
}
1031+
}
10021032
}, {
10031033
.name = "waveshare22",
10041034
.spi = &(struct spi_board_info) {

0 commit comments

Comments
 (0)