From: Ben Dooks <ben-linux@fluff.org>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, laforge@gnumonks.org,
kyungmin.park@samsung.com, bhmin@samsung.com,
ben-linux@fluff.org
Subject: Re: [PATCH 11/18] SMDKC100: enable S3C FrameBuffer
Date: Fri, 13 Nov 2009 23:34:07 +0000 [thread overview]
Message-ID: <20091113233407.GR4808@trinity.fluff.org> (raw)
In-Reply-To: <1258014122-18185-12-git-send-email-m.szyprowski@samsung.com>
On Thu, Nov 12, 2009 at 09:21:55AM +0100, Marek Szyprowski wrote:
> From: Kyungmin Park <kyungmin.park@samsung.com>
>
> From: Kyungmin Park <kyungmin.park@samsung.com>
>
> Add required machine definitions for s3c-fb device.
> A 800x480 lcd device (simmilar to the one known from SMDK6410 boards) has
> been defined. The lcd controller is attached to GPIO lines and can be
> enabled/disabled with platform-lcd driver.
>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
I'll see if this will apply and compile without the previous FB patches
until they've been sorted out.
> ---
> arch/arm/mach-s5pc100/Kconfig | 2 +
> arch/arm/mach-s5pc100/mach-smdkc100.c | 67 +++++++++++++++++++++++++++++++++
> 2 files changed, 69 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-s5pc100/Kconfig b/arch/arm/mach-s5pc100/Kconfig
> index b1a4ba5..5e6b9a3 100644
> --- a/arch/arm/mach-s5pc100/Kconfig
> +++ b/arch/arm/mach-s5pc100/Kconfig
> @@ -17,6 +17,8 @@ config CPU_S5PC100
> config MACH_SMDKC100
> bool "SMDKC100"
> select CPU_S5PC100
> + select S3C_DEV_FB
> select S5PC1XX_SETUP_I2C1
> + select S5PC1XX_SETUP_FB_24BPP
> help
> Machine support for the Samsung SMDKC100
> diff --git a/arch/arm/mach-s5pc100/mach-smdkc100.c b/arch/arm/mach-s5pc100/mach-smdkc100.c
> index 05bb20a..098956d 100644
> --- a/arch/arm/mach-s5pc100/mach-smdkc100.c
> +++ b/arch/arm/mach-s5pc100/mach-smdkc100.c
> @@ -27,16 +27,21 @@
> #include <asm/mach/map.h>
>
> #include <mach/map.h>
> +#include <mach/regs-fb.h>
> +#include <video/platform_lcd.h>
>
> #include <asm/irq.h>
> #include <asm/mach-types.h>
>
> #include <plat/regs-serial.h>
> +#include <plat/gpio-cfg.h>
> +#include <plat/regs-gpio.h>
>
> #include <plat/clock.h>
> #include <plat/devs.h>
> #include <plat/cpu.h>
> #include <plat/s5pc100.h>
> +#include <plat/fb.h>
>
> #define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK)
> #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB)
> @@ -73,9 +78,65 @@ static struct s3c2410_uartcfg smdkc100_uartcfgs[] __initdata = {
> },
> };
>
> +/* LCD power controller */
> +static void smdkc100_lcd_power_set(struct plat_lcd_data *pd,
> + unsigned int power)
> +{
> + /* backlight */
> + gpio_direction_output(S5PC100_GPD(0), power);
> +
> + if (power) {
> + /* module reset */
> + gpio_direction_output(S5PC100_GPH0(6), 1);
> + mdelay(100);
> + gpio_direction_output(S5PC100_GPH0(6), 0);
> + mdelay(10);
> + gpio_direction_output(S5PC100_GPH0(6), 1);
> + mdelay(10);
> + }
> +}
> +
> +static struct plat_lcd_data smdkc100_lcd_power_data = {
> + .set_power = smdkc100_lcd_power_set,
> +};
> +
> +static struct platform_device smdkc100_lcd_powerdev = {
> + .name = "platform-lcd",
> + .dev.parent = &s3c_device_fb.dev,
> + .dev.platform_data = &smdkc100_lcd_power_data,
> +};
> +
> +/* Frame Buffer */
> +static struct s3c_fb_pd_win smdkc100_fb_win0 = {
> + /* this is to ensure we use win0 */
> + .win_mode = {
> + .refresh = 70,
> + .pixclock = (8+13+3+800)*(7+5+1+480),
> + .left_margin = 8,
> + .right_margin = 13,
> + .upper_margin = 7,
> + .lower_margin = 5,
> + .hsync_len = 3,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> + },
> + .max_bpp = 32,
> + .default_bpp = 16,
> +};
> +
> +static struct s3c_fb_platdata smdkc100_lcd_pdata __initdata = {
> + .win[0] = &smdkc100_fb_win0,
> + .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> + .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> + .setup_gpio = s5pc100_fb_gpio_setup_24bpp,
> +};
> +
> static struct map_desc smdkc100_iodesc[] = {};
>
> static struct platform_device *smdkc100_devices[] __initdata = {
> + &s3c_device_fb,
> + &smdkc100_lcd_powerdev,
> };
>
> static void __init smdkc100_map_io(void)
> @@ -87,6 +148,12 @@ static void __init smdkc100_map_io(void)
>
> static void __init smdkc100_machine_init(void)
> {
> + s3c_fb_set_platdata(&smdkc100_lcd_pdata);
> +
> + /* LCD init */
> + gpio_request(S5PC100_GPD(0), "GPD");
> + gpio_request(S5PC100_GPH0(6), "GPH0");
> + smdkc100_lcd_power_set(&smdkc100_lcd_power_data, 0);
> platform_add_devices(smdkc100_devices, ARRAY_SIZE(smdkc100_devices));
> }
>
> --
> 1.6.5
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
--
Ben
Q: What's a light-year?
A: One-third less calories than a regular year.
WARNING: multiple messages have this Message-ID (diff)
From: ben-linux@fluff.org (Ben Dooks)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 11/18] SMDKC100: enable S3C FrameBuffer
Date: Fri, 13 Nov 2009 23:34:07 +0000 [thread overview]
Message-ID: <20091113233407.GR4808@trinity.fluff.org> (raw)
In-Reply-To: <1258014122-18185-12-git-send-email-m.szyprowski@samsung.com>
On Thu, Nov 12, 2009 at 09:21:55AM +0100, Marek Szyprowski wrote:
> From: Kyungmin Park <kyungmin.park@samsung.com>
>
> From: Kyungmin Park <kyungmin.park@samsung.com>
>
> Add required machine definitions for s3c-fb device.
> A 800x480 lcd device (simmilar to the one known from SMDK6410 boards) has
> been defined. The lcd controller is attached to GPIO lines and can be
> enabled/disabled with platform-lcd driver.
>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
I'll see if this will apply and compile without the previous FB patches
until they've been sorted out.
> ---
> arch/arm/mach-s5pc100/Kconfig | 2 +
> arch/arm/mach-s5pc100/mach-smdkc100.c | 67 +++++++++++++++++++++++++++++++++
> 2 files changed, 69 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-s5pc100/Kconfig b/arch/arm/mach-s5pc100/Kconfig
> index b1a4ba5..5e6b9a3 100644
> --- a/arch/arm/mach-s5pc100/Kconfig
> +++ b/arch/arm/mach-s5pc100/Kconfig
> @@ -17,6 +17,8 @@ config CPU_S5PC100
> config MACH_SMDKC100
> bool "SMDKC100"
> select CPU_S5PC100
> + select S3C_DEV_FB
> select S5PC1XX_SETUP_I2C1
> + select S5PC1XX_SETUP_FB_24BPP
> help
> Machine support for the Samsung SMDKC100
> diff --git a/arch/arm/mach-s5pc100/mach-smdkc100.c b/arch/arm/mach-s5pc100/mach-smdkc100.c
> index 05bb20a..098956d 100644
> --- a/arch/arm/mach-s5pc100/mach-smdkc100.c
> +++ b/arch/arm/mach-s5pc100/mach-smdkc100.c
> @@ -27,16 +27,21 @@
> #include <asm/mach/map.h>
>
> #include <mach/map.h>
> +#include <mach/regs-fb.h>
> +#include <video/platform_lcd.h>
>
> #include <asm/irq.h>
> #include <asm/mach-types.h>
>
> #include <plat/regs-serial.h>
> +#include <plat/gpio-cfg.h>
> +#include <plat/regs-gpio.h>
>
> #include <plat/clock.h>
> #include <plat/devs.h>
> #include <plat/cpu.h>
> #include <plat/s5pc100.h>
> +#include <plat/fb.h>
>
> #define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK)
> #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB)
> @@ -73,9 +78,65 @@ static struct s3c2410_uartcfg smdkc100_uartcfgs[] __initdata = {
> },
> };
>
> +/* LCD power controller */
> +static void smdkc100_lcd_power_set(struct plat_lcd_data *pd,
> + unsigned int power)
> +{
> + /* backlight */
> + gpio_direction_output(S5PC100_GPD(0), power);
> +
> + if (power) {
> + /* module reset */
> + gpio_direction_output(S5PC100_GPH0(6), 1);
> + mdelay(100);
> + gpio_direction_output(S5PC100_GPH0(6), 0);
> + mdelay(10);
> + gpio_direction_output(S5PC100_GPH0(6), 1);
> + mdelay(10);
> + }
> +}
> +
> +static struct plat_lcd_data smdkc100_lcd_power_data = {
> + .set_power = smdkc100_lcd_power_set,
> +};
> +
> +static struct platform_device smdkc100_lcd_powerdev = {
> + .name = "platform-lcd",
> + .dev.parent = &s3c_device_fb.dev,
> + .dev.platform_data = &smdkc100_lcd_power_data,
> +};
> +
> +/* Frame Buffer */
> +static struct s3c_fb_pd_win smdkc100_fb_win0 = {
> + /* this is to ensure we use win0 */
> + .win_mode = {
> + .refresh = 70,
> + .pixclock = (8+13+3+800)*(7+5+1+480),
> + .left_margin = 8,
> + .right_margin = 13,
> + .upper_margin = 7,
> + .lower_margin = 5,
> + .hsync_len = 3,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> + },
> + .max_bpp = 32,
> + .default_bpp = 16,
> +};
> +
> +static struct s3c_fb_platdata smdkc100_lcd_pdata __initdata = {
> + .win[0] = &smdkc100_fb_win0,
> + .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> + .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> + .setup_gpio = s5pc100_fb_gpio_setup_24bpp,
> +};
> +
> static struct map_desc smdkc100_iodesc[] = {};
>
> static struct platform_device *smdkc100_devices[] __initdata = {
> + &s3c_device_fb,
> + &smdkc100_lcd_powerdev,
> };
>
> static void __init smdkc100_map_io(void)
> @@ -87,6 +148,12 @@ static void __init smdkc100_map_io(void)
>
> static void __init smdkc100_machine_init(void)
> {
> + s3c_fb_set_platdata(&smdkc100_lcd_pdata);
> +
> + /* LCD init */
> + gpio_request(S5PC100_GPD(0), "GPD");
> + gpio_request(S5PC100_GPH0(6), "GPH0");
> + smdkc100_lcd_power_set(&smdkc100_lcd_power_data, 0);
> platform_add_devices(smdkc100_devices, ARRAY_SIZE(smdkc100_devices));
> }
>
> --
> 1.6.5
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
--
Ben
Q: What's a light-year?
A: One-third less calories than a regular year.
next prev parent reply other threads:[~2009-11-13 23:34 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-12 8:21 [PATCH] Update Samsung S5PC100 SoC support Marek Szyprowski
2009-11-12 8:21 ` Marek Szyprowski
2009-11-12 8:21 ` [PATCH 01/18] ARM: MM: use 64bytes of L1 cache on plat S5PC1xx Marek Szyprowski
2009-11-12 8:21 ` Marek Szyprowski
2009-11-12 8:21 ` [PATCH 02/18] ARM: S5PC1XX: registers rename Marek Szyprowski
2009-11-12 8:21 ` Marek Szyprowski
2009-11-12 8:21 ` [PATCH 03/18] ARM: S5PC1XX: clock " Marek Szyprowski
2009-11-12 8:21 ` Marek Szyprowski
2009-11-12 8:21 ` [PATCH 04/18] ARM: S5PC1XX: clocks reimplementation Marek Szyprowski
2009-11-12 8:21 ` Marek Szyprowski
2009-11-12 8:21 ` [PATCH 05/18] ARM: S5PC1XX: add GPIO L banks to register definition Marek Szyprowski
2009-11-12 8:21 ` Marek Szyprowski
2009-11-12 8:21 ` [PATCH 06/18] ARM: S5PC1XX: GPIO registers rename Marek Szyprowski
2009-11-12 8:21 ` Marek Szyprowski
2009-11-12 8:21 ` [PATCH 07/18] ARM: S5PC1xx: add gpiolib and external/gpio interrupt support Marek Szyprowski
2009-11-12 8:21 ` Marek Szyprowski
2009-11-12 8:21 ` [PATCH 08/18] ARM: S5PC1XX: add cpu idle and system reset support Marek Szyprowski
2009-11-12 8:21 ` Marek Szyprowski
2009-11-12 8:21 ` [PATCH 09/18] ARM: S3C: Prepare s3c64xx-specific s3c-fb register definition for reuse Marek Szyprowski
2009-11-12 8:21 ` Marek Szyprowski
2009-11-12 8:21 ` [PATCH 10/18] ARM: S5PC1xx: add platform helpers for s3c-fb device Marek Szyprowski
2009-11-12 8:21 ` Marek Szyprowski
2009-11-12 8:21 ` [PATCH 11/18] SMDKC100: enable S3C FrameBuffer Marek Szyprowski
2009-11-12 8:21 ` Marek Szyprowski
2009-11-12 8:21 ` [PATCH 12/18] drivers: fb: enable S3C FrameBuffer on S5PC1XX platform Marek Szyprowski
2009-11-12 8:21 ` Marek Szyprowski
2009-11-12 8:21 ` [PATCH 13/18] ARM: S5PC1xx: add platform helpers for i2c adapter devices Marek Szyprowski
2009-11-12 8:21 ` Marek Szyprowski
2009-11-12 8:21 ` [PATCH 14/18] SMDKC100: add I2C0 and I2C1 buses support Marek Szyprowski
2009-11-12 8:21 ` Marek Szyprowski
2009-11-12 8:21 ` [PATCH 15/18] drivers: i2c: s3c2410-i2c also on S5PC1XX platform Marek Szyprowski
2009-11-12 8:21 ` Marek Szyprowski
2009-11-12 8:22 ` [PATCH 16/18] ARM: S5PC1xx: add platform helpers for SDHCI host controllers Marek Szyprowski
2009-11-12 8:22 ` Marek Szyprowski
2009-11-12 8:22 ` [PATCH 17/18] SMDKC100: add SDHCI controllers 0, 1 and 2 support Marek Szyprowski
2009-11-12 8:22 ` Marek Szyprowski
2009-11-12 8:22 ` [PATCH 18/18] drivers: MMC: enable SDHCI-S3C on S5PC1XX platform Marek Szyprowski
2009-11-12 8:22 ` Marek Szyprowski
2009-11-13 23:38 ` Ben Dooks
2009-11-13 23:38 ` Ben Dooks
2009-11-13 23:37 ` [PATCH 16/18] ARM: S5PC1xx: add platform helpers for SDHCI host controllers Ben Dooks
2009-11-13 23:37 ` Ben Dooks
2009-11-13 23:35 ` [PATCH 15/18] drivers: i2c: s3c2410-i2c also on S5PC1XX platform Ben Dooks
2009-11-13 23:35 ` Ben Dooks
2009-11-13 23:34 ` [PATCH 12/18] drivers: fb: enable S3C FrameBuffer " Ben Dooks
2009-11-13 23:34 ` Ben Dooks
2009-11-13 23:34 ` Ben Dooks [this message]
2009-11-13 23:34 ` [PATCH 11/18] SMDKC100: enable S3C FrameBuffer Ben Dooks
2009-11-13 23:32 ` [PATCH 09/18] ARM: S3C: Prepare s3c64xx-specific s3c-fb register definition for reuse Ben Dooks
2009-11-13 23:32 ` Ben Dooks
2009-11-16 8:14 ` Marek Szyprowski
2009-11-16 8:14 ` Marek Szyprowski
2009-11-13 23:29 ` [PATCH 07/18] ARM: S5PC1xx: add gpiolib and external/gpio interrupt support Ben Dooks
2009-11-13 23:29 ` Ben Dooks
2009-11-16 8:14 ` Marek Szyprowski
2009-11-16 8:14 ` Marek Szyprowski
2009-11-13 23:19 ` [PATCH 01/18] ARM: MM: use 64bytes of L1 cache on plat S5PC1xx Ben Dooks
2009-11-13 23:19 ` Ben Dooks
2009-11-19 9:39 ` Russell King - ARM Linux
2009-11-19 9:39 ` Russell King - ARM Linux
2009-11-19 10:35 ` Marek Szyprowski
2009-11-19 10:35 ` Marek Szyprowski
2009-11-13 23:42 ` [PATCH] Update Samsung S5PC100 SoC support Ben Dooks
2009-11-13 23:42 ` Ben Dooks
2009-11-13 23:53 ` Ben Dooks
2009-11-13 23:53 ` Ben Dooks
2009-11-16 11:10 ` Marek Szyprowski
2009-11-16 11:10 ` Marek Szyprowski
2009-11-14 8:21 ` Russell King - ARM Linux
2009-11-14 8:21 ` Russell King - ARM Linux
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091113233407.GR4808@trinity.fluff.org \
--to=ben-linux@fluff.org \
--cc=bhmin@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=laforge@gnumonks.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.