Skip to contentSkip to conversation

ARM: S3C64XX: real6410 and mini6410 patches for next

PATCH Superseded Darius Augulis 2 participants 24 messages Sep 29, 2010 – Oct 19, 2010

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover ARM: S3C64XX: real6410 and mini6410 patches for next

These patches add more features for real6410
and support for new board mini6410 from FriendlyARM. All new devices are tested on both boards. Frame buffer is tested with 4.3" and 7.0" LCD displays on mini6410 and with 7.0" LCD display only on real6410.

---

Darius Augulis (9):
ARM: S3C64XX: add frame buffer support for mach-real6410
ARM: S3C64XX: add nand support for mach-real6410
ARM: S3C64XX: add touchscreen support for mach-real6410
ARM: S3C64XX: add USB host support for mach-real6410
ARM: S3C64XX: add support for mach-mini6410
ARM: S3C64XX: add nand support for mach-mini6410
ARM: S3C64XX: add frame buffer support for mach-mini6410
ARM: S3C64XX: add backlight control for mach-mini6410
ARM: S3C64XX: add touchscreen support for mach-mini6410

 arch/arm/mach-s3c64xx/Kconfig         |   21 ++
 arch/arm/mach-s3c64xx/Makefile        |    1 
 arch/arm/mach-s3c64xx/mach-mini6410.c |  360 +++++++++++++++++++++++++++++++++
 arch/arm/mach-s3c64xx/mach-real6410.c |  198 ++++++++++++++++++
 4 files changed, 575 insertions(+), 5 deletions(-)
 create mode 100644 arch/arm/mach-s3c64xx/mach-mini6410.c
#1 lore raw

PATCH 1/9 ARM: S3C64XX: add frame buffer support for mach-real6410

Add support for frame buffer device for mach-real6410. Patch also adds support for feature string parsing for real6410. The feature string is kernel command line passed and currently lets select only LCD configuration. At the moment there is support for two LCD configurations - 4.3" and 7.0". Feature parser is mach-mini2440 based.

---
 arch/arm/mach-s3c64xx/Kconfig         |    2 
 arch/arm/mach-s3c64xx/mach-real6410.c |  146 ++++++++++++++++++++++++++++++++-
 2 files changed, 143 insertions(+), 5 deletions(-)
arch/arm/mach-s3c64xx/Kconfig +2 -0
index 1e4d78a..3bbd418 100644
@@ -104,6 +104,8 @@ config MACH_REAL6410
 	select S3C_DEV_HSMMC
 	select S3C_DEV_HSMMC1
 	select S3C64XX_SETUP_SDHCI
+	select S3C_DEV_FB
+	select S3C64XX_SETUP_FB_24BPP
 	help
 	  Machine support for the CoreWind REAL6410
 
arch/arm/mach-s3c64xx/mach-real6410.c +141 -5

193 lines not on this page · raw message

#2 lore raw

RE: [PATCH 1/9] ARM: S3C64XX: add frame buffer support for mach-real6410

Quoted 35 lines · Darius Augulis

Add support for frame buffer device for mach-real6410. Patch also adds support for feature string parsing for real6410. The feature string is kernel command line passed and currently lets select only LCD configuration. At the moment there is support for two LCD configurations - 4.3" and 7.0". Feature parser is mach-mini2440 based.

---
 arch/arm/mach-s3c64xx/Kconfig         |    2
 arch/arm/mach-s3c64xx/mach-real6410.c |  146
++++++++++++++++++++++++++++++++-
 2 files changed, 143 insertions(+), 5 deletions(-)
arch/arm/mach-s3c64xx/Kconfig +2 -0
index 1e4d78a..3bbd418 100644
@@ -104,6 +104,8 @@ config MACH_REAL6410
 	select S3C_DEV_HSMMC
 	select S3C_DEV_HSMMC1
 	select S3C64XX_SETUP_SDHCI
+	select S3C_DEV_FB
+	select S3C64XX_SETUP_FB_24BPP
 	help
 	  Machine support for the CoreWind REAL6410
 
arch/arm/mach- renamed from arch/arm/mach-s3c64xx/mach-real6410.c +0 -0

s3c64xx/mach-real6410.c
index e130379..bed75d2 100644

arch/arm/mach-s3c64xx/mach-real6410.c line 15

Quoted 6 lines
arch/arm/mach-s3c64xx/mach-real6410.c +1 -2
@@ -12,24 +12,35 @@
  *
 */
 
-#include <linux/kernel.h>
-#include <linux/types.h>
+#include <linux/init.h>

You did add <linux/init.h> and

arch/arm/mach-s3c64xx/mach-real6410.c line 19

Quoted 6 lines
arch/arm/mach-s3c64xx/mach-real6410.c +3 -1
 #include <linux/interrupt.h>
+#include <linux/fb.h>
+#include <linux/gpio.h>
+#include <linux/kernel.h>
 #include <linux/list.h>
-#include <linux/init.h>

remove <linux/init.h>...why?

arch/arm/mach-s3c64xx/mach-real6410.c line 23

Quoted 4 lines
arch/arm/mach-s3c64xx/mach-real6410.c +1 -1
 #include <linux/dm9000.h>
-#include <linux/serial_core.h>
 #include <linux/platform_device.h>
+#include <linux/serial_core.h>

Same...you removed <linux/serial_core.h> and added it.

arch/arm/mach-s3c64xx/mach-real6410.c line 24

Quoted 1 line
arch/arm/mach-s3c64xx/mach-real6410.c +1 -0
+#include <linux/types.h>

Same...you removed it and added.

Quoted 79 lines
arch/arm/mach-s3c64xx/mach-real6410.c +51 -1
+
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
+
 #include <mach/map.h>
-#include <mach/s3c6410.h>
+#include <mach/regs-fb.h>
+#include <mach/regs-gpio.h>
+#include <mach/regs-modem.h>
 #include <mach/regs-srom.h>
+#include <mach/s3c6410.h>
+
 #include <plat/cpu.h>
 #include <plat/devs.h>
+#include <plat/fb.h>
 #include <plat/regs-serial.h>
 
+#include <video/platform_lcd.h>
+
 #define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK)
 #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB)
 #define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE)
@@ -99,22 +110,145 @@ static struct platform_device real6410_device_eth = {
 	},
 };
 
