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

Commit

Permalink
fbtft_device: added support for waveshare32b
Browse files Browse the repository at this point in the history
Added support based on issue #181
  • Loading branch information
notro committed Dec 7, 2014
1 parent 8116d72 commit e670144
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions fbtft_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,16 @@ static int pitft_init_sequence[] = {
0x0E,0x09,0x00,-1,0xE1,0x00,0x0E,0x14,0x03,0x11,0x07,0x31,0xC1,0x48,
0x08,0x0F,0x0C,0x31,0x36,0x0F,-1,0x11,-2,100,-1,0x29,-2,20,-3 };

static int waveshare32b_init_sequence[] = {
-1,0xCB,0x39,0x2C,0x00,0x34,0x02,-1,0xCF,0x00,0xC1,0x30,
-1,0xE8,0x85,0x00,0x78,-1,0xEA,0x00,0x00,-1,0xED,0x64,0x03,0x12,0x81,
-1,0xF7,0x20,-1,0xC0,0x23,-1,0xC1,0x10,-1,0xC5,0x3e,0x28,-1,0xC7,0x86,
-1,0x36,0x28,-1,0x3A,0x55,-1,0xB1,0x00,0x18,-1,0xB6,0x08,0x82,0x27,
-1,0xF2,0x00,-1,0x26,0x01,
-1,0xE0,0x0F,0x31,0x2B,0x0C,0x0E,0x08,0x4E,0xF1,0x37,0x07,0x10,0x03,0x0E,0x09,0x00,
-1,0xE1,0x00,0x0E,0x14,0x03,0x11,0x07,0x31,0xC1,0x48,0x08,0x0F,0x0C,0x31,0x36,0x0F,
-1,0x11,-2,120,-1,0x29,-1,0x2c,-3 };

/* Supported displays in alphabetical order */
static struct fbtft_device_display displays[] = {
{
Expand Down Expand Up @@ -999,6 +1009,26 @@ static struct fbtft_device_display displays[] = {
},
}
}
}, {
.name = "waveshare32b",
.spi = &(struct spi_board_info) {
.modalias = "fb_ili9340",
.max_speed_hz = 48000000,
.mode = SPI_MODE_0,
.platform_data = &(struct fbtft_platform_data) {
.display = {
.buswidth = 8,
.backlight = 1,
.init_sequence = waveshare32b_init_sequence,
},
.bgr = true,
.gpios = (const struct fbtft_gpio []) {
{ "reset", 27 },
{ "dc", 22 },
{},
},
}
}
}, {
.name = "waveshare22",
.spi = &(struct spi_board_info) {
Expand Down

0 comments on commit e670144

Please sign in to comment.