* Re: Re: [PATCH v2 5/5] ARM: EXYNOS4: Add platform data for EXYNOS4 FIMD and LTE480WV platform-lcd
@ 2011-06-21 4:08 JinGoo Han
2011-06-21 8:13 ` Tushar Behera
0 siblings, 1 reply; 4+ messages in thread
From: JinGoo Han @ 2011-06-21 4:08 UTC (permalink / raw)
To: Tushar Behera, JinGoo Han
Cc: Kukjin Kim, Paul Mundt, linux-samsung-soc@vger.kernel.org,
Jong-Hun Han, ANAND KUMAR N, THOMAS P ABRAHAM, Sylwester Nawrocki,
Marek Szyprowski, Kyungmin Park, In-Ki Dae, ARM Linux, Ben Dooks
Hi, Tushar Behera.
> -----Original Message-----
> From: linux-samsung-soc-owner@vger.kernel.org [mailto:linux-samsung-soc-
> owner@vger.kernel.org] On Behalf Of Tushar Behera
> Sent: Tuesday, June 21, 2011 12:47 PM
> To: Jingoo Han
> Cc: Kukjin Kim; Paul Mundt; linux-samsung-soc@vger.kernel.org; Jonghun Han;
> Anand Kumar N; Thomas Abraham; Sylwester Nawrocki; Marek Szyprowski;
> Kyungmin Park; Inki Dae; ARM Linux; Ben Dooks
> Subject: Re: [PATCH v2 5/5] ARM: EXYNOS4: Add platform data for EXYNOS4
> FIMD and LTE480WV platform-lcd
>
> Hi,
>
> On Friday 17 June 2011 06:32 PM, Jingoo Han wrote:
> > From: Jonghun Han<jonghun.han@samsung.com>
> >
> > This patch adds support EXYNOS4 FIMD0 and LTE480WV LCD pannel.
> >
> > Signed-off-by: Jonghun Han<jonghun.han@samsung.com>
> > Signed-off-by: Jingoo Han<jg1.han@samsung.com>
> > ---
> > arch/arm/mach-exynos4/mach-smdkc210.c | 74
> +++++++++++++++++++++++++++++++++
> > arch/arm/mach-exynos4/mach-smdkv310.c | 74
> +++++++++++++++++++++++++++++++++
> > 2 files changed, 148 insertions(+), 0 deletions(-)
> >
>
> There are variants of SMDKV310 boards that don't use LTE480WV LCD panel.
> Won't it be better to provide an option of selecting the LCD panel
> through config file and adding the panel code accordingly?
>
> Also, the panel code can be consolidated at a single location and used
> in appropriate machine files.
>
Do you have a patch about that?
If you make a patch about your suggestion, please submit it.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 5/5] ARM: EXYNOS4: Add platform data for EXYNOS4 FIMD and LTE480WV platform-lcd
2011-06-21 4:08 Re: [PATCH v2 5/5] ARM: EXYNOS4: Add platform data for EXYNOS4 FIMD and LTE480WV platform-lcd JinGoo Han
@ 2011-06-21 8:13 ` Tushar Behera
0 siblings, 0 replies; 4+ messages in thread
From: Tushar Behera @ 2011-06-21 8:13 UTC (permalink / raw)
To: jg1.han
Cc: Kukjin Kim, Paul Mundt, linux-samsung-soc@vger.kernel.org,
Jong-Hun Han, ANAND KUMAR N, THOMAS P ABRAHAM, Sylwester Nawrocki,
Marek Szyprowski, Kyungmin Park, In-Ki Dae, ARM Linux, Ben Dooks
Hi Jingoo Han,
On Tuesday 21 June 2011 09:38 AM, JinGoo Han wrote:
> Hi, Tushar Behera.
>
>> -----Original Message-----
>> From: linux-samsung-soc-owner@vger.kernel.org [mailto:linux-samsung-soc-
>> owner@vger.kernel.org] On Behalf Of Tushar Behera
>> Sent: Tuesday, June 21, 2011 12:47 PM
>> To: Jingoo Han
>> Cc: Kukjin Kim; Paul Mundt; linux-samsung-soc@vger.kernel.org; Jonghun Han;
>> Anand Kumar N; Thomas Abraham; Sylwester Nawrocki; Marek Szyprowski;
>> Kyungmin Park; Inki Dae; ARM Linux; Ben Dooks
>> Subject: Re: [PATCH v2 5/5] ARM: EXYNOS4: Add platform data for EXYNOS4
>> FIMD and LTE480WV platform-lcd
>>
>> Hi,
>>
>> On Friday 17 June 2011 06:32 PM, Jingoo Han wrote:
>>> From: Jonghun Han<jonghun.han@samsung.com>
>>>
>>> This patch adds support EXYNOS4 FIMD0 and LTE480WV LCD pannel.
>>>
>>> Signed-off-by: Jonghun Han<jonghun.han@samsung.com>
>>> Signed-off-by: Jingoo Han<jg1.han@samsung.com>
>>> ---
>>> arch/arm/mach-exynos4/mach-smdkc210.c | 74
>> +++++++++++++++++++++++++++++++++
>>> arch/arm/mach-exynos4/mach-smdkv310.c | 74
>> +++++++++++++++++++++++++++++++++
>>> 2 files changed, 148 insertions(+), 0 deletions(-)
>>>
>>
>> There are variants of SMDKV310 boards that don't use LTE480WV LCD panel.
>> Won't it be better to provide an option of selecting the LCD panel
>> through config file and adding the panel code accordingly?
>>
>> Also, the panel code can be consolidated at a single location and used
>> in appropriate machine files.
>>
> Do you have a patch about that?
As of now, I don't have any patch for this.
> If you make a patch about your suggestion, please submit it.
I don't have a SMDKV310 with LTE480WV LCD panel, so I might still not be
able to test that patch.
--
Tushar Behera
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 5/5] ARM: EXYNOS4: Add platform data for EXYNOS4 FIMD and LTE480WV platform-lcd
@ 2011-06-17 13:02 Jingoo Han
2011-06-21 3:46 ` Tushar Behera
0 siblings, 1 reply; 4+ messages in thread
From: Jingoo Han @ 2011-06-17 13:02 UTC (permalink / raw)
To: Kukjin Kim, Paul Mundt, linux-samsung-soc
Cc: Anand Kumar N, Thomas Abraham, Sylwester Nawrocki,
Marek Szyprowski, Kyungmin Park, Inki Dae, ARM Linux, Ben Dooks,
Jonghun Han, Jingoo Han
From: Jonghun Han <jonghun.han@samsung.com>
This patch adds support EXYNOS4 FIMD0 and LTE480WV LCD pannel.
Signed-off-by: Jonghun Han <jonghun.han@samsung.com>
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
arch/arm/mach-exynos4/mach-smdkc210.c | 74 +++++++++++++++++++++++++++++++++
arch/arm/mach-exynos4/mach-smdkv310.c | 74 +++++++++++++++++++++++++++++++++
2 files changed, 148 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-exynos4/mach-smdkc210.c b/arch/arm/mach-exynos4/mach-smdkc210.c
index e645f7a..f3e4c65 100644
--- a/arch/arm/mach-exynos4/mach-smdkc210.c
+++ b/arch/arm/mach-exynos4/mach-smdkc210.c
@@ -9,7 +9,9 @@
*/
#include <linux/serial_core.h>
+#include <linux/delay.h>
#include <linux/gpio.h>
+#include <linux/lcd.h>
#include <linux/mmc/host.h>
#include <linux/platform_device.h>
#include <linux/smsc911x.h>
@@ -19,16 +21,20 @@
#include <asm/mach/arch.h>
#include <asm/mach-types.h>
+#include <video/platform_lcd.h>
+
#include <plat/regs-serial.h>
#include <plat/regs-srom.h>
#include <plat/exynos4.h>
#include <plat/cpu.h>
#include <plat/devs.h>
+#include <plat/fb.h>
#include <plat/sdhci.h>
#include <plat/iic.h>
#include <plat/pd.h>
#include <mach/map.h>
+#include <mach/regs-fb.h>
/* Following are default values for UCON, ULCON and UFCON UART registers */
#define SMDKC210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
@@ -111,6 +117,70 @@ static struct s3c_sdhci_platdata smdkc210_hsmmc3_pdata __initdata = {
.clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
};
+static void lcd_lte480wv_set_power(struct plat_lcd_data *pd,
+ unsigned int power)
+{
+ if (power) {
+#if !defined(CONFIG_BACKLIGHT_PWM)
+ gpio_request(EXYNOS4_GPD0(1), "GPD0");
+ gpio_direction_output(EXYNOS4_GPD0(1), 1);
+ gpio_free(EXYNOS4_GPD0(1));
+#endif
+ /* fire nRESET on power up */
+ gpio_request(EXYNOS4_GPX0(6), "GPX0");
+
+ gpio_direction_output(EXYNOS4_GPX0(6), 1);
+ mdelay(100);
+
+ gpio_set_value(EXYNOS4_GPX0(6), 0);
+ mdelay(10);
+
+ gpio_set_value(EXYNOS4_GPX0(6), 1);
+ mdelay(10);
+
+ gpio_free(EXYNOS4_GPX0(6));
+ } else {
+#if !defined(CONFIG_BACKLIGHT_PWM)
+ gpio_request(EXYNOS4_GPD0(1), "GPD0");
+ gpio_direction_output(EXYNOS4_GPD0(1), 0);
+ gpio_free(EXYNOS4_GPD0(1));
+#endif
+ }
+}
+
+static struct plat_lcd_data smdkc210_lcd_lte480wv_data = {
+ .set_power = lcd_lte480wv_set_power,
+};
+
+static struct platform_device smdkc210_lcd_lte480wv = {
+ .name = "platform-lcd",
+ .dev.parent = &s5p_device_fimd0.dev,
+ .dev.platform_data = &smdkc210_lcd_lte480wv_data,
+};
+
+static struct s3c_fb_pd_win smdkc210_fb_win0 = {
+ .win_mode = {
+ .left_margin = 13,
+ .right_margin = 8,
+ .upper_margin = 7,
+ .lower_margin = 5,
+ .hsync_len = 3,
+ .vsync_len = 1,
+ .xres = 800,
+ .yres = 480,
+ },
+ .max_bpp = 32,
+ .default_bpp = 24,
+};
+
+static struct s3c_fb_platdata smdkc210_lcd0_pdata __initdata = {
+ .win[0] = &smdkc210_fb_win0,
+ .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
+ .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
+ .setup_gpio = exynos4_fimd0_gpio_setup_24bpp,
+ .enable_clk = exynos4_fimd0_enable_clk,
+};
+
static struct resource smdkc210_smsc911x_resources[] = {
[0] = {
.start = EXYNOS4_PA_SROM_BANK(1),
@@ -165,6 +235,8 @@ static struct platform_device *smdkc210_devices[] __initdata = {
&exynos4_device_pd[PD_GPS],
&exynos4_device_sysmmu,
&samsung_asoc_dma,
+ &s5p_device_fimd0,
+ &smdkc210_lcd_lte480wv,
&smdkc210_smsc911x,
};
@@ -210,6 +282,8 @@ static void __init smdkc210_machine_init(void)
s3c_sdhci2_set_platdata(&smdkc210_hsmmc2_pdata);
s3c_sdhci3_set_platdata(&smdkc210_hsmmc3_pdata);
+ s5p_fimd0_set_platdata(&smdkc210_lcd0_pdata);
+
platform_add_devices(smdkc210_devices, ARRAY_SIZE(smdkc210_devices));
}
diff --git a/arch/arm/mach-exynos4/mach-smdkv310.c b/arch/arm/mach-exynos4/mach-smdkv310.c
index 1526764..5977fce 100644
--- a/arch/arm/mach-exynos4/mach-smdkv310.c
+++ b/arch/arm/mach-exynos4/mach-smdkv310.c
@@ -9,7 +9,9 @@
*/
#include <linux/serial_core.h>
+#include <linux/delay.h>
#include <linux/gpio.h>
+#include <linux/lcd.h>
#include <linux/mmc/host.h>
#include <linux/platform_device.h>
#include <linux/smsc911x.h>
@@ -20,17 +22,21 @@
#include <asm/mach/arch.h>
#include <asm/mach-types.h>
+#include <video/platform_lcd.h>
+
#include <plat/regs-serial.h>
#include <plat/regs-srom.h>
#include <plat/exynos4.h>
#include <plat/cpu.h>
#include <plat/devs.h>
+#include <plat/fb.h>
#include <plat/keypad.h>
#include <plat/sdhci.h>
#include <plat/iic.h>
#include <plat/pd.h>
#include <mach/map.h>
+#include <mach/regs-fb.h>
/* Following are default values for UCON, ULCON and UFCON UART registers */
#define SMDKV310_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
@@ -113,6 +119,70 @@ static struct s3c_sdhci_platdata smdkv310_hsmmc3_pdata __initdata = {
.clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
};
+static void lcd_lte480wv_set_power(struct plat_lcd_data *pd,
+ unsigned int power)
+{
+ if (power) {
+#if !defined(CONFIG_BACKLIGHT_PWM)
+ gpio_request(EXYNOS4_GPD0(1), "GPD0");
+ gpio_direction_output(EXYNOS4_GPD0(1), 1);
+ gpio_free(EXYNOS4_GPD0(1));
+#endif
+ /* fire nRESET on power up */
+ gpio_request(EXYNOS4_GPX0(6), "GPX0");
+
+ gpio_direction_output(EXYNOS4_GPX0(6), 1);
+ mdelay(100);
+
+ gpio_set_value(EXYNOS4_GPX0(6), 0);
+ mdelay(10);
+
+ gpio_set_value(EXYNOS4_GPX0(6), 1);
+ mdelay(10);
+
+ gpio_free(EXYNOS4_GPX0(6));
+ } else {
+#if !defined(CONFIG_BACKLIGHT_PWM)
+ gpio_request(EXYNOS4_GPD0(1), "GPD0");
+ gpio_direction_output(EXYNOS4_GPD0(1), 0);
+ gpio_free(EXYNOS4_GPD0(1));
+#endif
+ }
+}
+
+static struct plat_lcd_data smdkv310_lcd_lte480wv_data = {
+ .set_power = lcd_lte480wv_set_power,
+};
+
+static struct platform_device smdkv310_lcd_lte480wv = {
+ .name = "platform-lcd",
+ .dev.parent = &s5p_device_fimd0.dev,
+ .dev.platform_data = &smdkv310_lcd_lte480wv_data,
+};
+
+static struct s3c_fb_pd_win smdkv310_fb_win0 = {
+ .win_mode = {
+ .left_margin = 13,
+ .right_margin = 8,
+ .upper_margin = 7,
+ .lower_margin = 5,
+ .hsync_len = 3,
+ .vsync_len = 1,
+ .xres = 800,
+ .yres = 480,
+ },
+ .max_bpp = 32,
+ .default_bpp = 24,
+};
+
+static struct s3c_fb_platdata smdkv310_lcd0_pdata __initdata = {
+ .win[0] = &smdkv310_fb_win0,
+ .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
+ .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
+ .setup_gpio = exynos4_fimd0_gpio_setup_24bpp,
+ .enable_clk = exynos4_fimd0_enable_clk,
+};
+
static struct resource smdkv310_smsc911x_resources[] = {
[0] = {
.start = EXYNOS4_PA_SROM_BANK(1),
@@ -187,6 +257,8 @@ static struct platform_device *smdkv310_devices[] __initdata = {
&exynos4_device_pd[PD_GPS],
&exynos4_device_sysmmu,
&samsung_asoc_dma,
+ &s5p_device_fimd0,
+ &smdkv310_lcd_lte480wv,
&smdkv310_smsc911x,
};
@@ -232,6 +304,8 @@ static void __init smdkv310_machine_init(void)
s3c_sdhci2_set_platdata(&smdkv310_hsmmc2_pdata);
s3c_sdhci3_set_platdata(&smdkv310_hsmmc3_pdata);
+ s5p_fimd0_set_platdata(&smdkv310_lcd0_pdata);
+
samsung_keypad_set_platdata(&smdkv310_keypad_data);
platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices));
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v2 5/5] ARM: EXYNOS4: Add platform data for EXYNOS4 FIMD and LTE480WV platform-lcd
2011-06-17 13:02 Jingoo Han
@ 2011-06-21 3:46 ` Tushar Behera
0 siblings, 0 replies; 4+ messages in thread
From: Tushar Behera @ 2011-06-21 3:46 UTC (permalink / raw)
To: Jingoo Han
Cc: Kukjin Kim, Paul Mundt, linux-samsung-soc, Jonghun Han,
Anand Kumar N, Thomas Abraham, Sylwester Nawrocki,
Marek Szyprowski, Kyungmin Park, Inki Dae, ARM Linux, Ben Dooks
Hi,
On Friday 17 June 2011 06:32 PM, Jingoo Han wrote:
> From: Jonghun Han<jonghun.han@samsung.com>
>
> This patch adds support EXYNOS4 FIMD0 and LTE480WV LCD pannel.
>
> Signed-off-by: Jonghun Han<jonghun.han@samsung.com>
> Signed-off-by: Jingoo Han<jg1.han@samsung.com>
> ---
> arch/arm/mach-exynos4/mach-smdkc210.c | 74 +++++++++++++++++++++++++++++++++
> arch/arm/mach-exynos4/mach-smdkv310.c | 74 +++++++++++++++++++++++++++++++++
> 2 files changed, 148 insertions(+), 0 deletions(-)
>
There are variants of SMDKV310 boards that don't use LTE480WV LCD panel.
Won't it be better to provide an option of selecting the LCD panel
through config file and adding the panel code accordingly?
Also, the panel code can be consolidated at a single location and used
in appropriate machine files.
> diff --git a/arch/arm/mach-exynos4/mach-smdkc210.c b/arch/arm/mach-exynos4/mach-smdkc210.c
> index e645f7a..f3e4c65 100644
> --- a/arch/arm/mach-exynos4/mach-smdkc210.c
> +++ b/arch/arm/mach-exynos4/mach-smdkc210.c
> @@ -9,7 +9,9 @@
> */
>
> #include<linux/serial_core.h>
> +#include<linux/delay.h>
> #include<linux/gpio.h>
> +#include<linux/lcd.h>
> #include<linux/mmc/host.h>
> #include<linux/platform_device.h>
> #include<linux/smsc911x.h>
> @@ -19,16 +21,20 @@
> #include<asm/mach/arch.h>
> #include<asm/mach-types.h>
>
> +#include<video/platform_lcd.h>
> +
> #include<plat/regs-serial.h>
> #include<plat/regs-srom.h>
> #include<plat/exynos4.h>
> #include<plat/cpu.h>
> #include<plat/devs.h>
> +#include<plat/fb.h>
> #include<plat/sdhci.h>
> #include<plat/iic.h>
> #include<plat/pd.h>
>
> #include<mach/map.h>
> +#include<mach/regs-fb.h>
>
> /* Following are default values for UCON, ULCON and UFCON UART registers */
> #define SMDKC210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
> @@ -111,6 +117,70 @@ static struct s3c_sdhci_platdata smdkc210_hsmmc3_pdata __initdata = {
> .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
> };
>
> +static void lcd_lte480wv_set_power(struct plat_lcd_data *pd,
> + unsigned int power)
> +{
> + if (power) {
> +#if !defined(CONFIG_BACKLIGHT_PWM)
> + gpio_request(EXYNOS4_GPD0(1), "GPD0");
> + gpio_direction_output(EXYNOS4_GPD0(1), 1);
> + gpio_free(EXYNOS4_GPD0(1));
> +#endif
> + /* fire nRESET on power up */
> + gpio_request(EXYNOS4_GPX0(6), "GPX0");
> +
> + gpio_direction_output(EXYNOS4_GPX0(6), 1);
> + mdelay(100);
> +
> + gpio_set_value(EXYNOS4_GPX0(6), 0);
> + mdelay(10);
> +
> + gpio_set_value(EXYNOS4_GPX0(6), 1);
> + mdelay(10);
> +
> + gpio_free(EXYNOS4_GPX0(6));
> + } else {
> +#if !defined(CONFIG_BACKLIGHT_PWM)
> + gpio_request(EXYNOS4_GPD0(1), "GPD0");
> + gpio_direction_output(EXYNOS4_GPD0(1), 0);
> + gpio_free(EXYNOS4_GPD0(1));
> +#endif
> + }
> +}
> +
> +static struct plat_lcd_data smdkc210_lcd_lte480wv_data = {
> + .set_power = lcd_lte480wv_set_power,
> +};
> +
> +static struct platform_device smdkc210_lcd_lte480wv = {
> + .name = "platform-lcd",
> + .dev.parent =&s5p_device_fimd0.dev,
> + .dev.platform_data =&smdkc210_lcd_lte480wv_data,
> +};
> +
> +static struct s3c_fb_pd_win smdkc210_fb_win0 = {
> + .win_mode = {
> + .left_margin = 13,
> + .right_margin = 8,
> + .upper_margin = 7,
> + .lower_margin = 5,
> + .hsync_len = 3,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> + },
> + .max_bpp = 32,
> + .default_bpp = 24,
> +};
> +
> +static struct s3c_fb_platdata smdkc210_lcd0_pdata __initdata = {
> + .win[0] =&smdkc210_fb_win0,
> + .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> + .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> + .setup_gpio = exynos4_fimd0_gpio_setup_24bpp,
> + .enable_clk = exynos4_fimd0_enable_clk,
> +};
> +
> static struct resource smdkc210_smsc911x_resources[] = {
> [0] = {
> .start = EXYNOS4_PA_SROM_BANK(1),
> @@ -165,6 +235,8 @@ static struct platform_device *smdkc210_devices[] __initdata = {
> &exynos4_device_pd[PD_GPS],
> &exynos4_device_sysmmu,
> &samsung_asoc_dma,
> + &s5p_device_fimd0,
> + &smdkc210_lcd_lte480wv,
> &smdkc210_smsc911x,
> };
>
> @@ -210,6 +282,8 @@ static void __init smdkc210_machine_init(void)
> s3c_sdhci2_set_platdata(&smdkc210_hsmmc2_pdata);
> s3c_sdhci3_set_platdata(&smdkc210_hsmmc3_pdata);
>
> + s5p_fimd0_set_platdata(&smdkc210_lcd0_pdata);
> +
> platform_add_devices(smdkc210_devices, ARRAY_SIZE(smdkc210_devices));
> }
>
> diff --git a/arch/arm/mach-exynos4/mach-smdkv310.c b/arch/arm/mach-exynos4/mach-smdkv310.c
> index 1526764..5977fce 100644
> --- a/arch/arm/mach-exynos4/mach-smdkv310.c
> +++ b/arch/arm/mach-exynos4/mach-smdkv310.c
> @@ -9,7 +9,9 @@
> */
>
> #include<linux/serial_core.h>
> +#include<linux/delay.h>
> #include<linux/gpio.h>
> +#include<linux/lcd.h>
> #include<linux/mmc/host.h>
> #include<linux/platform_device.h>
> #include<linux/smsc911x.h>
> @@ -20,17 +22,21 @@
> #include<asm/mach/arch.h>
> #include<asm/mach-types.h>
>
> +#include<video/platform_lcd.h>
> +
> #include<plat/regs-serial.h>
> #include<plat/regs-srom.h>
> #include<plat/exynos4.h>
> #include<plat/cpu.h>
> #include<plat/devs.h>
> +#include<plat/fb.h>
> #include<plat/keypad.h>
> #include<plat/sdhci.h>
> #include<plat/iic.h>
> #include<plat/pd.h>
>
> #include<mach/map.h>
> +#include<mach/regs-fb.h>
>
> /* Following are default values for UCON, ULCON and UFCON UART registers */
> #define SMDKV310_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
> @@ -113,6 +119,70 @@ static struct s3c_sdhci_platdata smdkv310_hsmmc3_pdata __initdata = {
> .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
> };
>
> +static void lcd_lte480wv_set_power(struct plat_lcd_data *pd,
> + unsigned int power)
> +{
> + if (power) {
> +#if !defined(CONFIG_BACKLIGHT_PWM)
> + gpio_request(EXYNOS4_GPD0(1), "GPD0");
> + gpio_direction_output(EXYNOS4_GPD0(1), 1);
> + gpio_free(EXYNOS4_GPD0(1));
> +#endif
> + /* fire nRESET on power up */
> + gpio_request(EXYNOS4_GPX0(6), "GPX0");
> +
> + gpio_direction_output(EXYNOS4_GPX0(6), 1);
> + mdelay(100);
> +
> + gpio_set_value(EXYNOS4_GPX0(6), 0);
> + mdelay(10);
> +
> + gpio_set_value(EXYNOS4_GPX0(6), 1);
> + mdelay(10);
> +
> + gpio_free(EXYNOS4_GPX0(6));
> + } else {
> +#if !defined(CONFIG_BACKLIGHT_PWM)
> + gpio_request(EXYNOS4_GPD0(1), "GPD0");
> + gpio_direction_output(EXYNOS4_GPD0(1), 0);
> + gpio_free(EXYNOS4_GPD0(1));
> +#endif
> + }
> +}
> +
> +static struct plat_lcd_data smdkv310_lcd_lte480wv_data = {
> + .set_power = lcd_lte480wv_set_power,
> +};
> +
> +static struct platform_device smdkv310_lcd_lte480wv = {
> + .name = "platform-lcd",
> + .dev.parent =&s5p_device_fimd0.dev,
> + .dev.platform_data =&smdkv310_lcd_lte480wv_data,
> +};
> +
> +static struct s3c_fb_pd_win smdkv310_fb_win0 = {
> + .win_mode = {
> + .left_margin = 13,
> + .right_margin = 8,
> + .upper_margin = 7,
> + .lower_margin = 5,
> + .hsync_len = 3,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> + },
> + .max_bpp = 32,
> + .default_bpp = 24,
> +};
> +
> +static struct s3c_fb_platdata smdkv310_lcd0_pdata __initdata = {
> + .win[0] =&smdkv310_fb_win0,
> + .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> + .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> + .setup_gpio = exynos4_fimd0_gpio_setup_24bpp,
> + .enable_clk = exynos4_fimd0_enable_clk,
> +};
> +
> static struct resource smdkv310_smsc911x_resources[] = {
> [0] = {
> .start = EXYNOS4_PA_SROM_BANK(1),
> @@ -187,6 +257,8 @@ static struct platform_device *smdkv310_devices[] __initdata = {
> &exynos4_device_pd[PD_GPS],
> &exynos4_device_sysmmu,
> &samsung_asoc_dma,
> + &s5p_device_fimd0,
> + &smdkv310_lcd_lte480wv,
> &smdkv310_smsc911x,
> };
>
> @@ -232,6 +304,8 @@ static void __init smdkv310_machine_init(void)
> s3c_sdhci2_set_platdata(&smdkv310_hsmmc2_pdata);
> s3c_sdhci3_set_platdata(&smdkv310_hsmmc3_pdata);
>
> + s5p_fimd0_set_platdata(&smdkv310_lcd0_pdata);
> +
> samsung_keypad_set_platdata(&smdkv310_keypad_data);
>
> platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices));
--
Tushar Behera
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-06-21 8:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-21 4:08 Re: [PATCH v2 5/5] ARM: EXYNOS4: Add platform data for EXYNOS4 FIMD and LTE480WV platform-lcd JinGoo Han
2011-06-21 8:13 ` Tushar Behera
-- strict thread matches above, loose matches on Subject: below --
2011-06-17 13:02 Jingoo Han
2011-06-21 3:46 ` Tushar Behera
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.