+static struct s3c_fb_pd_win real6410_fb_win[] = {
+	{
+		.win_mode	= {	/* 4.3" 480x272 */
+			.left_margin	= 3,
+			.right_margin	= 2,
+			.upper_margin	= 1,
+			.lower_margin	= 1,
+			.hsync_len	= 40,
+			.vsync_len	= 1,
+			.xres		= 480,
+			.yres		= 272,
+		},
+		.max_bpp	= 32,
+		.default_bpp	= 16,
+	}, {
+		.win_mode	= {	/* 7.0" 800x480 */
+			.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 real6410_lcd_pdata __initdata = {
+	.setup_gpio	= s3c64xx_fb_gpio_setup_24bpp,
+	.win[0]		= &real6410_fb_win[0],
+	.vidcon0	= VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
+	.vidcon1	= VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
+};
+
 static struct platform_device *real6410_devices[] __initdata = {
 	&real6410_device_eth,
 	&s3c_device_hsmmc0,
 	&s3c_device_hsmmc1,
+	&s3c_device_fb,
 };
 
 static void __init real6410_map_io(void)
 {
+	u32 tmp;
+
 	s3c64xx_init_io(NULL, 0);
 	s3c24xx_init_clocks(12000000);
 	s3c24xx_init_uarts(real6410_uartcfgs, ARRAY_SIZE(real6410_uartcfgs));
+

arch/arm/mach-s3c64xx/mach-real6410.c static struct platform_device real6410_device_eth = { · line 174

Quoted 10 lines
arch/arm/mach-s3c64xx/mach-real6410.c +10 -0
+	/* set the LCD type */
+	tmp = __raw_readl(S3C64XX_SPCON);
+	tmp &= ~S3C64XX_SPCON_LCD_SEL_MASK;
+	tmp |= S3C64XX_SPCON_LCD_SEL_RGB;
+	__raw_writel(tmp, S3C64XX_SPCON);
+
+	/* remove the LCD bypass */
+	tmp = __raw_readl(S3C64XX_MODEM_MIFPCON);
+	tmp &= ~MIFPCON_LCD_BYPASS;
+	__raw_writel(tmp, S3C64XX_MODEM_MIFPCON);

Hmm...I'm not sure whether above functionality is in map_io()

Quoted 20 lines
arch/arm/mach-s3c64xx/mach-real6410.c +20 -0
+}
+
+/*
+ * real6410_features string
+ *
+ * 0-9 LCD configuration
+ *
+ */
+static char real6410_features_str[12] __initdata = "0";
+
+static int __init real6410_features_setup(char *str)
+{
+	if (str)
+		strlcpy(real6410_features_str, str,
+			sizeof(real6410_features_str));
+	return 1;
+}
+
+__setup("real6410=", real6410_features_setup);
+

arch/arm/mach-s3c64xx/mach-real6410.c static struct platform_device real6410_device_eth = { · line 204

Quoted 10 lines
arch/arm/mach-s3c64xx/mach-real6410.c +10 -0
+#define FEATURE_SCREEN (1 << 0)
+
+struct real6410_features_t {
+	int done;
+	int lcd_index;
+};
+
+static void real6410_parse_features(
+		struct real6410_features_t *features,
+		const char *features_str)

+static void real6410_parse_features(struct real6410_features_t *features,
+ const char *features_str)

Quoted 51 lines
arch/arm/mach-s3c64xx/mach-real6410.c +42 -0
+{
+	const char *fp = features_str;
+
+	features->done = 0;
+	features->lcd_index = 0;
+
+	while (*fp) {
+		char f = *fp++;
+
+		switch (f) {
+		case '0'...'9':	/* tft screen */
+			if (features->done & FEATURE_SCREEN) {
+				printk(KERN_INFO "REAL6410: '%c' ignored, "
+					"screen type already set\n", f);
+			} else {
+				int li = f - '0';
+				if (li >= ARRAY_SIZE(real6410_fb_win))
+					printk(KERN_INFO "REAL6410: '%c' out "
+						"of range LCD mode\n", f);
+				else {
+					features->lcd_index = li;
+				}
+			}
+			features->done |= FEATURE_SCREEN;
+			break;
+		}
+	}
 }
 
 static void __init real6410_machine_init(void)
 {
 	u32 cs1;
+	struct real6410_features_t features = { 0 };
+
+	printk(KERN_INFO "REAL6410: Option string real6410=%s\n",
+			real6410_features_str);
+
+	/* Parse the feature string */
+	real6410_parse_features(&features, real6410_features_str);
+
+	real6410_lcd_pdata.win[0] = &real6410_fb_win[features.lcd_index];
+
+	printk(KERN_INFO "REAL6410: selected LCD display is %dx%d\n",
+		real6410_lcd_pdata.win[0]->win_mode.xres,
+		real6410_lcd_pdata.win[0]->win_mode.yres);
+
+	s3c_fb_set_platdata(&real6410_lcd_pdata);
 
 	/* configure nCS1 width to 16 bits */
 

arch/arm/mach-s3c64xx/mach-real6410.c static void __init real6410_machine_init(void) · line 274

Quoted 5 lines
arch/arm/mach-s3c64xx/mach-real6410.c +2 -0
@@ -136,6 +270,8 @@ static void __init real6410_machine_init(void)
 		(4 << S3C64XX_SROM_BCX__TCOS__SHIFT) |
 		(0 << S3C64XX_SROM_BCX__TACS__SHIFT), S3C64XX_SROM_BC1);
 
+	gpio_request(S3C64XX_GPF(15), "LCD power");
+

Just requesting it is enough?

arch/arm/mach-s3c64xx/mach-real6410.c static void __init real6410_machine_init(void) · line 277

Quoted 3 lines
arch/arm/mach-s3c64xx/mach-real6410.c +0 -0
 	platform_add_devices(real6410_devices, ARRAY_SIZE(real6410_devices));
 }
 

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#3 lore raw

Re: [PATCH 1/9] ARM: S3C64XX: add frame buffer support for mach-real6410

Quoted 45 lines · Kukjin Kim
Quoted 38 lines · Darius Augulis

Add support for frame buffer device for mach-real6410. Patch also adds support for feature string parsing for real6410. The feature string is kernel command line passed and currently lets select only LCD configuration. At the moment there is support for two LCD configurations - 4.3" and 7.0". Feature parser is mach-mini2440 based.

---
?arch/arm/mach-s3c64xx/Kconfig ? ? ? ? | ? ?2 ?arch/arm/mach-s3c64xx/mach-real6410.c | ?146
++++++++++++++++++++++++++++++++-
?2 files changed, 143 insertions(+), 5 deletions(-)

arch/arm/mach-s3c64xx/Kconfig +0 -0
index 1e4d78a..3bbd418 100644
@@ -104,6 +104,8 @@ config MACH_REAL6410

? ? ? select S3C_DEV_HSMMC
? ? ? select S3C_DEV_HSMMC1
? ? ? select S3C64XX_SETUP_SDHCI
+ ? ? select S3C_DEV_FB
+ ? ? select S3C64XX_SETUP_FB_24BPP
? ? ? help
? ? ? ? Machine support for the CoreWind REAL6410

arch/arm/mach- renamed from arch/arm/mach-s3c64xx/mach-real6410.c +0 -0

s3c64xx/mach-real6410.c
index e130379..bed75d2 100644

arch/arm/mach-s3c64xx/mach-real6410.c +0 -0
@@ -12,24 +12,35 @@

? *
?*/

arch/arm/mach-s3c64xx/mach-real6410.c line 15

Quoted 3 lines
arch/arm/mach-s3c64xx/mach-real6410.c +1 -2
-#include <linux/kernel.h>
-#include <linux/types.h>
+#include <linux/init.h>

You did add <linux/init.h> and

Quoted 8 lines
Quoted 6 lines

?#include <linux/interrupt.h>

arch/arm/mach-s3c64xx/mach-real6410.c +3 -0
+#include <linux/fb.h>
+#include <linux/gpio.h>
+#include <linux/kernel.h>

?#include <linux/list.h>
-#include <linux/init.h>

remove <linux/init.h>...why?

to sort included files alphabetically.

Quoted 95 lines
Quoted 5 lines

?#include <linux/dm9000.h>
-#include <linux/serial_core.h>
?#include <linux/platform_device.h>
+#include <linux/serial_core.h>

Same...you removed <linux/serial_core.h> and added it.

Quoted 1 line

+#include <linux/types.h>

Same...you removed it and added.

Quoted 83 lines

+
?#include <asm/mach-types.h>
?#include <asm/mach/arch.h>
?#include <asm/mach/map.h>
+
?#include <mach/map.h>

arch/arm/mach-s3c64xx/mach-real6410.c +3 -1
-#include <mach/s3c6410.h>
+#include <mach/regs-fb.h>
+#include <mach/regs-gpio.h>
+#include <mach/regs-modem.h>

?#include <mach/regs-srom.h>

arch/arm/mach-s3c64xx/mach-real6410.c +2 -0
+#include <mach/s3c6410.h>
+

?#include <plat/cpu.h>
?#include <plat/devs.h>
+#include <plat/fb.h>
?#include <plat/regs-serial.h>

arch/arm/mach-s3c64xx/mach-real6410.c +2 -0
+#include <video/platform_lcd.h>
+

?#define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK) ?#define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB) ?#define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE)

arch/arm/mach-s3c64xx/mach-real6410.c +45 -0
@@ -99,22 +110,145 @@ static struct platform_device real6410_device_eth = {
 ? ? ? },
 ?};
 
+static struct s3c_fb_pd_win real6410_fb_win[] = {
+ ? ? {
+ ? ? ? ? ? ? .win_mode ? ? ? = { ? ? /* 4.3" 480x272 */
+ ? ? ? ? ? ? ? ? ? ? .left_margin ? ?= 3,
+ ? ? ? ? ? ? ? ? ? ? .right_margin ? = 2,
+ ? ? ? ? ? ? ? ? ? ? .upper_margin ? = 1,
+ ? ? ? ? ? ? ? ? ? ? .lower_margin ? = 1,
+ ? ? ? ? ? ? ? ? ? ? .hsync_len ? ? ?= 40,
+ ? ? ? ? ? ? ? ? ? ? .vsync_len ? ? ?= 1,
+ ? ? ? ? ? ? ? ? ? ? .xres ? ? ? ? ? = 480,
+ ? ? ? ? ? ? ? ? ? ? .yres ? ? ? ? ? = 272,
+ ? ? ? ? ? ? },
+ ? ? ? ? ? ? .max_bpp ? ? ? ?= 32,
+ ? ? ? ? ? ? .default_bpp ? ?= 16,
+ ? ? }, {
+ ? ? ? ? ? ? .win_mode ? ? ? = { ? ? /* 7.0" 800x480 */
+ ? ? ? ? ? ? ? ? ? ? .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 real6410_lcd_pdata __initdata = {
+ ? ? .setup_gpio ? ? = s3c64xx_fb_gpio_setup_24bpp,
+ ? ? .win[0] ? ? ? ? = &real6410_fb_win[0],
+ ? ? .vidcon0 ? ? ? ?= VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
+ ? ? .vidcon1 ? ? ? ?= VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
+};
+
 ?static struct platform_device *real6410_devices[] __initdata = {
 ? ? ? &real6410_device_eth,
 ? ? ? &s3c_device_hsmmc0,
 ? ? ? &s3c_device_hsmmc1,
+ ? ? &s3c_device_fb,
 ?};
 
 ?static void __init real6410_map_io(void)
 ?{
+ ? ? u32 tmp;
+
 ? ? ? s3c64xx_init_io(NULL, 0);
 ? ? ? s3c24xx_init_clocks(12000000);
 ? ? ? s3c24xx_init_uarts(real6410_uartcfgs, ARRAY_SIZE(real6410_uartcfgs));
+
+ ? ? /* set the LCD type */
+ ? ? tmp = __raw_readl(S3C64XX_SPCON);
+ ? ? tmp &= ~S3C64XX_SPCON_LCD_SEL_MASK;
+ ? ? tmp |= S3C64XX_SPCON_LCD_SEL_RGB;
Quoted 8 lines

arch/arm/mach-s3c64xx/mach-real6410.c static struct platform_device real6410_device_eth = { · line 174

Quoted 6 lines
arch/arm/mach-s3c64xx/mach-real6410.c +6 -0
+ ? ? __raw_writel(tmp, S3C64XX_SPCON);
+
+ ? ? /* remove the LCD bypass */
+ ? ? tmp = __raw_readl(S3C64XX_MODEM_MIFPCON);
+ ? ? tmp &= ~MIFPCON_LCD_BYPASS;
+ ? ? __raw_writel(tmp, S3C64XX_MODEM_MIFPCON);

Hmm...I'm not sure whether above functionality is in map_io()

Hmm.. :) I just made cpoy-paste from smdk6410 and it works. IMO to small piece of code for extra function?

Quoted 85 lines
Quoted 21 lines
arch/arm/mach-s3c64xx/mach-real6410.c +20 -0
+}
+
+/*
+ * real6410_features string
+ *
+ * 0-9 LCD configuration
+ *
+ */
+static char real6410_features_str[12] __initdata = "0";
+
+static int __init real6410_features_setup(char *str)
+{
+ ? ? if (str)
+ ? ? ? ? ? ? strlcpy(real6410_features_str, str,
+ ? ? ? ? ? ? ? ? ? ? sizeof(real6410_features_str));
+ ? ? return 1;
+}
+
+__setup("real6410=", real6410_features_setup);
+

arch/arm/mach-s3c64xx/mach-real6410.c static struct platform_device real6410_device_eth = {

Quoted 10 lines
arch/arm/mach-s3c64xx/mach-real6410.c +10 -0
+#define FEATURE_SCREEN (1 << 0)
+
+struct real6410_features_t {
+ ? ? int done;
+ ? ? int lcd_index;
+};
+
+static void real6410_parse_features(
+ ? ? ? ? ? ? struct real6410_features_t *features,
+ ? ? ? ? ? ? const char *features_str)

+static void real6410_parse_features(struct real6410_features_t *features,
+ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? const char *features_str)

Quoted 50 lines
arch/arm/mach-s3c64xx/mach-real6410.c +42 -0
+{
+ ? ? const char *fp = features_str;
+
+ ? ? features->done = 0;
+ ? ? features->lcd_index = 0;
+
+ ? ? while (*fp) {
+ ? ? ? ? ? ? char f = *fp++;
+
+ ? ? ? ? ? ? switch (f) {
+ ? ? ? ? ? ? case '0'...'9': /* tft screen */
+ ? ? ? ? ? ? ? ? ? ? if (features->done & FEATURE_SCREEN) {
+ ? ? ? ? ? ? ? ? ? ? ? ? ? ? printk(KERN_INFO "REAL6410: '%c' ignored, "
+ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? "screen type already set\n", f);
+ ? ? ? ? ? ? ? ? ? ? } else {
+ ? ? ? ? ? ? ? ? ? ? ? ? ? ? int li = f - '0';
+ ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (li >= ARRAY_SIZE(real6410_fb_win))
+ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? printk(KERN_INFO "REAL6410: '%c' out "
+ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? "of range LCD mode\n", f);
+ ? ? ? ? ? ? ? ? ? ? ? ? ? ? else {
+ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? features->lcd_index = li;
+ ? ? ? ? ? ? ? ? ? ? ? ? ? ? }
+ ? ? ? ? ? ? ? ? ? ? }
+ ? ? ? ? ? ? ? ? ? ? features->done |= FEATURE_SCREEN;
+ ? ? ? ? ? ? ? ? ? ? break;
+ ? ? ? ? ? ? }
+ ? ? }
 ?}
 
 ?static void __init real6410_machine_init(void)
 ?{
 ? ? ? u32 cs1;
+ ? ? struct real6410_features_t features = { 0 };
+
+ ? ? printk(KERN_INFO "REAL6410: Option string real6410=%s\n",
+ ? ? ? ? ? ? ? ? ? ? real6410_features_str);
+
+ ? ? /* Parse the feature string */
+ ? ? real6410_parse_features(&features, real6410_features_str);
+
+ ? ? real6410_lcd_pdata.win[0] = &real6410_fb_win[features.lcd_index];
+
+ ? ? printk(KERN_INFO "REAL6410: selected LCD display is %dx%d\n",
+ ? ? ? ? ? ? real6410_lcd_pdata.win[0]->win_mode.xres,
+ ? ? ? ? ? ? real6410_lcd_pdata.win[0]->win_mode.yres);
+
+ ? ? s3c_fb_set_platdata(&real6410_lcd_pdata);
 

? ? ? /* configure nCS1 width to 16 bits */

Quoted 8 lines
Quoted 6 lines
arch/arm/mach-s3c64xx/mach-real6410.c +0 -0
@@ -136,6 +270,8 @@ static void __init real6410_machine_init(void)

? ? ? ? ? ? ? (4 << S3C64XX_SROM_BCX__TCOS__SHIFT) |
? ? ? ? ? ? ? (0 << S3C64XX_SROM_BCX__TACS__SHIFT), S3C64XX_SROM_BC1);

+ ? ? gpio_request(S3C64XX_GPF(15), "LCD power"); +

Just requesting it is enough?

yes, because it's not used yet. It's connected to LCD display, but does nothing. I just make this request to prevent other drivers using the same GPIO,

Quoted 15 lines
Quoted 4 lines

? ? ? platform_add_devices(real6410_devices, ARRAY_SIZE(real6410_devices)); ?}

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#4 lore raw

PATCH v2 2/9 ARM: S3C64XX: add nand support for mach-real6410

In reply to Darius Augulis

Add nand device support and mtd partition table
for mach-real6410

---

Changelog since v1:
- Changed dependency on other patches

 arch/arm/mach-s3c64xx/Kconfig         |    1 +
 arch/arm/mach-s3c64xx/mach-real6410.c |   40 +++++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+), 0 deletions(-)
arch/arm/mach-s3c64xx/Kconfig +1 -0
index 3bbd418..e4aede1 100644
@@ -106,6 +106,7 @@ config MACH_REAL6410
 	select S3C64XX_SETUP_SDHCI
 	select S3C_DEV_FB
 	select S3C64XX_SETUP_FB_24BPP
+	select S3C_DEV_NAND
 	help
 	  Machine support for the CoreWind REAL6410
 
arch/arm/mach-s3c64xx/mach-real6410.c +40 -0
index bed75d2..9fd943d 100644
@@ -19,6 +19,8 @@
 #include <linux/kernel.h>
 #include <linux/list.h>
 #include <linux/dm9000.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
 #include <linux/platform_device.h>
 #include <linux/serial_core.h>
 #include <linux/types.h>
@@ -37,6 +39,7 @@
 #include <plat/cpu.h>
 #include <plat/devs.h>
 #include <plat/fb.h>
+#include <plat/nand.h>
 #include <plat/regs-serial.h>
 
 #include <video/platform_lcd.h>
@@ -147,11 +150,47 @@ static struct s3c_fb_platdata real6410_lcd_pdata __initdata = {
 	.vidcon1	= VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
 };
 
+static struct mtd_partition real6410_nand_part[] = {
+	[0] = {
+		.name	= "uboot",
+		.size	= SZ_1M,
+		.offset	= 0,
+	},
+	[1] = {
+		.name	= "kernel",
+		.size	= SZ_2M,
+		.offset	= SZ_1M,
+	},
+	[2] = {
+		.name	= "rootfs",
+		.size	= MTDPART_SIZ_FULL,
+		.offset	= SZ_1M + SZ_2M,
+	},
+};
+
+static struct s3c2410_nand_set real6410_nand_sets[] = {
+	[0] = {
+		.name		= "nand",
+		.nr_chips	= 1,
+		.nr_partitions	= ARRAY_SIZE(real6410_nand_part),
+		.partitions	= real6410_nand_part,
+	},
+};
+
+static struct s3c2410_platform_nand real6410_nand_info = {
+	.tacls		= 25,
+	.twrph0		= 55,
+	.twrph1		= 40,
+	.nr_sets	= ARRAY_SIZE(real6410_nand_sets),
+	.sets		= real6410_nand_sets,
+};
+
 static struct platform_device *real6410_devices[] __initdata = {
 	&real6410_device_eth,
 	&s3c_device_hsmmc0,
 	&s3c_device_hsmmc1,
 	&s3c_device_fb,
+	&s3c_device_nand,
 };
 
 static void __init real6410_map_io(void)
@@ -249,6 +288,7 @@ static void __init real6410_machine_init(void)
 		real6410_lcd_pdata.win[0]->win_mode.yres);
 
 	s3c_fb_set_platdata(&real6410_lcd_pdata);
+	s3c_nand_set_platdata(&real6410_nand_info);
 
 	/* configure nCS1 width to 16 bits */
 
#5 lore raw

RE: [PATCH 2/9 v2] ARM: S3C64XX: add nand support for mach-real6410

Quoted 99 lines · Darius Augulis

Add nand device support and mtd partition table
for mach-real6410

---

Changelog since v1:
- Changed dependency on other patches

 arch/arm/mach-s3c64xx/Kconfig         |    1 +
 arch/arm/mach-s3c64xx/mach-real6410.c |   40
+++++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+), 0 deletions(-)
arch/arm/mach-s3c64xx/Kconfig +1 -0
index 3bbd418..e4aede1 100644
@@ -106,6 +106,7 @@ config MACH_REAL6410
 	select S3C64XX_SETUP_SDHCI
 	select S3C_DEV_FB
 	select S3C64XX_SETUP_FB_24BPP
+	select S3C_DEV_NAND
 	help
 	  Machine support for the CoreWind REAL6410
 
arch/arm/mach- renamed from arch/arm/mach-s3c64xx/mach-real6410.c +0 -0

s3c64xx/mach-real6410.c
index bed75d2..9fd943d 100644

arch/arm/mach-s3c64xx/mach-real6410.c +39 -0
@@ -19,6 +19,8 @@
 #include <linux/kernel.h>
 #include <linux/list.h>
 #include <linux/dm9000.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
 #include <linux/platform_device.h>
 #include <linux/serial_core.h>
 #include <linux/types.h>
@@ -37,6 +39,7 @@
 #include <plat/cpu.h>
 #include <plat/devs.h>
 #include <plat/fb.h>
+#include <plat/nand.h>
 #include <plat/regs-serial.h>
 
 #include <video/platform_lcd.h>
@@ -147,11 +150,47 @@ static struct s3c_fb_platdata real6410_lcd_pdata
 __initdata = {
 	.vidcon1	= VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
 };
 
+static struct mtd_partition real6410_nand_part[] = {
+	[0] = {
+		.name	= "uboot",
+		.size	= SZ_1M,
+		.offset	= 0,
+	},
+	[1] = {
+		.name	= "kernel",
+		.size	= SZ_2M,
+		.offset	= SZ_1M,
+	},
+	[2] = {
+		.name	= "rootfs",
+		.size	= MTDPART_SIZ_FULL,
+		.offset	= SZ_1M + SZ_2M,
+	},
+};
+
+static struct s3c2410_nand_set real6410_nand_sets[] = {
+	[0] = {
+		.name		= "nand",
+		.nr_chips	= 1,
+		.nr_partitions	= ARRAY_SIZE(real6410_nand_part),
+		.partitions	= real6410_nand_part,
+	},
+};
+
+static struct s3c2410_platform_nand real6410_nand_info = {
+	.tacls		= 25,
+	.twrph0		= 55,
+	.twrph1		= 40,
+	.nr_sets	= ARRAY_SIZE(real6410_nand_sets),
+	.sets		= real6410_nand_sets,
+};
+
 static struct platform_device *real6410_devices[] __initdata = {
 	&real6410_device_eth,
 	&s3c_device_hsmmc0,
 	&s3c_device_hsmmc1,
 	&s3c_device_fb,
+	&s3c_device_nand,
 };
 

static void __init real6410_map_io(void)

arch/arm/mach-s3c64xx/mach-real6410.c static void __init real6410_machine_init(void) · line 294

Quoted 7 lines
arch/arm/mach-s3c64xx/mach-real6410.c +1 -0
@@ -249,6 +288,7 @@ static void __init real6410_machine_init(void)
 		real6410_lcd_pdata.win[0]->win_mode.yres);
 
 	s3c_fb_set_platdata(&real6410_lcd_pdata);
+	s3c_nand_set_platdata(&real6410_nand_info);
 
 	/* configure nCS1 width to 16 bits */
 

Where is 'END' of patch mark?
maybe broken your patch file...?

Others, looks ok to me.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#6 lore raw

Re: [PATCH 2/9 v2] ARM: S3C64XX: add nand support for mach-real6410

Quoted 102 lines · Kukjin Kim
Quoted 101 lines · Darius Augulis

Add nand device support and mtd partition table
for mach-real6410

---

Changelog since v1:
- Changed dependency on other patches

  arch/arm/mach-s3c64xx/Kconfig         |    1 +
  arch/arm/mach-s3c64xx/mach-real6410.c |   40
+++++++++++++++++++++++++++++++++
  2 files changed, 41 insertions(+), 0 deletions(-)
arch/arm/mach-s3c64xx/Kconfig +1 -0
index 3bbd418..e4aede1 100644
@@ -106,6 +106,7 @@ config MACH_REAL6410
  	select S3C64XX_SETUP_SDHCI
  	select S3C_DEV_FB
  	select S3C64XX_SETUP_FB_24BPP
+	select S3C_DEV_NAND
  	help
  	  Machine support for the CoreWind REAL6410
 
arch/arm/mach- renamed from arch/arm/mach-s3c64xx/mach-real6410.c +0 -0

s3c64xx/mach-real6410.c
index bed75d2..9fd943d 100644

arch/arm/mach-s3c64xx/mach-real6410.c +39 -0
@@ -19,6 +19,8 @@
  #include<linux/kernel.h>
  #include<linux/list.h>
  #include<linux/dm9000.h>
+#include<linux/mtd/mtd.h>
+#include<linux/mtd/partitions.h>
  #include<linux/platform_device.h>
  #include<linux/serial_core.h>
  #include<linux/types.h>
@@ -37,6 +39,7 @@
  #include<plat/cpu.h>
  #include<plat/devs.h>
  #include<plat/fb.h>
+#include<plat/nand.h>
  #include<plat/regs-serial.h>
 
  #include<video/platform_lcd.h>
@@ -147,11 +150,47 @@ static struct s3c_fb_platdata real6410_lcd_pdata
 __initdata = {
  	.vidcon1	= VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
  };
 
+static struct mtd_partition real6410_nand_part[] = {
+	[0] = {
+		.name	= "uboot",
+		.size	= SZ_1M,
+		.offset	= 0,
+	},
+	[1] = {
+		.name	= "kernel",
+		.size	= SZ_2M,
+		.offset	= SZ_1M,
+	},
+	[2] = {
+		.name	= "rootfs",
+		.size	= MTDPART_SIZ_FULL,
+		.offset	= SZ_1M + SZ_2M,
+	},
+};
+
+static struct s3c2410_nand_set real6410_nand_sets[] = {
+	[0] = {
+		.name		= "nand",
+		.nr_chips	= 1,
+		.nr_partitions	= ARRAY_SIZE(real6410_nand_part),
+		.partitions	= real6410_nand_part,
+	},
+};
+
+static struct s3c2410_platform_nand real6410_nand_info = {
+	.tacls		= 25,
+	.twrph0		= 55,
+	.twrph1		= 40,
+	.nr_sets	= ARRAY_SIZE(real6410_nand_sets),
+	.sets		= real6410_nand_sets,
+};
+
  static struct platform_device *real6410_devices[] __initdata = {
  	&real6410_device_eth,
  	&s3c_device_hsmmc0,
  	&s3c_device_hsmmc1,
  	&s3c_device_fb,
+	&s3c_device_nand,
  };
 

static void __init real6410_map_io(void)

arch/arm/mach-s3c64xx/mach-real6410.c +0 -0
@@ -249,6 +288,7 @@ static void __init real6410_machine_init(void)
  		real6410_lcd_pdata.win[0]->win_mode.yres);
 
Quoted 7 lines

arch/arm/mach-s3c64xx/mach-real6410.c static void __init real6410_machine_init(void) · line 294

Quoted 5 lines
arch/arm/mach-s3c64xx/mach-real6410.c +1 -0
  	s3c_fb_set_platdata(&real6410_lcd_pdata);
+	s3c_nand_set_platdata(&real6410_nand_info);
 
  	/* configure nCS1 width to 16 bits */
 

Where is 'END' of patch mark?
maybe broken your patch file...?

Confused. What 'END' mark are you missing?
All patches are sent by stg mail, all apply fine, no conflict or other messages from stgit.
Please explain what you mean.

Quoted 11 lines

Others, looks ok to me.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim<[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#7 lore raw

Re: [PATCH 2/9 v2] ARM: S3C64XX: add nand support for mach-real6410

In reply to Kukjin Kim
Quoted 102 lines · Kukjin Kim
Quoted 101 lines · Darius Augulis

Add nand device support and mtd partition table
for mach-real6410

---

Changelog since v1:
?- Changed dependency on other patches

?arch/arm/mach-s3c64xx/Kconfig ? ? ? ? | ? ?1 + ?arch/arm/mach-s3c64xx/mach-real6410.c | ? 40
+++++++++++++++++++++++++++++++++
?2 files changed, 41 insertions(+), 0 deletions(-)

arch/arm/mach-s3c64xx/Kconfig +0 -0
index 3bbd418..e4aede1 100644
@@ -106,6 +106,7 @@ config MACH_REAL6410

? ? ? select S3C64XX_SETUP_SDHCI
? ? ? select S3C_DEV_FB
? ? ? select S3C64XX_SETUP_FB_24BPP
+ ? ? select S3C_DEV_NAND
? ? ? help
? ? ? ? Machine support for the CoreWind REAL6410

arch/arm/mach- renamed from arch/arm/mach-s3c64xx/mach-real6410.c +0 -0

s3c64xx/mach-real6410.c
index bed75d2..9fd943d 100644

arch/arm/mach-s3c64xx/mach-real6410.c +0 -0
@@ -19,6 +19,8 @@

?#include <linux/kernel.h>
?#include <linux/list.h>
?#include <linux/dm9000.h>

arch/arm/mach-s3c64xx/mach-real6410.c +2 -0
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>

?#include <linux/platform_device.h>
?#include <linux/serial_core.h>
?#include <linux/types.h>

arch/arm/mach-s3c64xx/mach-real6410.c +0 -0
@@ -37,6 +39,7 @@

?#include <plat/cpu.h>
?#include <plat/devs.h>
?#include <plat/fb.h>
+#include <plat/nand.h>
?#include <plat/regs-serial.h>

?#include <video/platform_lcd.h>

arch/arm/mach-s3c64xx/mach-real6410.c +36 -0
@@ -147,11 +150,47 @@ static struct s3c_fb_platdata real6410_lcd_pdata
 __initdata = {
 ? ? ? .vidcon1 ? ? ? ?= VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
 ?};
 
+static struct mtd_partition real6410_nand_part[] = {
+ ? ? [0] = {
+ ? ? ? ? ? ? .name ? = "uboot",
+ ? ? ? ? ? ? .size ? = SZ_1M,
+ ? ? ? ? ? ? .offset = 0,
+ ? ? },
+ ? ? [1] = {
+ ? ? ? ? ? ? .name ? = "kernel",
+ ? ? ? ? ? ? .size ? = SZ_2M,
+ ? ? ? ? ? ? .offset = SZ_1M,
+ ? ? },
+ ? ? [2] = {
+ ? ? ? ? ? ? .name ? = "rootfs",
+ ? ? ? ? ? ? .size ? = MTDPART_SIZ_FULL,
+ ? ? ? ? ? ? .offset = SZ_1M + SZ_2M,
+ ? ? },
+};
+
+static struct s3c2410_nand_set real6410_nand_sets[] = {
+ ? ? [0] = {
+ ? ? ? ? ? ? .name ? ? ? ? ? = "nand",
+ ? ? ? ? ? ? .nr_chips ? ? ? = 1,
+ ? ? ? ? ? ? .nr_partitions ?= ARRAY_SIZE(real6410_nand_part),
+ ? ? ? ? ? ? .partitions ? ? = real6410_nand_part,
+ ? ? },
+};
+
+static struct s3c2410_platform_nand real6410_nand_info = {
+ ? ? .tacls ? ? ? ? ?= 25,
+ ? ? .twrph0 ? ? ? ? = 55,
+ ? ? .twrph1 ? ? ? ? = 40,
+ ? ? .nr_sets ? ? ? ?= ARRAY_SIZE(real6410_nand_sets),
+ ? ? .sets ? ? ? ? ? = real6410_nand_sets,
+};
+
 ?static struct platform_device *real6410_devices[] __initdata = {
 ? ? ? &real6410_device_eth,
 ? ? ? &s3c_device_hsmmc0,
 ? ? ? &s3c_device_hsmmc1,
 ? ? ? &s3c_device_fb,
+ ? ? &s3c_device_nand,
 ?};
 

?static void __init real6410_map_io(void)

arch/arm/mach-s3c64xx/mach-real6410.c +0 -0
@@ -249,6 +288,7 @@ static void __init real6410_machine_init(void)
 ? ? ? ? ? ? ? real6410_lcd_pdata.win[0]->win_mode.yres);
 
Quoted 7 lines
Quoted 5 lines
arch/arm/mach-s3c64xx/mach-real6410.c +1 -0
 ? ? ? s3c_fb_set_platdata(&real6410_lcd_pdata);
+ ? ? s3c_nand_set_platdata(&real6410_nand_info);
 

? ? ? /* configure nCS1 width to 16 bits */

Where is 'END' of patch mark?
maybe broken your patch file...?

Confused. What 'END' mark are you missing?
All patches are sent by stg mail, all apply fine, no conflict or other messages from stgit.
Please explain what you mean.

p.s. checkpatch.pl also doesn't report any error.

Quoted 12 lines

Others, looks ok to me.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#8 lore raw

RE: [PATCH 2/9 v2] ARM: S3C64XX: add nand support for mach-real6410

Quoted 18 lines · Darius Augulis
Quoted 16 lines · Kukjin Kim
Quoted 15 lines · Darius Augulis

Add nand device support and mtd partition table
for mach-real6410

---

Changelog since v1:
 - Changed dependency on other patches

 arch/arm/mach-s3c64xx/Kconfig         |    1 +
 arch/arm/mach-s3c64xx/mach-real6410.c |   40
+++++++++++++++++++++++++++++++++

 2 files changed, 41 insertions(+), 0 deletions(-)

(snip)

Quoted 11 lines
Quoted 10 lines

arch/arm/mach-s3c64xx/mach-real6410.c static void __init real6410_machine_init(void) · line 294

Quoted 8 lines
arch/arm/mach-s3c64xx/mach-real6410.c +1 -0
@@ -249,6 +288,7 @@ static void __init real6410_machine_init(void)
               real6410_lcd_pdata.win[0]->win_mode.yres);
 
       s3c_fb_set_platdata(&real6410_lcd_pdata);
