* [PATCH V2 0/7] ARM: S5P64X0: Add Framebuffer support
@ 2011-07-25 20:00 Ajay Kumar
2011-07-25 20:00 ` [PATCH RESEND 1/7] video: s3c-fb: Add S5P64X0 specific s3c_fb_driverdata Ajay Kumar
` (6 more replies)
0 siblings, 7 replies; 9+ messages in thread
From: Ajay Kumar @ 2011-07-25 20:00 UTC (permalink / raw)
To: linux-arm-kernel
The patches are created against "for-next" branch of Kukjin Kim's tree at:
git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git
Changes since V1:
- Remove mach/regs-fb.h, instead use plat/regs-fb.h.
- Add common pdata for FB and LCD in SMDK6440 and SMDK6450.
- Modify names(s5p-->smdk), max_bpp and refresh rate.
- Modify variable name(cfg-->chipid).
- Use __raw_readl, __raw_writel instead of readl and writel.
[Patch RESEND 1/7]
- Add "s5p64x0-fb" type driver_data(s3c_fb_driverdata).
- Display controller in S5P64X0 supports 3 windows.
[Patch V2 2/7]
- Resource definitions(_MEM, _IRQ).
[Patch RESEND 3/7]
- Set s3c_device_fb name as "s5p64x0-fb".
[Patch V2 4/7]
- GPIO settings for LCD in S5P6440 and S5P6450.
- Select LCD interface (RGB/i80).
[Patch V2 5/7]
- Creates a file to hold common FB and LCD code.
- Add Basic FB window definition with default_bpp=24.
- Add platform data for FB and LCD.
- platform_device support for LCD.
[Patch V2 6/7]
- Enables FB support and platform-lcd support for SMDK6440.
[Patch V2 7/7]
- Enables FB support and platform-lcd support for SMDK6450.
o To Paul Mundt, Jingoo han
[Patch RESEND 1/7] video: s3c-fb: Add S5P64X0 specific s3c_fb_driverdata
o To Kukjin Kim
[Patch V2 2/7] ARM: S5P64X0: Add register base and IRQ for Framebuffer
[Patch RESEND 3/7] ARM: S5P64X0: Set s3c_device_fb name
[Patch V2 4/7] ARM: S5P64X0: Add GPIO and SPCON settings for LCD
[Patch V2 5/7] ARM: S5P64X0: Add file to hold common Framebuffer and LCD code
[Patch V2 6/7] ARM: S5P6440: Enable LCD-LTE480 and Framebuffer support
[Patch V2 7/7] ARM: S5P6450: Enable LCD-LTE480 and Framebuffer support
arch/arm/mach-s5p64x0/Kconfig | 17 +++++
arch/arm/mach-s5p64x0/Makefile | 4 +
arch/arm/mach-s5p64x0/common-fb.c | 92 ++++++++++++++++++++++++
arch/arm/mach-s5p64x0/cpu.c | 3 +
arch/arm/mach-s5p64x0/include/mach/common-fb.h | 26 +++++++
arch/arm/mach-s5p64x0/include/mach/irqs.h | 4 +
arch/arm/mach-s5p64x0/include/mach/map.h | 3 +
arch/arm/mach-s5p64x0/include/mach/regs-gpio.h | 4 +
arch/arm/mach-s5p64x0/mach-smdk6440.c | 5 ++
arch/arm/mach-s5p64x0/mach-smdk6450.c | 5 ++
arch/arm/mach-s5p64x0/setup-fb.c | 48 ++++++++++++
arch/arm/plat-samsung/include/plat/fb.h | 14 ++++
drivers/video/s3c-fb.c | 27 +++++++
13 files changed, 252 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/mach-s5p64x0/common-fb.c
create mode 100644 arch/arm/mach-s5p64x0/include/mach/common-fb.h
create mode 100644 arch/arm/mach-s5p64x0/setup-fb.c
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH RESEND 1/7] video: s3c-fb: Add S5P64X0 specific s3c_fb_driverdata
2011-07-25 20:00 [PATCH V2 0/7] ARM: S5P64X0: Add Framebuffer support Ajay Kumar
@ 2011-07-25 20:00 ` Ajay Kumar
2011-07-25 20:00 ` [PATCH V2 2/7] ARM: S5P64X0: Add register base and IRQ for Framebuffer Ajay Kumar
` (5 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Ajay Kumar @ 2011-07-25 20:00 UTC (permalink / raw)
To: linux-arm-kernel
This patch:
Adds s3c_fb_driverdata for S5P64X0, which supports 3 windows.
Also, register "s5p64x0-fb" type driver_data.
Existing s3c_fb_driverdata definitions in s3c-fb.c
supports 5 or 2 windows.
Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
acked-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/video/s3c-fb.c | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
index 4aecf21..0fda252 100644
--- a/drivers/video/s3c-fb.c
+++ b/drivers/video/s3c-fb.c
@@ -1859,6 +1859,30 @@ static struct s3c_fb_driverdata s3c_fb_data_s3c2443 = {
},
};
+static struct s3c_fb_driverdata s3c_fb_data_s5p64x0 = {
+ .variant = {
+ .nr_windows = 3,
+ .vidtcon = VIDTCON0,
+ .wincon = WINCON(0),
+ .winmap = WINxMAP(0),
+ .keycon = WKEYCON,
+ .osd = VIDOSD_BASE,
+ .osd_stride = 16,
+ .buf_start = VIDW_BUF_START(0),
+ .buf_size = VIDW_BUF_SIZE(0),
+ .buf_end = VIDW_BUF_END(0),
+
+ .palette = {
+ [0] = 0x2400,
+ [1] = 0x2800,
+ [2] = 0x2c00,
+ },
+ },
+ .win[0] = &s3c_fb_data_s5p_wins[0],
+ .win[1] = &s3c_fb_data_s5p_wins[1],
+ .win[2] = &s3c_fb_data_s5p_wins[2],
+};
+
static struct platform_device_id s3c_fb_driver_ids[] = {
{
.name = "s3c-fb",
@@ -1872,6 +1896,9 @@ static struct platform_device_id s3c_fb_driver_ids[] = {
}, {
.name = "s3c2443-fb",
.driver_data = (unsigned long)&s3c_fb_data_s3c2443,
+ }, {
+ .name = "s5p64x0-fb",
+ .driver_data = (unsigned long)&s3c_fb_data_s5p64x0,
},
{},
};
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH V2 2/7] ARM: S5P64X0: Add register base and IRQ for Framebuffer
2011-07-25 20:00 [PATCH V2 0/7] ARM: S5P64X0: Add Framebuffer support Ajay Kumar
2011-07-25 20:00 ` [PATCH RESEND 1/7] video: s3c-fb: Add S5P64X0 specific s3c_fb_driverdata Ajay Kumar
@ 2011-07-25 20:00 ` Ajay Kumar
2011-07-25 20:00 ` [PATCH RESEND 3/7] ARM: S5P64X0: Set s3c_device_fb name Ajay Kumar
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Ajay Kumar @ 2011-07-25 20:00 UTC (permalink / raw)
To: linux-arm-kernel
This patch adds:
-- Framebuffer register mappings.
-- IRQ number being used.
Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
---
arch/arm/mach-s5p64x0/include/mach/irqs.h | 4 ++++
arch/arm/mach-s5p64x0/include/mach/map.h | 3 +++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-s5p64x0/include/mach/irqs.h b/arch/arm/mach-s5p64x0/include/mach/irqs.h
index 5837a36..53982db 100644
--- a/arch/arm/mach-s5p64x0/include/mach/irqs.h
+++ b/arch/arm/mach-s5p64x0/include/mach/irqs.h
@@ -87,6 +87,10 @@
#define IRQ_I2S0 IRQ_I2SV40
+#define IRQ_LCD_FIFO IRQ_DISPCON0
+#define IRQ_LCD_VSYNC IRQ_DISPCON1
+#define IRQ_LCD_SYSTEM IRQ_DISPCON2
+
/* S5P6450 EINT feature will be added */
/*
diff --git a/arch/arm/mach-s5p64x0/include/mach/map.h b/arch/arm/mach-s5p64x0/include/mach/map.h
index 95c9125..c5ef50c 100644
--- a/arch/arm/mach-s5p64x0/include/mach/map.h
+++ b/arch/arm/mach-s5p64x0/include/mach/map.h
@@ -47,6 +47,8 @@
#define S5P64X0_PA_HSMMC(x) (0xED800000 + ((x) * 0x100000))
+#define S5P64X0_PA_FB 0xEE000000
+
#define S5P64X0_PA_I2S 0xF2000000
#define S5P6450_PA_I2S1 0xF2800000
#define S5P6450_PA_I2S2 0xF2900000
@@ -64,6 +66,7 @@
#define S3C_PA_IIC1 S5P6440_PA_IIC1
#define S3C_PA_RTC S5P64X0_PA_RTC
#define S3C_PA_WDT S5P64X0_PA_WDT
+#define S3C_PA_FB S5P64X0_PA_FB
#define S5P_PA_CHIPID S5P64X0_PA_CHIPID
#define S5P_PA_SROMC S5P64X0_PA_SROMC
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH RESEND 3/7] ARM: S5P64X0: Set s3c_device_fb name
2011-07-25 20:00 [PATCH V2 0/7] ARM: S5P64X0: Add Framebuffer support Ajay Kumar
2011-07-25 20:00 ` [PATCH RESEND 1/7] video: s3c-fb: Add S5P64X0 specific s3c_fb_driverdata Ajay Kumar
2011-07-25 20:00 ` [PATCH V2 2/7] ARM: S5P64X0: Add register base and IRQ for Framebuffer Ajay Kumar
@ 2011-07-25 20:00 ` Ajay Kumar
2011-07-25 20:00 ` [PATCH V2 4/7] ARM: S5P64X0: Add GPIO and SPCON settings for LCD Ajay Kumar
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Ajay Kumar @ 2011-07-25 20:00 UTC (permalink / raw)
To: linux-arm-kernel
Set s3c_device_fb name as "s5p64x0-fb" for S5P6440 and S5P6450.
Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
---
arch/arm/mach-s5p64x0/cpu.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-s5p64x0/cpu.c b/arch/arm/mach-s5p64x0/cpu.c
index a5c0095..617da3b 100644
--- a/arch/arm/mach-s5p64x0/cpu.c
+++ b/arch/arm/mach-s5p64x0/cpu.c
@@ -38,6 +38,7 @@
#include <plat/s5p6440.h>
#include <plat/s5p6450.h>
#include <plat/adc-core.h>
+#include <plat/fb-core.h>
/* Initial IO mappings */
@@ -108,6 +109,7 @@ void __init s5p6440_map_io(void)
{
/* initialize any device information early */
s3c_adc_setname("s3c64xx-adc");
+ s3c_fb_setname("s5p64x0-fb");
iotable_init(s5p64x0_iodesc, ARRAY_SIZE(s5p64x0_iodesc));
iotable_init(s5p6440_iodesc, ARRAY_SIZE(s5p6440_iodesc));
@@ -117,6 +119,7 @@ void __init s5p6450_map_io(void)
{
/* initialize any device information early */
s3c_adc_setname("s3c64xx-adc");
+ s3c_fb_setname("s5p64x0-fb");
iotable_init(s5p64x0_iodesc, ARRAY_SIZE(s5p64x0_iodesc));
iotable_init(s5p6450_iodesc, ARRAY_SIZE(s5p6450_iodesc));
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH V2 4/7] ARM: S5P64X0: Add GPIO and SPCON settings for LCD
2011-07-25 20:00 [PATCH V2 0/7] ARM: S5P64X0: Add Framebuffer support Ajay Kumar
` (2 preceding siblings ...)
2011-07-25 20:00 ` [PATCH RESEND 3/7] ARM: S5P64X0: Set s3c_device_fb name Ajay Kumar
@ 2011-07-25 20:00 ` Ajay Kumar
2011-07-25 20:00 ` [PATCH V2 5/7] ARM: S5P64X0: Add file to hold common Framebuffer and LCD code Ajay Kumar
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Ajay Kumar @ 2011-07-25 20:00 UTC (permalink / raw)
To: linux-arm-kernel
This patch adds:
-- GPIO lines settings(HSYNC, VSYNC, VCLK and VD) for LCD.
-- Function to select LCD interface (RGB/i80)
Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
---
arch/arm/mach-s5p64x0/Kconfig | 6 +++
arch/arm/mach-s5p64x0/Makefile | 1 +
arch/arm/mach-s5p64x0/include/mach/regs-gpio.h | 4 ++
arch/arm/mach-s5p64x0/setup-fb.c | 48 ++++++++++++++++++++++++
arch/arm/plat-samsung/include/plat/fb.h | 14 +++++++
5 files changed, 73 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/mach-s5p64x0/setup-fb.c
diff --git a/arch/arm/mach-s5p64x0/Kconfig b/arch/arm/mach-s5p64x0/Kconfig
index 65c7518..4fee745 100644
--- a/arch/arm/mach-s5p64x0/Kconfig
+++ b/arch/arm/mach-s5p64x0/Kconfig
@@ -21,6 +21,12 @@ config CPU_S5P6450
help
Enable S5P6450 CPU support
+config S5P64X0_SETUP_FB
+ bool
+ help
+ Common setup code for S5P64X0 based boards with a LCD display
+ through RGB interface.
+
config S5P64X0_SETUP_I2C1
bool
help
diff --git a/arch/arm/mach-s5p64x0/Makefile b/arch/arm/mach-s5p64x0/Makefile
index 5f6afdf..487d179 100644
--- a/arch/arm/mach-s5p64x0/Makefile
+++ b/arch/arm/mach-s5p64x0/Makefile
@@ -28,3 +28,4 @@ obj-y += dev-audio.o
obj-$(CONFIG_S3C64XX_DEV_SPI) += dev-spi.o
obj-$(CONFIG_S5P64X0_SETUP_I2C1) += setup-i2c1.o
+obj-$(CONFIG_S5P64X0_SETUP_FB) += setup-fb.o
diff --git a/arch/arm/mach-s5p64x0/include/mach/regs-gpio.h b/arch/arm/mach-s5p64x0/include/mach/regs-gpio.h
index 6ce2547..34d4412 100644
--- a/arch/arm/mach-s5p64x0/include/mach/regs-gpio.h
+++ b/arch/arm/mach-s5p64x0/include/mach/regs-gpio.h
@@ -44,4 +44,8 @@
#define S5P64X0_EINT0MASK (S5P_VA_GPIO + EINT0MASK_OFFSET)
#define S5P64X0_EINT0PEND (S5P_VA_GPIO + EINT0PEND_OFFSET)
+#define S5P64X0_SPCON0 (S5P_VA_GPIO + 0x1A0)
+#define S5P64X0_SPCON0_LCD_SEL_MASK (0x3 << 0)
+#define S5P64X0_SPCON0_LCD_SEL_RGB (0x1 << 0)
+
#endif /* __ASM_ARCH_REGS_GPIO_H */
diff --git a/arch/arm/mach-s5p64x0/setup-fb.c b/arch/arm/mach-s5p64x0/setup-fb.c
new file mode 100644
index 0000000..0d9903a
--- /dev/null
+++ b/arch/arm/mach-s5p64x0/setup-fb.c
@@ -0,0 +1,48 @@
+/* linux/arch/arm/mach-s5p64x0/setup-fb.c
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com/
+ *
+ * Base S5P64X0 GPIO setup information for LCD framebuffer
+ *
+ * GPIO settings for LCD on any other board based on s5p64x0
+ * should go in this file.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include <linux/fb.h>
+#include <linux/gpio.h>
+
+#include <plat/fb.h>
+#include <plat/gpio-cfg.h>
+
+#include <mach/regs-clock.h>
+#include <mach/regs-gpio.h>
+
+void s5p64x0_fb_init(int lcd_interface_type)
+{
+ unsigned int cfg;
+
+ /* select TFT LCD type (RGB I/F) */
+ cfg = __raw_readl(S5P64X0_SPCON0);
+ cfg &= ~S5P64X0_SPCON0_LCD_SEL_MASK;
+ cfg |= lcd_interface_type;
+ __raw_writel(cfg, S5P64X0_SPCON0);
+}
+
+void s5p64x0_fb_gpio_setup_24bpp(void)
+{
+ unsigned int chipid;
+
+ chipid = __raw_readl(S5P64X0_SYS_ID) & 0xf0000;
+ if (chipid == 0x40000) {
+ s3c_gpio_cfgrange_nopull(S5P6440_GPI(0), 16, S3C_GPIO_SFN(2));
+ s3c_gpio_cfgrange_nopull(S5P6440_GPJ(0), 12, S3C_GPIO_SFN(2));
+ } else if (chipid == 0x50000) {
+ s3c_gpio_cfgrange_nopull(S5P6450_GPI(0), 16, S3C_GPIO_SFN(2));
+ s3c_gpio_cfgrange_nopull(S5P6450_GPJ(0), 12, S3C_GPIO_SFN(2));
+ }
+}
diff --git a/arch/arm/plat-samsung/include/plat/fb.h b/arch/arm/plat-samsung/include/plat/fb.h
index 01f10e4..bd79c0a 100644
--- a/arch/arm/plat-samsung/include/plat/fb.h
+++ b/arch/arm/plat-samsung/include/plat/fb.h
@@ -109,4 +109,18 @@ extern void s5pv210_fb_gpio_setup_24bpp(void);
*/
extern void exynos4_fimd0_gpio_setup_24bpp(void);
+/**
+ * s5p64x0_fb_init() - Common setup function for LCD
+ *
+ * Select LCD I/F configuration-RGB style or i80 style
+ */
+extern void s5p64x0_fb_init(int lcd_interface_type);
+
+/**
+ * s5p64x0_fb_gpio_setup_24bpp() - Common GPIO setup function for LCD
+ *
+ * Initialise the GPIO for a LCD display on the RGB interface.
+ */
+extern void s5p64x0_fb_gpio_setup_24bpp(void);
+
#endif /* __PLAT_S3C_FB_H */
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH V2 5/7] ARM: S5P64X0: Add file to hold common Framebuffer and LCD code
2011-07-25 20:00 [PATCH V2 0/7] ARM: S5P64X0: Add Framebuffer support Ajay Kumar
` (3 preceding siblings ...)
2011-07-25 20:00 ` [PATCH V2 4/7] ARM: S5P64X0: Add GPIO and SPCON settings for LCD Ajay Kumar
@ 2011-07-25 20:00 ` Ajay Kumar
2011-07-26 8:00 ` Russell King - ARM Linux
2011-07-25 20:00 ` [PATCH V2 6/7] ARM: S5P6440: Enable LCD-LTE480 and Framebuffer support Ajay Kumar
2011-07-25 20:00 ` [PATCH V2 7/7] ARM: S5P6450: " Ajay Kumar
6 siblings, 1 reply; 9+ messages in thread
From: Ajay Kumar @ 2011-07-25 20:00 UTC (permalink / raw)
To: linux-arm-kernel
This patch creates a file which holds the framebuffer and
LCD code which is common for SMDK6440 and SMDK6450.
It mainly includes:
-- Basic FB window definition.
-- platform data for FB and LCD.
-- platform_device support for LCD.
Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
---
arch/arm/mach-s5p64x0/Kconfig | 5 ++
arch/arm/mach-s5p64x0/Makefile | 3 +
arch/arm/mach-s5p64x0/common-fb.c | 92 ++++++++++++++++++++++++
arch/arm/mach-s5p64x0/include/mach/common-fb.h | 26 +++++++
4 files changed, 126 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/mach-s5p64x0/common-fb.c
create mode 100644 arch/arm/mach-s5p64x0/include/mach/common-fb.h
diff --git a/arch/arm/mach-s5p64x0/Kconfig b/arch/arm/mach-s5p64x0/Kconfig
index 4fee745..ed87151 100644
--- a/arch/arm/mach-s5p64x0/Kconfig
+++ b/arch/arm/mach-s5p64x0/Kconfig
@@ -32,6 +32,11 @@ config S5P64X0_SETUP_I2C1
help
Common setup code for i2c bus 1.
+config COMMON_FB
+ bool
+ help
+ Common framebuffer and LCD code which can be shared across SMDKs.
+
# machine support
config MACH_SMDK6440
diff --git a/arch/arm/mach-s5p64x0/Makefile b/arch/arm/mach-s5p64x0/Makefile
index 487d179..e5e90f9 100644
--- a/arch/arm/mach-s5p64x0/Makefile
+++ b/arch/arm/mach-s5p64x0/Makefile
@@ -22,6 +22,9 @@ obj-$(CONFIG_CPU_S5P6450) += clock-s5p6450.o
obj-$(CONFIG_MACH_SMDK6440) += mach-smdk6440.o
obj-$(CONFIG_MACH_SMDK6450) += mach-smdk6450.o
+#common code
+obj-$(CONFIG_COMMON_FB) += common-fb.o
+
# device support
obj-y += dev-audio.o
diff --git a/arch/arm/mach-s5p64x0/common-fb.c b/arch/arm/mach-s5p64x0/common-fb.c
new file mode 100644
index 0000000..a5531ef
--- /dev/null
+++ b/arch/arm/mach-s5p64x0/common-fb.c
@@ -0,0 +1,92 @@
+/* linux/arch/arm/mach-s5p64x0/common-fb.c
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com/
+ *
+ * Includes definitions for variables and functions
+ * needed in order to support framebuffer.
+ * Note that this code is common across SMDK6440 and SMDK6450.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include <linux/gpio.h>
+
+#include <mach/regs-clock.h>
+#include <mach/common-fb.h>
+
+#include <plat/devs.h>
+#include <plat/regs-fb.h>
+
+/* Frame Buffer */
+struct s3c_fb_pd_win smdk64x0_fb_win0 = {
+ .win_mode = {
+ .left_margin = 8,
+ .right_margin = 13,
+ .upper_margin = 7,
+ .lower_margin = 5,
+ .hsync_len = 3,
+ .vsync_len = 1,
+ .xres = 800,
+ .yres = 480,
+ .refresh = 60,
+ },
+ .max_bpp = 32,
+ .default_bpp = 24,
+};
+
+struct s3c_fb_platdata smdk64x0_lcd_pdata __initdata = {
+ .win[0] = &smdk64x0_fb_win0,
+ .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
+ .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
+ .setup_gpio = s5p64x0_fb_gpio_setup_24bpp,
+};
+
+/* LCD power controller */
+void smdk64x0_lte480_reset_power(struct plat_lcd_data *pd,
+ unsigned int power)
+{
+ unsigned int cfg;
+ int err;
+
+ if (power) {
+ cfg = readl(S5P64X0_SYS_ID) & 0xf0000;
+ if (cfg == 0x40000) {
+ err = gpio_request(S5P6440_GPN(5), "GPN");
+ if (err) {
+ printk(KERN_ERR "failed to request GPN for lcd reset\n");
+ return;
+ }
+
+ gpio_direction_output(S5P6440_GPN(5), 1);
+ gpio_set_value(S5P6440_GPN(5), 0);
+ gpio_set_value(S5P6440_GPN(5), 1);
+ gpio_free(S5P6440_GPN(5));
+ } else if (cfg == 0x50000) {
+ err = gpio_request(S5P6450_GPN(5), "GPN");
+ if (err) {
+ printk(KERN_ERR "failed to request GPN for lcd reset\n");
+ return;
+ }
+
+ gpio_direction_output(S5P6450_GPN(5), 1);
+ gpio_set_value(S5P6450_GPN(5), 0);
+ gpio_set_value(S5P6450_GPN(5), 1);
+ gpio_free(S5P6450_GPN(5));
+ }
+ }
+}
+
+struct plat_lcd_data smdk64x0_lcd_power_data = {
+ .set_power = smdk64x0_lte480_reset_power,
+};
+
+struct platform_device smdk64x0_lcd_lte480wv = {
+ .name = "platform-lcd",
+ .dev = {
+ .parent = &s3c_device_fb.dev,
+ .platform_data = &smdk64x0_lcd_power_data,
+ }
+};
diff --git a/arch/arm/mach-s5p64x0/include/mach/common-fb.h b/arch/arm/mach-s5p64x0/include/mach/common-fb.h
new file mode 100644
index 0000000..c239623
--- /dev/null
+++ b/arch/arm/mach-s5p64x0/include/mach/common-fb.h
@@ -0,0 +1,26 @@
+/* linux/arch/arm/mach-s5p64x0/include/mach/common-fb.h
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com/
+ *
+ * Includes declarations for variables and functions
+ * needed in order to support framebuffer.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include <linux/fb.h>
+#include <linux/platform_device.h>
+
+#include <video/platform_lcd.h>
+
+#include <plat/fb.h>
+
+extern struct s3c_fb_pd_win smdk64x0_fb_win0;
+extern struct s3c_fb_platdata smdk64x0_lcd_pdata;
+extern struct plat_lcd_data smdk64x0_lcd_power_data;
+extern struct platform_device smdk64x0_lcd_lte480wv;
+extern void smdk64x0_lte480_reset_power(struct plat_lcd_data *pd,
+ unsigned int power);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH V2 6/7] ARM: S5P6440: Enable LCD-LTE480 and Framebuffer support
2011-07-25 20:00 [PATCH V2 0/7] ARM: S5P64X0: Add Framebuffer support Ajay Kumar
` (4 preceding siblings ...)
2011-07-25 20:00 ` [PATCH V2 5/7] ARM: S5P64X0: Add file to hold common Framebuffer and LCD code Ajay Kumar
@ 2011-07-25 20:00 ` Ajay Kumar
2011-07-25 20:00 ` [PATCH V2 7/7] ARM: S5P6450: " Ajay Kumar
6 siblings, 0 replies; 9+ messages in thread
From: Ajay Kumar @ 2011-07-25 20:00 UTC (permalink / raw)
To: linux-arm-kernel
This patch enables s3c-fb support and platform-lcd support for SMDK6440.
Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
---
arch/arm/mach-s5p64x0/Kconfig | 3 +++
arch/arm/mach-s5p64x0/mach-smdk6440.c | 5 +++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-s5p64x0/Kconfig b/arch/arm/mach-s5p64x0/Kconfig
index ed87151..0596673 100644
--- a/arch/arm/mach-s5p64x0/Kconfig
+++ b/arch/arm/mach-s5p64x0/Kconfig
@@ -42,6 +42,7 @@ config COMMON_FB
config MACH_SMDK6440
bool "SMDK6440"
select CPU_S5P6440
+ select S3C_DEV_FB
select S3C_DEV_I2C1
select S3C_DEV_RTC
select S3C_DEV_WDT
@@ -50,7 +51,9 @@ config MACH_SMDK6440
select SAMSUNG_DEV_BACKLIGHT
select SAMSUNG_DEV_PWM
select SAMSUNG_DEV_TS
+ select S5P64X0_SETUP_FB
select S5P64X0_SETUP_I2C1
+ select COMMON_FB
help
Machine support for the Samsung SMDK6440
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6440.c b/arch/arm/mach-s5p64x0/mach-smdk6440.c
index 346f8df..6d86e74 100644
--- a/arch/arm/mach-s5p64x0/mach-smdk6440.c
+++ b/arch/arm/mach-s5p64x0/mach-smdk6440.c
@@ -34,6 +34,7 @@
#include <mach/regs-clock.h>
#include <mach/i2c.h>
#include <mach/regs-gpio.h>
+#include <mach/common-fb.h>
#include <plat/regs-serial.h>
#include <plat/gpio-cfg.h>
@@ -101,6 +102,8 @@ static struct platform_device *smdk6440_devices[] __initdata = {
&s3c_device_wdt,
&samsung_asoc_dma,
&s5p6440_device_iis,
+ &s3c_device_fb,
+ &smdk64x0_lcd_lte480wv,
};
static struct s3c2410_platform_i2c s5p6440_i2c0_data __initdata = {
@@ -165,6 +168,8 @@ static void __init smdk6440_machine_init(void)
ARRAY_SIZE(smdk6440_i2c_devs1));
samsung_bl_set(&smdk6440_bl_gpio_info, &smdk6440_bl_data);
+ s3c_fb_set_platdata(&smdk64x0_lcd_pdata);
+ s5p64x0_fb_init(S5P64X0_SPCON0_LCD_SEL_RGB);
platform_add_devices(smdk6440_devices, ARRAY_SIZE(smdk6440_devices));
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH V2 7/7] ARM: S5P6450: Enable LCD-LTE480 and Framebuffer support
2011-07-25 20:00 [PATCH V2 0/7] ARM: S5P64X0: Add Framebuffer support Ajay Kumar
` (5 preceding siblings ...)
2011-07-25 20:00 ` [PATCH V2 6/7] ARM: S5P6440: Enable LCD-LTE480 and Framebuffer support Ajay Kumar
@ 2011-07-25 20:00 ` Ajay Kumar
6 siblings, 0 replies; 9+ messages in thread
From: Ajay Kumar @ 2011-07-25 20:00 UTC (permalink / raw)
To: linux-arm-kernel
This patch enables s3c-fb support and platform-lcd support for SMDK6450.
Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
---
arch/arm/mach-s5p64x0/Kconfig | 3 +++
arch/arm/mach-s5p64x0/mach-smdk6450.c | 5 +++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-s5p64x0/Kconfig b/arch/arm/mach-s5p64x0/Kconfig
index 0596673..620e6af 100644
--- a/arch/arm/mach-s5p64x0/Kconfig
+++ b/arch/arm/mach-s5p64x0/Kconfig
@@ -60,6 +60,7 @@ config MACH_SMDK6440
config MACH_SMDK6450
bool "SMDK6450"
select CPU_S5P6450
+ select S3C_DEV_FB
select S3C_DEV_I2C1
select S3C_DEV_RTC
select S3C_DEV_WDT
@@ -68,7 +69,9 @@ config MACH_SMDK6450
select SAMSUNG_DEV_BACKLIGHT
select SAMSUNG_DEV_PWM
select SAMSUNG_DEV_TS
+ select S5P64X0_SETUP_FB
select S5P64X0_SETUP_I2C1
+ select COMMON_FB
help
Machine support for the Samsung SMDK6450
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6450.c b/arch/arm/mach-s5p64x0/mach-smdk6450.c
index 33f2adf..8108963 100644
--- a/arch/arm/mach-s5p64x0/mach-smdk6450.c
+++ b/arch/arm/mach-s5p64x0/mach-smdk6450.c
@@ -34,6 +34,7 @@
#include <mach/regs-clock.h>
#include <mach/i2c.h>
#include <mach/regs-gpio.h>
+#include <mach/common-fb.h>
#include <plat/regs-serial.h>
#include <plat/gpio-cfg.h>
@@ -119,6 +120,8 @@ static struct platform_device *smdk6450_devices[] __initdata = {
&s3c_device_wdt,
&samsung_asoc_dma,
&s5p6450_device_iis0,
+ &s3c_device_fb,
+ &smdk64x0_lcd_lte480wv,
/* s5p6450_device_spi0 will be added */
};
@@ -184,6 +187,8 @@ static void __init smdk6450_machine_init(void)
ARRAY_SIZE(smdk6450_i2c_devs1));
samsung_bl_set(&smdk6450_bl_gpio_info, &smdk6450_bl_data);
+ s3c_fb_set_platdata(&smdk64x0_lcd_pdata);
+ s5p64x0_fb_init(S5P64X0_SPCON0_LCD_SEL_RGB);
platform_add_devices(smdk6450_devices, ARRAY_SIZE(smdk6450_devices));
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH V2 5/7] ARM: S5P64X0: Add file to hold common Framebuffer and LCD code
2011-07-25 20:00 ` [PATCH V2 5/7] ARM: S5P64X0: Add file to hold common Framebuffer and LCD code Ajay Kumar
@ 2011-07-26 8:00 ` Russell King - ARM Linux
0 siblings, 0 replies; 9+ messages in thread
From: Russell King - ARM Linux @ 2011-07-26 8:00 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jul 25, 2011 at 04:00:23PM -0400, Ajay Kumar wrote:
> diff --git a/arch/arm/mach-s5p64x0/Kconfig b/arch/arm/mach-s5p64x0/Kconfig
> index 4fee745..ed87151 100644
> --- a/arch/arm/mach-s5p64x0/Kconfig
> +++ b/arch/arm/mach-s5p64x0/Kconfig
> @@ -32,6 +32,11 @@ config S5P64X0_SETUP_I2C1
> help
> Common setup code for i2c bus 1.
>
> +config COMMON_FB
This is a very bad config name. It's specific to a group of SoCs but it
seems to be advertising itself as something which isn't. What if
drivers/video/Kconfig gets a COMMON_FB symbol too?
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-07-26 8:00 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-25 20:00 [PATCH V2 0/7] ARM: S5P64X0: Add Framebuffer support Ajay Kumar
2011-07-25 20:00 ` [PATCH RESEND 1/7] video: s3c-fb: Add S5P64X0 specific s3c_fb_driverdata Ajay Kumar
2011-07-25 20:00 ` [PATCH V2 2/7] ARM: S5P64X0: Add register base and IRQ for Framebuffer Ajay Kumar
2011-07-25 20:00 ` [PATCH RESEND 3/7] ARM: S5P64X0: Set s3c_device_fb name Ajay Kumar
2011-07-25 20:00 ` [PATCH V2 4/7] ARM: S5P64X0: Add GPIO and SPCON settings for LCD Ajay Kumar
2011-07-25 20:00 ` [PATCH V2 5/7] ARM: S5P64X0: Add file to hold common Framebuffer and LCD code Ajay Kumar
2011-07-26 8:00 ` Russell King - ARM Linux
2011-07-25 20:00 ` [PATCH V2 6/7] ARM: S5P6440: Enable LCD-LTE480 and Framebuffer support Ajay Kumar
2011-07-25 20:00 ` [PATCH V2 7/7] ARM: S5P6450: " Ajay Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).