提交 d94a1aa4 编写于 作者: M Michael Hennerich 提交者: Mike Frysinger

Blackfin: extend bfin-lq035q1-fb resources to include PPI mode

This lets us support the new BF527-EZKIT V2.1 via platform resources
tweaks only.
Signed-off-by: NMichael Hennerich <michael.hennerich@analog.com>
Signed-off-by: NMike Frysinger <vapier@gentoo.org>
上级 6924dfb0
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
#ifndef BFIN_LQ035Q1_H #ifndef BFIN_LQ035Q1_H
#define BFIN_LQ035Q1_H #define BFIN_LQ035Q1_H
/*
* LCD Modes
*/
#define LQ035_RL (0 << 8) /* Right -> Left Scan */ #define LQ035_RL (0 << 8) /* Right -> Left Scan */
#define LQ035_LR (1 << 8) /* Left -> Right Scan */ #define LQ035_LR (1 << 8) /* Left -> Right Scan */
#define LQ035_TB (1 << 9) /* Top -> Botton Scan */ #define LQ035_TB (1 << 9) /* Top -> Botton Scan */
...@@ -17,9 +20,18 @@ ...@@ -17,9 +20,18 @@
#define LQ035_NORM (1 << 13) /* Reversal */ #define LQ035_NORM (1 << 13) /* Reversal */
#define LQ035_REV (0 << 13) /* Reversal */ #define LQ035_REV (0 << 13) /* Reversal */
/*
* PPI Modes
*/
#define USE_RGB565_16_BIT_PPI 1
#define USE_RGB565_8_BIT_PPI 2
#define USE_RGB888_8_BIT_PPI 3
struct bfin_lq035q1fb_disp_info { struct bfin_lq035q1fb_disp_info {
unsigned mode; unsigned mode;
unsigned ppi_mode;
/* GPIOs */ /* GPIOs */
int use_bl; int use_bl;
unsigned gpio_bl; unsigned gpio_bl;
......
...@@ -749,9 +749,10 @@ static struct platform_device bfin_dpmc = { ...@@ -749,9 +749,10 @@ static struct platform_device bfin_dpmc = {
#include <asm/bfin-lq035q1.h> #include <asm/bfin-lq035q1.h>
static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = {
.mode = LQ035_NORM | LQ035_RGB | LQ035_RL | LQ035_TB, .mode = LQ035_NORM | LQ035_RGB | LQ035_RL | LQ035_TB,
.use_bl = 1, .ppi_mode = USE_RGB565_16_BIT_PPI,
.gpio_bl = GPIO_PG12, .use_bl = 1,
.gpio_bl = GPIO_PG12,
}; };
static struct resource bfin_lq035q1_resources[] = { static struct resource bfin_lq035q1_resources[] = {
......
...@@ -154,6 +154,7 @@ static struct platform_device bf52x_t350mcqb_device = { ...@@ -154,6 +154,7 @@ static struct platform_device bf52x_t350mcqb_device = {
static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = {
.mode = LQ035_NORM | LQ035_RGB | LQ035_RL | LQ035_TB, .mode = LQ035_NORM | LQ035_RGB | LQ035_RL | LQ035_TB,
.ppi_mode = USE_RGB565_8_BIT_PPI,
}; };
static struct resource bfin_lq035q1_resources[] = { static struct resource bfin_lq035q1_resources[] = {
......
...@@ -1131,9 +1131,10 @@ static struct platform_device bfin_fb_device = { ...@@ -1131,9 +1131,10 @@ static struct platform_device bfin_fb_device = {
#include <asm/bfin-lq035q1.h> #include <asm/bfin-lq035q1.h>
static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = {
.mode = LQ035_NORM | LQ035_RGB | LQ035_RL | LQ035_TB, .mode = LQ035_NORM | LQ035_RGB | LQ035_RL | LQ035_TB,
.use_bl = 0, /* let something else control the LCD Blacklight */ .ppi_mode = USE_RGB565_16_BIT_PPI,
.gpio_bl = GPIO_PF7, .use_bl = 0, /* let something else control the LCD Blacklight */
.gpio_bl = GPIO_PF7,
}; };
static struct resource bfin_lq035q1_resources[] = { static struct resource bfin_lq035q1_resources[] = {
...@@ -1147,8 +1148,8 @@ static struct resource bfin_lq035q1_resources[] = { ...@@ -1147,8 +1148,8 @@ static struct resource bfin_lq035q1_resources[] = {
static struct platform_device bfin_lq035q1_device = { static struct platform_device bfin_lq035q1_device = {
.name = "bfin-lq035q1", .name = "bfin-lq035q1",
.id = -1, .id = -1,
.num_resources = ARRAY_SIZE(bfin_lq035q1_resources), .num_resources = ARRAY_SIZE(bfin_lq035q1_resources),
.resource = bfin_lq035q1_resources, .resource = bfin_lq035q1_resources,
.dev = { .dev = {
.platform_data = &bfin_lq035q1_data, .platform_data = &bfin_lq035q1_data,
}, },
......
...@@ -534,9 +534,10 @@ static struct bfin5xx_spi_chip spi_ad7879_chip_info = { ...@@ -534,9 +534,10 @@ static struct bfin5xx_spi_chip spi_ad7879_chip_info = {
#include <asm/bfin-lq035q1.h> #include <asm/bfin-lq035q1.h>
static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = {
.mode = LQ035_NORM | LQ035_RGB | LQ035_RL | LQ035_TB, .mode = LQ035_NORM | LQ035_RGB | LQ035_RL | LQ035_TB,
.use_bl = 0, /* let something else control the LCD Blacklight */ .ppi_mode = USE_RGB565_16_BIT_PPI,
.gpio_bl = GPIO_PF7, .use_bl = 0, /* let something else control the LCD Blacklight */
.gpio_bl = GPIO_PF7,
}; };
static struct resource bfin_lq035q1_resources[] = { static struct resource bfin_lq035q1_resources[] = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册