+     s3c_nand_set_platdata(&real6410_nand_info);
 
       /* configure nCS1 width to 16 bits */
 

Where is 'END' of patch mark?
maybe broken your patch file...?

Quoted 4 lines

Confused. What 'END' mark are you missing?
All patches are sent by stg mail, all apply fine, no conflict or other messages from stgit.
Please explain what you mean.

Generally, there is '--' mark and git version in the bottom of patch... If you make patch file using git-format-patch, maybe automatically add it.

Quoted 3 lines

p.s. checkpatch.pl also doesn't report any error.

Yes...ok.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#9 lore raw

PATCH 3/9 ARM: S3C64XX: add touchscreen support for mach-real6410

In reply to Darius Augulis

Add touchscreen device support for mach-real6410

---
 arch/arm/mach-s3c64xx/Kconfig         |    2 ++
 arch/arm/mach-s3c64xx/mach-real6410.c |   11 +++++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)
arch/arm/mach-s3c64xx/Kconfig +2 -0
index e4aede1..b706b80 100644
@@ -107,6 +107,8 @@ config MACH_REAL6410
 	select S3C_DEV_FB
 	select S3C64XX_SETUP_FB_24BPP
 	select S3C_DEV_NAND
+	select SAMSUNG_DEV_ADC
+	select SAMSUNG_DEV_TS
 	help
 	  Machine support for the CoreWind REAL6410
 
arch/arm/mach-s3c64xx/mach-real6410.c +11 -0
index 9fd943d..bad6990 100644
@@ -36,11 +36,13 @@
 #include <mach/regs-srom.h>
 #include <mach/s3c6410.h>
 
+#include <plat/adc.h>
 #include <plat/cpu.h>
 #include <plat/devs.h>
 #include <plat/fb.h>
 #include <plat/nand.h>
 #include <plat/regs-serial.h>
+#include <plat/ts.h>
 
 #include <video/platform_lcd.h>
 
@@ -191,6 +193,14 @@ static struct platform_device *real6410_devices[] __initdata = {
 	&s3c_device_hsmmc1,
 	&s3c_device_fb,
 	&s3c_device_nand,
+	&s3c_device_adc,
+	&s3c_device_ts,
+};
+
+static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
+	.delay			= 10000,
+	.presc			= 49,
+	.oversampling_shift	= 2,
 };
 
 static void __init real6410_map_io(void)
@@ -289,6 +299,7 @@ static void __init real6410_machine_init(void)
 
 	s3c_fb_set_platdata(&real6410_lcd_pdata);
 	s3c_nand_set_platdata(&real6410_nand_info);
+	s3c24xx_ts_set_platdata(&s3c_ts_platform);
 
 	/* configure nCS1 width to 16 bits */
 
#10 lore raw

RE: [PATCH 3/9] ARM: S3C64XX: add touchscreen support for mach-real6410

Quoted 58 lines · Darius Augulis

Add touchscreen device support for mach-real6410

---
 arch/arm/mach-s3c64xx/Kconfig         |    2 ++
 arch/arm/mach-s3c64xx/mach-real6410.c |   11 +++++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)
arch/arm/mach-s3c64xx/Kconfig +2 -0
index e4aede1..b706b80 100644
@@ -107,6 +107,8 @@ config MACH_REAL6410
 	select S3C_DEV_FB
 	select S3C64XX_SETUP_FB_24BPP
 	select S3C_DEV_NAND
+	select SAMSUNG_DEV_ADC
+	select SAMSUNG_DEV_TS
 	help
 	  Machine support for the CoreWind REAL6410
 
arch/arm/mach- renamed from arch/arm/mach-s3c64xx/mach-real6410.c +0 -0

s3c64xx/mach-real6410.c
index 9fd943d..bad6990 100644

arch/arm/mach-s3c64xx/mach-real6410.c +10 -0
@@ -36,11 +36,13 @@
 #include <mach/regs-srom.h>
 #include <mach/s3c6410.h>
 
+#include <plat/adc.h>
 #include <plat/cpu.h>
 #include <plat/devs.h>
 #include <plat/fb.h>
 #include <plat/nand.h>
 #include <plat/regs-serial.h>
+#include <plat/ts.h>
 
 #include <video/platform_lcd.h>
 
@@ -191,6 +193,14 @@ static struct platform_device *real6410_devices[]
 __initdata = {
 	&s3c_device_hsmmc1,
 	&s3c_device_fb,
 	&s3c_device_nand,
+	&s3c_device_adc,
+	&s3c_device_ts,
+};
+
+static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
+	.delay			= 10000,
+	.presc			= 49,
+	.oversampling_shift	= 2,
 };
 

static void __init real6410_map_io(void)

arch/arm/mach-s3c64xx/mach-real6410.c static void __init real6410_machine_init(void) · line 305

Quoted 7 lines
arch/arm/mach-s3c64xx/mach-real6410.c +1 -0
@@ -289,6 +299,7 @@ static void __init real6410_machine_init(void)
 
 	s3c_fb_set_platdata(&real6410_lcd_pdata);
 	s3c_nand_set_platdata(&real6410_nand_info);
+	s3c24xx_ts_set_platdata(&s3c_ts_platform);
 
 	/* configure nCS1 width to 16 bits */
 

No need to add 's3c_adc_setname("s3c64xx-adc")' in mach-s3c64xx?

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#11 lore raw

Re: [PATCH 3/9] ARM: S3C64XX: add touchscreen support for mach-real6410

Quoted 60 lines · Kukjin Kim
Quoted 59 lines · Darius Augulis

Add touchscreen device support for mach-real6410

---
?arch/arm/mach-s3c64xx/Kconfig ? ? ? ? | ? ?2 ++ ?arch/arm/mach-s3c64xx/mach-real6410.c | ? 11 +++++++++++ ?2 files changed, 13 insertions(+), 0 deletions(-)

arch/arm/mach-s3c64xx/Kconfig +0 -0
index e4aede1..b706b80 100644
@@ -107,6 +107,8 @@ config MACH_REAL6410

? ? ? select S3C_DEV_FB
? ? ? select S3C64XX_SETUP_FB_24BPP
? ? ? select S3C_DEV_NAND
+ ? ? select SAMSUNG_DEV_ADC
+ ? ? select SAMSUNG_DEV_TS
? ? ? help
? ? ? ? Machine support for the CoreWind REAL6410

arch/arm/mach- renamed from arch/arm/mach-s3c64xx/mach-real6410.c +0 -0

s3c64xx/mach-real6410.c
index 9fd943d..bad6990 100644

arch/arm/mach-s3c64xx/mach-real6410.c +0 -0
@@ -36,11 +36,13 @@

?#include <mach/regs-srom.h>
?#include <mach/s3c6410.h>

+#include <plat/adc.h>
?#include <plat/cpu.h>
?#include <plat/devs.h>
?#include <plat/fb.h>
?#include <plat/nand.h>
?#include <plat/regs-serial.h>
+#include <plat/ts.h>

?#include <video/platform_lcd.h>

arch/arm/mach-s3c64xx/mach-real6410.c +8 -0
@@ -191,6 +193,14 @@ static struct platform_device *real6410_devices[]
 __initdata = {
 ? ? ? &s3c_device_hsmmc1,
 ? ? ? &s3c_device_fb,
 ? ? ? &s3c_device_nand,
+ ? ? &s3c_device_adc,
+ ? ? &s3c_device_ts,
+};
+
+static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
+ ? ? .delay ? ? ? ? ? ? ? ? ?= 10000,
+ ? ? .presc ? ? ? ? ? ? ? ? ?= 49,
+ ? ? .oversampling_shift ? ? = 2,
 ?};
 

?static void __init real6410_map_io(void)

arch/arm/mach-s3c64xx/mach-real6410.c +0 -0
@@ -289,6 +299,7 @@ static void __init real6410_machine_init(void)
 
Quoted 8 lines
Quoted 6 lines
arch/arm/mach-s3c64xx/mach-real6410.c +1 -0
 ? ? ? s3c_fb_set_platdata(&real6410_lcd_pdata);
 ? ? ? s3c_nand_set_platdata(&real6410_nand_info);
+ ? ? s3c24xx_ts_set_platdata(&s3c_ts_platform);
 

? ? ? /* configure nCS1 width to 16 bits */

No need to add 's3c_adc_setname("s3c64xx-adc")' in mach-s3c64xx?

IMO no, because it's called from s3c6410_map_io() which is generic for all s3c64xx boards.
This patch selects SAMSUNG_DEV_ADC and this is enough. btw, all patches are tested and all devices work ok.

Quoted 10 lines

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#12 lore raw

RE: [PATCH 3/9] ARM: S3C64XX: add touchscreen support for mach-real6410

Quoted 6 lines · Darius Augulis
Quoted 4 lines · Kukjin Kim
Quoted 3 lines · Darius Augulis

Add touchscreen device support for mach-real6410

Quoted 7 lines
Quoted 7 lines

Review

Quoted 7 lines

---
 arch/arm/mach-s3c64xx/Kconfig         |    2 ++ arch/arm/mach-s3c64xx/mach-real6410.c |   11 +++++++++++

 2 files changed, 13 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/arch/arm/mach-s3c64xx/Kconfig

Quoted 58 lines
Quoted 49 lines
Quoted 49 lines

index e4aede1..b706b80 100644

arch/arm/mach-s3c64xx/Kconfig +0 -0
@@ -107,6 +107,8 @@ config MACH_REAL6410

      select S3C_DEV_FB
      select S3C64XX_SETUP_FB_24BPP
      select S3C_DEV_NAND
+     select SAMSUNG_DEV_ADC
+     select SAMSUNG_DEV_TS
      help
        Machine support for the CoreWind REAL6410

arch/arm/mach- renamed from arch/arm/mach-s3c64xx/mach-real6410.c +0 -0

s3c64xx/mach-real6410.c
index 9fd943d..bad6990 100644

arch/arm/mach-s3c64xx/mach-real6410.c +10 -0
@@ -36,11 +36,13 @@
  #include <mach/regs-srom.h>
  #include <mach/s3c6410.h>
 
+#include <plat/adc.h>
  #include <plat/cpu.h>
  #include <plat/devs.h>
  #include <plat/fb.h>
  #include <plat/nand.h>
  #include <plat/regs-serial.h>
+#include <plat/ts.h>
 
  #include <video/platform_lcd.h>
 
@@ -191,6 +193,14 @@ static struct platform_device *real6410_devices[]
 __initdata = {
       &s3c_device_hsmmc1,
       &s3c_device_fb,
       &s3c_device_nand,
+     &s3c_device_adc,
+     &s3c_device_ts,
+};
+
+static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
+     .delay                  = 10000,
+     .presc                  = 49,
+     .oversampling_shift     = 2,
  };
 

 static void __init real6410_map_io(void)

arch/arm/mach-s3c64xx/mach-real6410.c +0 -0
@@ -289,6 +299,7 @@ static void __init real6410_machine_init(void)
 
Quoted 8 lines

arch/arm/mach-s3c64xx/mach-real6410.c static void __init real6410_machine_init(void) · line 305

Quoted 6 lines
arch/arm/mach-s3c64xx/mach-real6410.c +1 -0
       s3c_fb_set_platdata(&real6410_lcd_pdata);
       s3c_nand_set_platdata(&real6410_nand_info);
+     s3c24xx_ts_set_platdata(&s3c_ts_platform);
 
       /* configure nCS1 width to 16 bits */
 

No need to add 's3c_adc_setname("s3c64xx-adc")' in mach-s3c64xx?

Quoted 5 lines

IMO no, because it's called from s3c6410_map_io() which is generic for all s3c64xx boards.
This patch selects SAMSUNG_DEV_ADC and this is enough. btw, all patches are tested and all devices work ok.

Oh, yes...I mis-typed to find it...
Maybe I need sleeping, hehe ;-)

Will check to continue...your patches tomorrow morning.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#13 lore raw

PATCH 4/9 ARM: S3C64XX: add USB host support for mach-real6410

In reply to Darius Augulis

Add USB host device support for mach-real6410

---
 arch/arm/mach-s3c64xx/Kconfig         |    1 +
 arch/arm/mach-s3c64xx/mach-real6410.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-s3c64xx/Kconfig +1 -0
index b706b80..c05ae12 100644
@@ -109,6 +109,7 @@ config MACH_REAL6410
 	select S3C_DEV_NAND
 	select SAMSUNG_DEV_ADC
 	select SAMSUNG_DEV_TS
+	select S3C_DEV_USB_HOST
 	help
 	  Machine support for the CoreWind REAL6410
 
arch/arm/mach-s3c64xx/mach-real6410.c +1 -0
index bad6990..00e7d7e 100644
@@ -195,6 +195,7 @@ static struct platform_device *real6410_devices[] __initdata = {
 	&s3c_device_nand,
 	&s3c_device_adc,
 	&s3c_device_ts,
+	&s3c_device_ohci,
 };
 
 static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
#14 lore raw

RE: [PATCH 4/9] ARM: S3C64XX: add USB host support for mach-real6410

Quoted 34 lines · Darius Augulis

Add USB host device support for mach-real6410

---
 arch/arm/mach-s3c64xx/Kconfig         |    1 +
 arch/arm/mach-s3c64xx/mach-real6410.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-s3c64xx/Kconfig +1 -0
index b706b80..c05ae12 100644
@@ -109,6 +109,7 @@ config MACH_REAL6410
 	select S3C_DEV_NAND
 	select SAMSUNG_DEV_ADC
 	select SAMSUNG_DEV_TS
+	select S3C_DEV_USB_HOST
 	help
 	  Machine support for the CoreWind REAL6410
 
arch/arm/mach- renamed from arch/arm/mach-s3c64xx/mach-real6410.c +0 -0

s3c64xx/mach-real6410.c
index bad6990..00e7d7e 100644

arch/arm/mach-s3c64xx/mach-real6410.c +1 -0
@@ -195,6 +195,7 @@ static struct platform_device *real6410_devices[]
 __initdata = {
 	&s3c_device_nand,
 	&s3c_device_adc,
 	&s3c_device_ts,
+	&s3c_device_ohci,
 };
 
Quoted 1 line

static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {

No need any gpio configuration for it?

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#15 lore raw

Re: [PATCH 4/9] ARM: S3C64XX: add USB host support for mach-real6410

Quoted 35 lines · Kukjin Kim
Quoted 34 lines · Darius Augulis

Add USB host device support for mach-real6410

---
?arch/arm/mach-s3c64xx/Kconfig ? ? ? ? | ? ?1 +
?arch/arm/mach-s3c64xx/mach-real6410.c | ? ?1 +
?2 files changed, 2 insertions(+), 0 deletions(-)

arch/arm/mach-s3c64xx/Kconfig +0 -0
index b706b80..c05ae12 100644
@@ -109,6 +109,7 @@ config MACH_REAL6410

? ? ? select S3C_DEV_NAND
? ? ? select SAMSUNG_DEV_ADC
? ? ? select SAMSUNG_DEV_TS
+ ? ? select S3C_DEV_USB_HOST
? ? ? help
? ? ? ? Machine support for the CoreWind REAL6410

arch/arm/mach- renamed from arch/arm/mach-s3c64xx/mach-real6410.c +0 -0

s3c64xx/mach-real6410.c
index bad6990..00e7d7e 100644

arch/arm/mach-s3c64xx/mach-real6410.c +1 -0
@@ -195,6 +195,7 @@ static struct platform_device *real6410_devices[]
 __initdata = {
 ? ? ? &s3c_device_nand,
 ? ? ? &s3c_device_adc,
 ? ? ? &s3c_device_ts,
+ ? ? &s3c_device_ohci,
 ?};
 
Quoted 3 lines
Quoted 1 line

?static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {

No need any gpio configuration for it?

No, USB is powered by hardware at startup and does not need any other gpio config.

Quoted 10 lines

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#16 lore raw

RE: [PATCH 4/9] ARM: S3C64XX: add USB host support for mach-real6410

Quoted 6 lines · Darius Augulis
Quoted 4 lines · Kukjin Kim
Quoted 3 lines · Darius Augulis

Add USB host device support for mach-real6410

Quoted 7 lines
Quoted 7 lines

Review

Quoted 7 lines
---
 arch/arm/mach-s3c64xx/Kconfig         |    1 +
 arch/arm/mach-s3c64xx/mach-real6410.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/arch/arm/mach-s3c64xx/Kconfig

Quoted 24 lines
Quoted 24 lines
Quoted 24 lines

index b706b80..c05ae12 100644

arch/arm/mach-s3c64xx/Kconfig +1 -0
@@ -109,6 +109,7 @@ config MACH_REAL6410
      select S3C_DEV_NAND
      select SAMSUNG_DEV_ADC
      select SAMSUNG_DEV_TS
+     select S3C_DEV_USB_HOST
      help
        Machine support for the CoreWind REAL6410
 
arch/arm/mach- renamed from arch/arm/mach-s3c64xx/mach-real6410.c +0 -0

s3c64xx/mach-real6410.c
index bad6990..00e7d7e 100644

arch/arm/mach-s3c64xx/mach-real6410.c +1 -0
@@ -195,6 +195,7 @@ static struct platform_device *real6410_devices[]
 __initdata = {
      &s3c_device_nand,
      &s3c_device_adc,
      &s3c_device_ts,
+     &s3c_device_ohci,
 };
 
Quoted 7 lines
Quoted 3 lines
Quoted 1 line

static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {

No need any gpio configuration for it?

No, USB is powered by hardware at startup and does not need any other gpio config.

Hmm...firstly see below...

+-----+        +------ UTMI -------- OTG Device
| PHY |--------|
+-----+        +--- Serial I/F 1 --- Host 1.1 (1port)
+---------------+
|USB Transceiver|-- Serial I/F 2 --- Host 1.1 (1port)
+---------------+

If you want to use only 1port Host 1.1 through Serial I/F2, your code is ok. but want to use 2-port Host 1.1, need to set configuration of PHY initialization and clock path for Serial I/F1.
I meant that.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#17 lore raw

Re: [PATCH 4/9] ARM: S3C64XX: add USB host support for mach-real6410

Quoted 53 lines · Kukjin Kim
Quoted 6 lines · Darius Augulis
Quoted 4 lines · Kukjin Kim
Quoted 3 lines · Darius Augulis

Add USB host device support for mach-real6410

Quoted 7 lines
Quoted 7 lines

Review

Quoted 7 lines

---
?arch/arm/mach-s3c64xx/Kconfig ? ? ? ? | ? ?1 +
?arch/arm/mach-s3c64xx/mach-real6410.c | ? ?1 +
?2 files changed, 2 insertions(+), 0 deletions(-)

(quoted diff) +0 -0

b/arch/arm/mach-s3c64xx/Kconfig

Quoted 24 lines
Quoted 24 lines
Quoted 24 lines

index b706b80..c05ae12 100644

arch/arm/mach-s3c64xx/Kconfig +0 -0
@@ -109,6 +109,7 @@ config MACH_REAL6410

? ? ? select S3C_DEV_NAND
? ? ? select SAMSUNG_DEV_ADC
? ? ? select SAMSUNG_DEV_TS
+ ? ? select S3C_DEV_USB_HOST
? ? ? help
? ? ? ? Machine support for the CoreWind REAL6410

arch/arm/mach- renamed from arch/arm/mach-s3c64xx/mach-real6410.c +0 -0

s3c64xx/mach-real6410.c
index bad6990..00e7d7e 100644

arch/arm/mach-s3c64xx/mach-real6410.c +1 -0
@@ -195,6 +195,7 @@ static struct platform_device *real6410_devices[]
 __initdata = {
 ? ? ? &s3c_device_nand,
 ? ? ? &s3c_device_adc,
 ? ? ? &s3c_device_ts,
+ ? ? &s3c_device_ohci,
 ?};
 
Quoted 7 lines
Quoted 3 lines
Quoted 1 line

?static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {

No need any gpio configuration for it?

No, USB is powered by hardware at startup and does not need any other gpio config.

Hmm...firstly see below...

+-----+ ? ? ? ?+------ UTMI -------- OTG Device
| PHY |--------|
+-----+ ? ? ? ?+--- Serial I/F 1 --- Host 1.1 (1port)
Quoted 8 lines
+---------------+
|USB Transceiver|-- Serial I/F 2 --- Host 1.1 (1port)
+---------------+

If you want to use only 1port Host 1.1 through Serial I/F2, your code is ok. but want to use 2-port Host 1.1, need to set configuration of PHY initialization and clock path for Serial I/F1.
I meant that.

Clear. Both real6410 and mini6410 have only single USB host connector and it seems it is connected to Serial I/F 2, because it works with no additional configuration.

Quoted 11 lines

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#18 lore raw

PATCH v2 5/9 ARM: S3C64XX: add support for mach-mini6410

In reply to Darius Augulis

Add support for mini6410 board from FriendlyARM

---

Changelog since v1:
- Ben's comments about coding style fixed

 arch/arm/mach-s3c64xx/Kconfig         |   10 ++
 arch/arm/mach-s3c64xx/Makefile        |    1 
 arch/arm/mach-s3c64xx/mach-mini6410.c |  157 +++++++++++++++++++++++++++++++++
 3 files changed, 168 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-s3c64xx/mach-mini6410.c
arch/arm/mach-s3c64xx/Kconfig +10 -0
index c05ae12..bbeb4ca 100644
@@ -98,6 +98,16 @@ config MACH_ANW6410
 	help
 	  Machine support for the A&W6410
 
+config MACH_MINI6410
+	bool "MINI6410"
+	select CPU_S3C6410
+	select S3C_DEV_HSMMC
+	select S3C_DEV_HSMMC1
+	select S3C64XX_SETUP_SDHCI
+	select S3C_DEV_USB_HOST
+	help
+	  Machine support for the FriendlyARM MINI6410
+
 config MACH_REAL6410
 	bool "REAL6410"
 	select CPU_S3C6410
arch/arm/mach-s3c64xx/Makefile +1 -0
index 90221a2..4657363 100644
@@ -53,6 +53,7 @@ obj-$(CONFIG_MACH_ANW6410)	+= mach-anw6410.o
 obj-$(CONFIG_MACH_SMDK6400)	+= mach-smdk6400.o
 obj-$(CONFIG_MACH_SMDK6410)	+= mach-smdk6410.o
 obj-$(CONFIG_MACH_REAL6410)     += mach-real6410.o
+obj-$(CONFIG_MACH_MINI6410)     += mach-mini6410.o
 obj-$(CONFIG_MACH_NCP)		+= mach-ncp.o
 obj-$(CONFIG_MACH_HMT)		+= mach-hmt.o
 obj-$(CONFIG_MACH_SMARTQ)	+= mach-smartq.o
arch/arm/mach-s3c64xx/mach-mini6410.c new file +157 -0

157 lines not on this page · raw message

#19 lore raw

RE: [PATCH 5/9 v2] ARM: S3C64XX: add support for mach-mini6410

Quoted 16 lines · Darius Augulis

Add support for mini6410 board from FriendlyARM

---

Changelog since v1:
- Ben's comments about coding style fixed

 arch/arm/mach-s3c64xx/Kconfig         |   10 ++
 arch/arm/mach-s3c64xx/Makefile        |    1
 arch/arm/mach-s3c64xx/mach-mini6410.c |  157
+++++++++++++++++++++++++++++++++
 3 files changed, 168 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-s3c64xx/mach-mini6410.c

(snip)

arch/arm/mach-s3c64xx/mach-mini6410.c line 150

Quoted 5 lines
arch/arm/mach-s3c64xx/mach-mini6410.c new file +5 -0
+
+MACHINE_START(MINI6410, "MINI6410")
+	/* Maintainer: Darius Augulis <[email protected]> */
+	.phys_io	= S3C_PA_UART & 0xfff00000,
+	.io_pg_offst	= (((u32)S3C_VA_UART) >> 18) & 0xfffc,

Now, we no need to add above two members since commit 861bd81ee62a0d6759144c22909a8a3938951656 ("arm: remove machine_desc.io_pg_offst and .phys_io") from the arm tree

arch/arm/mach-s3c64xx/mach-mini6410.c line 157

Quoted 7 lines
arch/arm/mach-s3c64xx/mach-mini6410.c new file +7 -0
+	.boot_params	= S3C64XX_PA_SDRAM + 0x100,
+
+	.init_irq	= s3c6410_init_irq,
+	.map_io		= mini6410_map_io,
+	.init_machine	= mini6410_machine_init,
+	.timer		= &s3c24xx_timer,
+MACHINE_END

Others, looks ok.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#20 lore raw

PATCH 6/9 ARM: S3C64XX: add nand support for mach-mini6410

In reply to Darius Augulis

Add nand device support and mtd partition
table for mini6410

---
 arch/arm/mach-s3c64xx/Kconfig         |    1 +
 arch/arm/mach-s3c64xx/mach-mini6410.c |   41 +++++++++++++++++++++++++++++++++
 2 files changed, 42 insertions(+), 0 deletions(-)
arch/arm/mach-s3c64xx/Kconfig +1 -0
index bbeb4ca..3bbd204 100644
@@ -105,6 +105,7 @@ config MACH_MINI6410
 	select S3C_DEV_HSMMC1
 	select S3C64XX_SETUP_SDHCI
 	select S3C_DEV_USB_HOST
+	select S3C_DEV_NAND
 	help
 	  Machine support for the FriendlyARM MINI6410
 
arch/arm/mach-s3c64xx/mach-mini6410.c +41 -0

70 lines not on this page · raw message

#21 lore raw

PATCH 7/9 ARM: S3C64XX: add frame buffer support for mach-mini6410

In reply to Darius Augulis

Add support for frame buffer device for mach-mini6410. Patch also adds support for feature string parsing for mini6410. The feature string is kernel command line passed and currently lets select only LCD configuration. At the moment there is support for two LCD configurations - 4.3" and 7.0". Feature parser is mach-mini2440 based.

---
 arch/arm/mach-s3c64xx/Kconfig         |    2 +
 arch/arm/mach-s3c64xx/mach-mini6410.c |  129 +++++++++++++++++++++++++++++++++
 2 files changed, 131 insertions(+), 0 deletions(-)
arch/arm/mach-s3c64xx/Kconfig +2 -0
index 3bbd204..b514e3a 100644
@@ -106,6 +106,8 @@ config MACH_MINI6410
 	select S3C64XX_SETUP_SDHCI
 	select S3C_DEV_USB_HOST
 	select S3C_DEV_NAND
+	select S3C_DEV_FB
+	select S3C64XX_SETUP_FB_24BPP
 	help
 	  Machine support for the FriendlyARM MINI6410
 
arch/arm/mach-s3c64xx/mach-mini6410.c +129 -0

179 lines not on this page · raw message

#22 lore raw

PATCH 8/9 ARM: S3C64XX: add backlight control for mach-mini6410

In reply to Darius Augulis

Add support for platform-lcd device for mach-mini6410

---
 arch/arm/mach-s3c64xx/mach-mini6410.c |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
arch/arm/mach-s3c64xx/mach-mini6410.c +21 -0
index 331f7e0..90f1976 100644
@@ -40,6 +40,7 @@
 #include <plat/fb.h>
 #include <plat/nand.h>
 #include <plat/regs-serial.h>
+#include <video/platform_lcd.h>
 
 #define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK)
 #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB)
@@ -182,6 +183,25 @@ static struct s3c_fb_platdata mini6410_lcd_pdata __initdata = {
 	.vidcon1	= VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
 };
 
+static void mini6410_lcd_power_set(struct plat_lcd_data *pd,
+				   unsigned int power)
+{
+	if (power)
+		gpio_direction_output(S3C64XX_GPE(0), 1);
+	else
+		gpio_direction_output(S3C64XX_GPE(0), 0);
+}
+
+static struct plat_lcd_data mini6410_lcd_power_data = {
+	.set_power	= mini6410_lcd_power_set,
+};
+
+static struct platform_device mini6410_lcd_powerdev = {
+	.name			= "platform-lcd",
+	.dev.parent		= &s3c_device_fb.dev,
+	.dev.platform_data	= &mini6410_lcd_power_data,
+};
+
 static struct platform_device *mini6410_devices[] __initdata = {
 	&mini6410_device_eth,
 	&s3c_device_hsmmc0,
@@ -189,6 +209,7 @@ static struct platform_device *mini6410_devices[] __initdata = {
 	&s3c_device_ohci,
 	&s3c_device_nand,
 	&s3c_device_fb,
+	&mini6410_lcd_powerdev,
 };
 
 static void __init mini6410_map_io(void)
#23 lore raw

PATCH 9/9 ARM: S3C64XX: add touchscreen support for mach-mini6410

In reply to Darius Augulis

Add touchscreen device support for mach-mini6410

---
 arch/arm/mach-s3c64xx/Kconfig         |    2 ++
 arch/arm/mach-s3c64xx/mach-mini6410.c |   12 ++++++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
arch/arm/mach-s3c64xx/Kconfig +2 -0
index b514e3a..fe1fd30 100644
@@ -108,6 +108,8 @@ config MACH_MINI6410
 	select S3C_DEV_NAND
 	select S3C_DEV_FB
 	select S3C64XX_SETUP_FB_24BPP
+	select SAMSUNG_DEV_ADC
+	select SAMSUNG_DEV_TS
 	help
 	  Machine support for the FriendlyARM MINI6410
 
arch/arm/mach-s3c64xx/mach-mini6410.c +12 -0
index 90f1976..2c585a7 100644
@@ -35,11 +35,14 @@
 #include <mach/regs-srom.h>
 #include <mach/s3c6410.h>
 
+#include <plat/adc.h>
 #include <plat/cpu.h>
 #include <plat/devs.h>
 #include <plat/fb.h>
 #include <plat/nand.h>
 #include <plat/regs-serial.h>
+#include <plat/ts.h>
+
 #include <video/platform_lcd.h>
 
 #define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK)
@@ -202,6 +205,12 @@ static struct platform_device mini6410_lcd_powerdev = {
 	.dev.platform_data	= &mini6410_lcd_power_data,
 };
 
+static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
+	.delay			= 10000,
+	.presc			= 49,
+	.oversampling_shift	= 2,
+};
+
 static struct platform_device *mini6410_devices[] __initdata = {
 	&mini6410_device_eth,
 	&s3c_device_hsmmc0,
@@ -210,6 +219,8 @@ static struct platform_device *mini6410_devices[] __initdata = {
 	&s3c_device_nand,
 	&s3c_device_fb,
 	&mini6410_lcd_powerdev,
+	&s3c_device_adc,
+	&s3c_device_ts,
 };
 
 static void __init mini6410_map_io(void)
@@ -308,6 +319,7 @@ static void __init mini6410_machine_init(void)
 
 	s3c_nand_set_platdata(&mini6410_nand_info);
 	s3c_fb_set_platdata(&mini6410_lcd_pdata);
+	s3c24xx_ts_set_platdata(&s3c_ts_platform);
 
 	/* configure nCS1 width to 16 bits */