Skip to contentSkip to conversation

Add support for Samsung Aquila board (S5PC110 based)

PATCH Superseded Marek Szyprowski 4 participants 11 messages May 17, 2010 – May 20, 2010

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Add support for Samsung Aquila board (S5PC110 based)

Hello,

This patch series add basic support for Samsung Aquila board. The board is based on Samsung S5PC110 SoC. This patch series also add platform device helpers for i2c, fb and hsmmc drivers.

The patches are prepared with assumption that my previous patch series 'Common plat-s5p fixes' has been already applied, as well as the patch 'ARM: S5PV210: Add S5PV210 GPIO support.'

Changes since v1:
- removed custom gpiolib implementation in favour of the GPIOlib patch provided by Pannaga Bhushan,
- adjusted hsmmc setup code for 'sclk_mmc' clock names

This patch series includes:

[PATCH 1/7] ARM: S5PV210: add support for software reset
[PATCH 2/7] ARM: S5PV210: add Aquila board
[PATCH 3/7] ARM: Samsung: move common framebuffer regs to common platform directory [PATCH 4/7] ARM: S5PV210: add framebuffer platform helpers for s5pv210 based machines [PATCH 5/7] ARM: S5PV210: add support for s3c-fb driver on Aquila machine [PATCH 6/7] ARM: S5PV210: add common I2C device helpers
[PATCH 7/7] ARM: S5PV210: add common HSMMC device helpers

#1 lore raw

PATCH 1/7 ARM: S5PV210: add support for software reset

Add missing call for software reset (system reboot).

---
 arch/arm/mach-s5pv210/include/mach/regs-clock.h |    2 ++
 arch/arm/mach-s5pv210/include/mach/system.h     |    7 ++++++-
 2 files changed, 8 insertions(+), 1 deletions(-)
arch/arm/mach-s5pv210/include/mach/regs-clock.h +2 -0
index e56e0e4..40dd24f 100644
@@ -91,6 +91,8 @@
 #define S5P_CLKDIV0_PCLK66_MASK		(0x7 << S5P_CLKDIV0_PCLK66_SHIFT)
 
 /* Registers related to power management */
+#define S5P_SWRESET		S5P_CLKREG(0x2000)
+
 #define S5P_PWR_CFG		S5P_CLKREG(0xC000)
 #define S5P_EINT_WAKEUP_MASK	S5P_CLKREG(0xC004)
 #define S5P_WAKEUP_MASK 	S5P_CLKREG(0xC008)
arch/arm/mach-s5pv210/include/mach/system.h +6 -1
index 1ca04d5..ba39203 100644
@@ -13,6 +13,10 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H __FILE__
 
+#include <linux/io.h>
+#include <mach/map.h>
+#include <mach/regs-clock.h>
+
 static void arch_idle(void)
 {
 	/* nothing here yet */
@@ -20,7 +24,8 @@ static void arch_idle(void)
 
 static void arch_reset(char mode, const char *cmd)
 {
-	/* nothing here yet */
+	__raw_writel(0x1, S5P_SWRESET);
+	return;
 }
 
 #endif /* __ASM_ARCH_SYSTEM_H */
Signature · 1 line
1.6.4
#2 lore raw

PATCH 1/7 ARM: S5PV210: add support for software reset

Quoted 2 lines · Marek Szyprowski

Add missing call for software reset (system reboot).

Yes, missed.

But Samsung SoC hardware engineer recommends to use the reset of watchdog instead of software reset by restriction of Hardware environment.

Review

Quoted 8 lines
---
 arch/arm/mach-s5pv210/include/mach/regs-clock.h |    2 ++
 arch/arm/mach-s5pv210/include/mach/system.h     |    7 ++++++-
 2 files changed, 8 insertions(+), 1 deletions(-)
(quoted diff) +0 -0

b/arch/arm/mach-

Quoted 31 lines

s5pv210/include/mach/regs-clock.h
index e56e0e4..40dd24f 100644

arch/arm/mach-s5pv210/include/mach/regs-clock.h +2 -0
@@ -91,6 +91,8 @@
 #define S5P_CLKDIV0_PCLK66_MASK		(0x7 <<
 S5P_CLKDIV0_PCLK66_SHIFT)
 
 /* Registers related to power management */
+#define S5P_SWRESET		S5P_CLKREG(0x2000)
+
 #define S5P_PWR_CFG		S5P_CLKREG(0xC000)
 #define S5P_EINT_WAKEUP_MASK	S5P_CLKREG(0xC004)

#define S5P_WAKEUP_MASK S5P_CLKREG(0xC008)

arch/arm/mach- renamed from arch/arm/mach-s5pv210/include/mach/system.h +0 -0

s5pv210/include/mach/system.h
index 1ca04d5..ba39203 100644

arch/arm/mach-s5pv210/include/mach/system.h +4 -0
@@ -13,6 +13,10 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H __FILE__
 
+#include <linux/io.h>
+#include <mach/map.h>
+#include <mach/regs-clock.h>
+
 static void arch_idle(void)
 {
 	/* nothing here yet */

arch/arm/mach-s5pv210/include/mach/system.h static void arch_idle(void)

Quoted 10 lines
arch/arm/mach-s5pv210/include/mach/system.h +2 -2
@@ -20,7 +24,8 @@ static void arch_idle(void)
 
 static void arch_reset(char mode, const char *cmd)
 {
-	/* nothing here yet */
+	__raw_writel(0x1, S5P_SWRESET);
+	return;
 }
 
 #endif /* __ASM_ARCH_SYSTEM_H */
--

Thanks.

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

#3 lore raw

PATCH 1/7 ARM: S5PV210: add support for software reset

Hi,

Quoted 3 lines

But Samsung SoC hardware engineer recommends to use the reset of watchdog instead of software reset by restriction of Hardware environment.

that's optional method for each board. If software reset doesn't work. we can provide the watchdog reset additionally
.

In our case we use the watchdog reset for other purpose so we don't want to use watchdog reset at normal reset condition.

Thank you,
Kyungmin Park

#4 lore raw

PATCH 2/7 ARM: S5PV210: add Aquila board

In reply to Marek Szyprowski

Add basic support for Samsung Aquila board. This board is based on S5PC110 SoC.

---
 arch/arm/mach-s5pv210/Kconfig       |   12 ++--
 arch/arm/mach-s5pv210/Makefile      |    1 +
 arch/arm/mach-s5pv210/mach-aquila.c |  100 +++++++++++++++++++++++++++++++++++
 3 files changed, 107 insertions(+), 6 deletions(-)
 create mode 100644 arch/arm/mach-s5pv210/mach-aquila.c
arch/arm/mach-s5pv210/Kconfig +6 -6
index af33a1a..c42bcba 100644
@@ -15,11 +15,6 @@ config CPU_S5PV210
 	help
 	  Enable S5PV210 CPU support
 
-choice
-	prompt "Select machine type"
-	depends on ARCH_S5PV210
-	default MACH_SMDKV210
-
 config MACH_SMDKV210
 	bool "SMDKV210"
 	select CPU_S5PV210
@@ -35,6 +30,11 @@ config MACH_SMDKC110
 	  Machine support for Samsung SMDKC110
 	  S5PC110(MCP) is one of package option of S5PV210
 
-endchoice
+config MACH_AQUILA
+	bool "Samsung Aquila"
+	select CPU_S5PV210
+	select ARCH_SPARSEMEM_ENABLE
+	help
+	  Machine support for the Samsung Aquila target based on S5PC110 SoC
 
 endif
arch/arm/mach-s5pv210/Makefile +1 -0
index 370aac6..0bb1680 100644
@@ -19,3 +19,4 @@ obj-$(CONFIG_CPU_S5PV210)	+= setup-i2c0.o
 
 obj-$(CONFIG_MACH_SMDKV210)	+= mach-smdkv210.o
 obj-$(CONFIG_MACH_SMDKC110)	+= mach-smdkc110.o
+obj-$(CONFIG_MACH_AQUILA)	+= mach-aquila.o
arch/arm/mach-s5pv210/mach-aquila.c new file +100 -0

100 lines not on this page · raw message

Signature · 1 line
1.6.4
#5 lore raw

PATCH 2/7 ARM: S5PV210: add Aquila board

Quoted 17 lines · Marek Szyprowski

Add basic support for Samsung Aquila board. This board is based on S5PC110 SoC.

---
 arch/arm/mach-s5pv210/Kconfig       |   12 ++--
 arch/arm/mach-s5pv210/Makefile      |    1 +
 arch/arm/mach-s5pv210/mach-aquila.c |  100 +++++++++++++++++++++++++++++++++++
 3 files changed, 107 insertions(+), 6 deletions(-)
 create mode 100644 arch/arm/mach-s5pv210/mach-aquila.c
arch/arm/mach-s5pv210/Kconfig +0 -0
index af33a1a..c42bcba 100644

arch/arm/mach-s5pv210/Kconfig config CPU_S5PV210 · line 22

Quoted 8 lines
arch/arm/mach-s5pv210/Kconfig +0 -5
@@ -15,11 +15,6 @@ config CPU_S5PV210
 	help
 	  Enable S5PV210 CPU support
 
-choice
-	prompt "Select machine type"
-	depends on ARCH_S5PV210
-	default MACH_SMDKV210
-

hmm, didn't notice that little gem in there. will build seperate patch and then apply this one.

Quoted 138 lines
arch/arm/mach-s5pv210/Kconfig +6 -1
 config MACH_SMDKV210
 	bool "SMDKV210"
 	select CPU_S5PV210
@@ -35,6 +30,11 @@ config MACH_SMDKC110
 	  Machine support for Samsung SMDKC110
 	  S5PC110(MCP) is one of package option of S5PV210
 
-endchoice
+config MACH_AQUILA
+	bool "Samsung Aquila"
+	select CPU_S5PV210
+	select ARCH_SPARSEMEM_ENABLE
+	help
+	  Machine support for the Samsung Aquila target based on S5PC110 SoC
 
 endif
arch/arm/mach-s5pv210/Makefile +1 -0
index 370aac6..0bb1680 100644
@@ -19,3 +19,4 @@ obj-$(CONFIG_CPU_S5PV210)	+= setup-i2c0.o
 
 obj-$(CONFIG_MACH_SMDKV210)	+= mach-smdkv210.o
 obj-$(CONFIG_MACH_SMDKC110)	+= mach-smdkc110.o
+obj-$(CONFIG_MACH_AQUILA)	+= mach-aquila.o
arch/arm/mach-s5pv210/mach-aquila.c new file +100 -0
new file mode 100644
index 0000000..6a1db39
@@ -0,0 +1,100 @@
+/* linux/arch/arm/mach-s5pv210/mach-aquila.c
+ *
+ * Copyright (c) 2010 Samsung Electronics Co., Ltd.
+ *		http://www.samsung.com/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/init.h>
+#include <linux/serial_core.h>
+
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+#include <asm/setup.h>
+#include <asm/mach-types.h>
+
+#include <mach/map.h>
+#include <mach/regs-clock.h>
+
+#include <plat/regs-serial.h>
+#include <plat/s5pv210.h>
+#include <plat/devs.h>
+#include <plat/cpu.h>
+
+/* Following are default values for UCON, ULCON and UFCON UART registers */
+#define S5PV210_UCON_DEFAULT	(S3C2410_UCON_TXILEVEL |	\
+				 S3C2410_UCON_RXILEVEL |	\
+				 S3C2410_UCON_TXIRQMODE |	\
+				 S3C2410_UCON_RXIRQMODE |	\
+				 S3C2410_UCON_RXFIFO_TOI |	\
+				 S3C2443_UCON_RXERR_IRQEN)
+
+#define S5PV210_ULCON_DEFAULT	S3C2410_LCON_CS8
+
+#define S5PV210_UFCON_DEFAULT	(S3C2410_UFCON_FIFOMODE |	\
+				 S5PV210_UFCON_TXTRIG4 |	\
+				 S5PV210_UFCON_RXTRIG4)
+
+static struct s3c2410_uartcfg smdkv210_uartcfgs[] __initdata = {
+	[0] = {
+		.hwport		= 0,
+		.flags		= 0,
+		.ucon		= S5PV210_UCON_DEFAULT,
+		.ulcon		= S5PV210_ULCON_DEFAULT,
+		.ufcon		= S5PV210_UFCON_DEFAULT,
+	},
+	[1] = {
+		.hwport		= 1,
+		.flags		= 0,
+		.ucon		= S5PV210_UCON_DEFAULT,
+		.ulcon		= S5PV210_ULCON_DEFAULT,
+		.ufcon		= S5PV210_UFCON_DEFAULT,
+	},
+	[2] = {
+		.hwport		= 2,
+		.flags		= 0,
+		.ucon		= S5PV210_UCON_DEFAULT,
+		.ulcon		= S5PV210_ULCON_DEFAULT,
+		.ufcon		= S5PV210_UFCON_DEFAULT,
+	},
+	[3] = {
+		.hwport		= 3,
+		.flags		= 0,
+		.ucon		= S5PV210_UCON_DEFAULT,
+		.ulcon		= S5PV210_ULCON_DEFAULT,
+		.ufcon		= S5PV210_UFCON_DEFAULT,
+	},
+};
+
+static struct platform_device *aquila_devices[] __initdata = {
+};
+
+static void __init aquila_map_io(void)
+{
+	s5p_init_io(NULL, 0, S5P_VA_CHIPID);
+	s3c24xx_init_clocks(24000000);
+	s3c24xx_init_uarts(smdkv210_uartcfgs, ARRAY_SIZE(smdkv210_uartcfgs));
+}
+
+static void __init aquila_machine_init(void)
+{
+	platform_add_devices(aquila_devices, ARRAY_SIZE(aquila_devices));
+}
+
+MACHINE_START(AQUILA, "Aquila")
+	/* Maintainers:
+	   Marek Szyprowski <[email protected]>
+	   Kyungmin Park <[email protected]> */
+	.phys_io	= S3C_PA_UART & 0xfff00000,
+	.io_pg_offst	= (((u32)S3C_VA_UART) >> 18) & 0xfffc,
+	.boot_params	= S5P_PA_SDRAM + 0x100,
+	.init_irq	= s5pv210_init_irq,
+	.map_io		= aquila_map_io,
+	.init_machine	= aquila_machine_init,
+	.timer		= &s3c24xx_timer,
+MACHINE_END
Signature · 6 lines
1.6.4

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 5 lines
-- 
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.
#6 lore raw

PATCH 3/7 ARM: Samsung: move common framebuffer regs to common platform directory

In reply to Marek Szyprowski

From: Pawel Osciak <[email protected]>

The framebuffer register blocks on S5PC100 and S5PV210/S5PC110 differ only slightly. This patch extracts all register definitions that are common to S5PC100 and S5PC110 into plat-samsung/plat/regs-fb-v5.h and adds a new file with C110-specific register definitions to the mach-s5pv210/include/mach directory.

---
 arch/arm/mach-s5pc100/include/mach/regs-fb.h    |  130 +--------------------
 arch/arm/mach-s5pv210/include/mach/regs-fb.h    |   91 +++++++++++++++
 arch/arm/plat-samsung/include/plat/regs-fb-v5.h |  138 +++++++++++++++++++++++
 3 files changed, 236 insertions(+), 123 deletions(-)
 create mode 100644 arch/arm/mach-s5pv210/include/mach/regs-fb.h
 create mode 100644 arch/arm/plat-samsung/include/plat/regs-fb-v5.h
arch/arm/mach-s5pc100/include/mach/regs-fb.h +7 -123
index 1732cd2..c5d75c5 100644
@@ -3,137 +3,21 @@
  * Copyright 2009 Samsung Electronics Co.
  *   Pawel Osciak <[email protected]>
  *
- * Framebuffer register definitions for Samsung S5PC100.
+ * Machine-specific framebuffer definitions for Samsung S5PC100.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
-*/
-
-#ifndef __ASM_ARCH_REGS_FB_H
-#define __ASM_ARCH_REGS_FB_H __FILE__
-
-#include <plat/regs-fb-v4.h>
-
-/* VP1 interface timing control */
-#define VP1CON0						(0x118)
-#define VP1_RATECON_EN					(1 << 31)
-#define VP1_CLKRATE_MASK				(0xff)
-
-#define VP1CON1						(0x11c)
-#define VP1_VTREGCON_EN					(1 << 31)
-#define VP1_VBPD_MASK					(0xfff)
-#define VP1_VBPD_SHIFT					(16)
-
-
-#define WPALCON_H					(0x19c)
-#define WPALCON_L					(0x1a0)
-
-/* Pallete contro for WPAL0 and WPAL1 is the same as in S3C64xx, but
- * different for WPAL2-4
- */
-/* In WPALCON_L (aka WPALCON) */
-#define WPALCON_W1PAL_32BPP_A888			(0x7 << 3)
-#define WPALCON_W0PAL_32BPP_A888			(0x7 << 0)
-
-/* To set W2PAL-W4PAL consist of one bit from WPALCON_L and two from WPALCON_H,
- * e.g. W2PAL[2..0] is made of (WPALCON_H[10..9], WPALCON_L[6]).
- */
-#define WPALCON_L_WxPAL_L_MASK				(0x1)
-#define WPALCON_L_W2PAL_L_SHIFT				(6)
-#define WPALCON_L_W3PAL_L_SHIFT				(7)
-#define WPALCON_L_W4PAL_L_SHIFT				(8)
-
-#define WPALCON_L_WxPAL_H_MASK				(0x3)
-#define WPALCON_H_W2PAL_H_SHIFT				(9)
-#define WPALCON_H_W3PAL_H_SHIFT				(13)
-#define WPALCON_H_W4PAL_H_SHIFT				(17)
-
-/* Per-window alpha value registers */
-/* For window 0 8-bit alpha values are in VIDW0ALPHAx,
- * for windows 1-4 alpha values consist of two parts, the 4 low bits are
- * taken from VIDWxALPHAx and 4 high bits are from VIDOSDxC,
- * e.g. WIN1_ALPHA0_B[7..0] = (VIDOSD1C[3..0], VIDW1ALPHA0[3..0])
- */
-#define VIDWxALPHA0(_win)				(0x200 + (_win * 8))
-#define VIDWxALPHA1(_win)				(0x204 + (_win * 8))
-
-/* Only for window 0 in VIDW0ALPHAx. */
-#define VIDW0ALPHAx_R(_x)				((_x) << 16)
-#define VIDW0ALPHAx_R_MASK				(0xff << 16)
-#define VIDW0ALPHAx_R_SHIFT				(16)
-#define VIDW0ALPHAx_G(_x)				((_x) << 8)
-#define VIDW0ALPHAx_G_MASK				(0xff << 8)
-#define VIDW0ALPHAx_G_SHIFT				(8)
-#define VIDW0ALPHAx_B(_x)				((_x) << 0)
-#define VIDW0ALPHAx_B_MASK				(0xff << 0)
-#define VIDW0ALPHAx_B_SHIFT				(0)
-
-/* Low 4 bits of alpha0-1 for windows 1-4 */
-#define VIDW14ALPHAx_R_L(_x)				((_x) << 16)
-#define VIDW14ALPHAx_R_L_MASK				(0xf << 16)
-#define VIDW14ALPHAx_R_L_SHIFT				(16)
-#define VIDW14ALPHAx_G_L(_x)				((_x) << 8)
-#define VIDW14ALPHAx_G_L_MASK				(0xf << 8)
-#define VIDW14ALPHAx_G_L_SHIFT				(8)
-#define VIDW14ALPHAx_B_L(_x)				((_x) << 0)
-#define VIDW14ALPHAx_B_L_MASK				(0xf << 0)
-#define VIDW14ALPHAx_B_L_SHIFT				(0)
-
-
-/* Per-window blending equation control registers */
-#define BLENDEQx(_win)					(0x244 + ((_win) * 4))
-#define BLENDEQ1					(0x244)
-#define BLENDEQ2					(0x248)
-#define BLENDEQ3					(0x24c)
-#define BLENDEQ4					(0x250)
-
-#define BLENDEQx_Q_FUNC(_x)				((_x) << 18)
-#define BLENDEQx_Q_FUNC_MASK				(0xf << 18)
-#define BLENDEQx_P_FUNC(_x)				((_x) << 12)
-#define BLENDEQx_P_FUNC_MASK				(0xf << 12)
-#define BLENDEQx_B_FUNC(_x)				((_x) << 6)
-#define BLENDEQx_B_FUNC_MASK				(0xf << 6)
-#define BLENDEQx_A_FUNC(_x)				((_x) << 0)
-#define BLENDEQx_A_FUNC_MASK				(0xf << 0)
-
-#define BLENDCON					(0x260)
-#define BLENDCON_8BIT_ALPHA				(1 << 0)
-
-/* Per-window palette base addresses (start of palette memory).
- * Each window palette area consists of 256 32-bit entries.
- * START is the first address (entry 0th), END is the address of 255th entry.
  */
-#define WIN0_PAL_BASE					(0x2400)
-#define WIN0_PAL_END					(0x27fc)
-#define WIN1_PAL_BASE					(0x2800)
-#define WIN1_PAL_END					(0x2bfc)
-#define WIN2_PAL_BASE					(0x2c00)
-#define WIN2_PAL_END					(0x2ffc)
-#define WIN3_PAL_BASE					(0x3000)
-#define WIN3_PAL_END					(0x33fc)
-#define WIN4_PAL_BASE					(0x3400)
-#define WIN4_PAL_END					(0x37fc)
 
-#define WIN0_PAL(_entry)			(WIN0_PAL_BASE + ((_entry) * 4))
-#define WIN1_PAL(_entry)			(WIN1_PAL_BASE + ((_entry) * 4))
-#define WIN2_PAL(_entry)			(WIN2_PAL_BASE + ((_entry) * 4))
-#define WIN3_PAL(_entry)			(WIN3_PAL_BASE + ((_entry) * 4))
-#define WIN4_PAL(_entry)			(WIN4_PAL_BASE + ((_entry) * 4))
+#ifndef __ASM_ARCH_MACH_REGS_FB_H
+#define __ASM_ARCH_MACH_REGS_FB_H __FILE__
 
-static inline unsigned int s3c_fb_pal_reg(unsigned int window, int reg)
-{
-	switch (window) {
-	case 0: return WIN0_PAL(reg);
-	case 1: return WIN1_PAL(reg);
-	case 2: return WIN2_PAL(reg);
-	case 3: return WIN3_PAL(reg);
-	case 4: return WIN4_PAL(reg);
-	}
+#include <plat/regs-fb-v5.h>
 
-	BUG();
-}
+#define PRTCON						(0xc)
+#define PRTCON_PROTECT					(1 << 11)
 
 
-#endif /* __ASM_ARCH_REGS_FB_H */
+#endif /* __ASM_ARCH_MACH_REGS_FB_H */
 
arch/arm/mach-s5pv210/include/mach/regs-fb.h new file +91 -0

91 lines not on this page · raw message

arch/arm/plat-samsung/include/plat/regs-fb-v5.h new file +138 -0

138 lines not on this page · raw message

Signature · 1 line
1.6.4
#7 lore raw

PATCH 4/7 ARM: S5PV210: add framebuffer platform helpers for s5pv210 based machines

In reply to Marek Szyprowski

This patch adds common framebuffer device helpers and register defines for S5PV210 based machines.

---
 arch/arm/mach-s5pv210/Kconfig                   |    5 ++
 arch/arm/mach-s5pv210/Makefile                  |    4 ++
 arch/arm/mach-s5pv210/include/mach/irqs.h       |    5 ++
 arch/arm/mach-s5pv210/include/mach/map.h        |    3 +
 arch/arm/mach-s5pv210/include/mach/regs-clock.h |    1 +
 arch/arm/mach-s5pv210/setup-fb-24bpp.c          |   62 +++++++++++++++++++++++
 arch/arm/plat-samsung/include/plat/fb.h         |    7 +++
 7 files changed, 87 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-s5pv210/setup-fb-24bpp.c
arch/arm/mach-s5pv210/Kconfig +5 -0
index c42bcba..3717b52 100644
@@ -15,6 +15,11 @@ config CPU_S5PV210
 	help
 	  Enable S5PV210 CPU support
 
+config S5PV210_SETUP_FB_24BPP
+	bool
+	help
+          Common setup code for S5PV210 with an 24bpp RGB display helper.
+
 config MACH_SMDKV210
 	bool "SMDKV210"
 	select CPU_S5PV210
arch/arm/mach-s5pv210/Makefile +4 -0
index 0bb1680..a2707a8 100644
@@ -15,6 +15,10 @@ obj-				:=
 obj-$(CONFIG_CPU_S5PV210)	+= cpu.o init.o clock.o gpiolib.o
 obj-$(CONFIG_CPU_S5PV210)	+= setup-i2c0.o
 
+# Helper and device support
+
+obj-$(CONFIG_S5PV210_SETUP_FB_24BPP)	+= setup-fb-24bpp.o
+
 # machine support
 
 obj-$(CONFIG_MACH_SMDKV210)	+= mach-smdkv210.o
arch/arm/mach-s5pv210/include/mach/irqs.h +5 -0
index 62c5175..ee6e07b 100644
@@ -143,4 +143,9 @@
 
 #define NR_IRQS 		(IRQ_EINT(31) + 1)
 
+/* Compatibility */
+#define IRQ_LCD_FIFO		IRQ_LCD0
+#define IRQ_LCD_VSYNC		IRQ_LCD1
+#define IRQ_LCD_SYSTEM		IRQ_LCD2
+
 #endif /* ASM_ARCH_IRQS_H */
arch/arm/mach-s5pv210/include/mach/map.h +3 -0
index c22694c..5903056 100644
@@ -43,6 +43,8 @@
 
 #define S5PV210_PA_SROMC	(0xE8000000)
 
+#define S5PV210_PA_FB		(0xF8000000)
+
 #define S5PV210_PA_VIC0		(0xF2000000)
 #define S5P_PA_VIC0		S5PV210_PA_VIC0
 
@@ -61,5 +63,6 @@
 /* compatibiltiy defines. */
 #define S3C_PA_UART		S5PV210_PA_UART
 #define S3C_PA_IIC		S5PV210_PA_IIC0
+#define S3C_PA_FB		S5PV210_PA_FB
 
 #endif /* __ASM_ARCH_MAP_H */
arch/arm/mach-s5pv210/include/mach/regs-clock.h +1 -0
index 40dd24f..0a3d7ad 100644
@@ -128,6 +128,7 @@
 
 #define S5P_RST_STAT		S5P_CLKREG(0xA000)
 #define S5P_OSC_CON		S5P_CLKREG(0x8000)
+#define S5P_MDNIE_SEL		S5P_CLKREG(0x7008)
 #define S5P_MIPI_PHY_CON0	S5P_CLKREG(0x7200)
 #define S5P_MIPI_PHY_CON1	S5P_CLKREG(0x7204)
 #define S5P_MIPI_CONTROL	S5P_CLKREG(0xE814)
arch/arm/mach-s5pv210/setup-fb-24bpp.c new file +62 -0

62 lines not on this page · raw message

arch/arm/plat-samsung/include/plat/fb.h +7 -0
index ffc01a7..3b30d7b 100644
@@ -77,4 +77,11 @@ extern void s3c64xx_fb_gpio_setup_24bpp(void);
  */
 extern void s5pc100_fb_gpio_setup_24bpp(void);
 
+/**
+ * s5pv210_fb_gpio_setup_24bpp() - S5PV210/S5PC110 setup function for 24bpp LCD
+ *
+ * Initialise the GPIO for an 24bpp LCD display on the RGB interface.
+ */
+extern void s5pv210_fb_gpio_setup_24bpp(void);
+
 #endif /* __PLAT_S3C_FB_H */
Signature · 1 line
1.6.4
#8 lore raw

PATCH 5/7 ARM: S5PV210: add support for s3c-fb driver on Aquila machine

In reply to Marek Szyprowski

This patch adds required platform definitions to enable s3c-fb driver. Two framebuffer windows in 480x800x16bpp mode are defined.

---
 arch/arm/mach-s5pv210/Kconfig       |    2 +
 arch/arm/mach-s5pv210/mach-aquila.c |   49 +++++++++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+), 0 deletions(-)
arch/arm/mach-s5pv210/Kconfig +2 -0
index 3717b52..a7adc24 100644
@@ -39,6 +39,8 @@ config MACH_AQUILA
 	bool "Samsung Aquila"
 	select CPU_S5PV210
 	select ARCH_SPARSEMEM_ENABLE
+	select S5PV210_SETUP_FB_24BPP
+	select S3C_DEV_FB
 	help
 	  Machine support for the Samsung Aquila target based on S5PC110 SoC
 
arch/arm/mach-s5pv210/mach-aquila.c +49 -0

79 lines not on this page · raw message

Signature · 1 line
1.6.4
#9 lore raw

PATCH 6/7 ARM: S5PV210: add common I2C device helpers

In reply to Marek Szyprowski

This patch adds I2C platform helpers required by s3c2440-i2c driver.

---
 arch/arm/mach-s5pv210/Kconfig                 |   10 ++++
 arch/arm/mach-s5pv210/Makefile                |    2 +
 arch/arm/mach-s5pv210/cpu.c                   |    6 ++
 arch/arm/mach-s5pv210/include/mach/map.h      |    4 ++
 arch/arm/mach-s5pv210/setup-i2c1.c            |   30 +++++++++++
 arch/arm/mach-s5pv210/setup-i2c2.c            |   31 +++++++++++
 arch/arm/plat-samsung/Kconfig                 |    5 ++
 arch/arm/plat-samsung/Makefile                |    1 +
 arch/arm/plat-samsung/dev-i2c2.c              |   69 +++++++++++++++++++++++++
 arch/arm/plat-samsung/include/plat/devs.h     |    1 +
 arch/arm/plat-samsung/include/plat/iic-core.h |    7 +++
 arch/arm/plat-samsung/include/plat/iic.h      |    2 +
 12 files changed, 168 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-s5pv210/setup-i2c1.c
 create mode 100644 arch/arm/mach-s5pv210/setup-i2c2.c
 create mode 100644 arch/arm/plat-samsung/dev-i2c2.c
arch/arm/mach-s5pv210/Kconfig +10 -0
index a7adc24..8b5975a 100644
@@ -15,6 +15,16 @@ config CPU_S5PV210
 	help
 	  Enable S5PV210 CPU support
 
+config S5PV210_SETUP_I2C1
+	bool
+	help
+	  Common setup code for i2c bus 1.
+
+config S5PV210_SETUP_I2C2
+	bool
+	help
+	  Common setup code for i2c bus 2.
+
 config S5PV210_SETUP_FB_24BPP
 	bool
 	help
arch/arm/mach-s5pv210/Makefile +2 -0
index a2707a8..ea7119a 100644
@@ -18,6 +18,8 @@ obj-$(CONFIG_CPU_S5PV210)	+= setup-i2c0.o
 # Helper and device support
 
 obj-$(CONFIG_S5PV210_SETUP_FB_24BPP)	+= setup-fb-24bpp.o
+obj-$(CONFIG_S5PV210_SETUP_I2C1) 	+= setup-i2c1.o
+obj-$(CONFIG_S5PV210_SETUP_I2C2) 	+= setup-i2c2.o
 
 # machine support
 
arch/arm/mach-s5pv210/cpu.c +6 -0
index 2b776eb..2d4a3d2 100644
@@ -32,6 +32,7 @@
 #include <plat/devs.h>
 #include <plat/clock.h>
 #include <plat/s5pv210.h>
+#include <plat/iic-core.h>
 
 /* Initial IO mappings */
 
@@ -75,6 +76,11 @@ static void s5pv210_idle(void)
 void __init s5pv210_map_io(void)
 {
 	iotable_init(s5pv210_iodesc, ARRAY_SIZE(s5pv210_iodesc));
+
+	/* the i2c devices are directly compatible with s3c2440 */
+	s3c_i2c0_setname("s3c2440-i2c");
+	s3c_i2c1_setname("s3c2440-i2c");
+	s3c_i2c2_setname("s3c2440-i2c");
 }
 
 void __init s5pv210_init_clocks(int xtal)
arch/arm/mach-s5pv210/include/mach/map.h +4 -0
index 5903056..36bc608 100644
@@ -26,6 +26,8 @@
 #define S5P_PA_GPIO		S5PV210_PA_GPIO
 
 #define S5PV210_PA_IIC0		(0xE1800000)
+#define S5PV210_PA_IIC1		(0xFAB00000)
+#define S5PV210_PA_IIC2		(0xE1A00000)
 
 #define S5PV210_PA_TIMER	(0xE2500000)
 #define S5P_PA_TIMER		S5PV210_PA_TIMER
@@ -63,6 +65,8 @@
 /* compatibiltiy defines. */
 #define S3C_PA_UART		S5PV210_PA_UART
 #define S3C_PA_IIC		S5PV210_PA_IIC0
+#define S3C_PA_IIC1		S5PV210_PA_IIC1
+#define S3C_PA_IIC2		S5PV210_PA_IIC2
 #define S3C_PA_FB		S5PV210_PA_FB
 
 #endif /* __ASM_ARCH_MAP_H */
arch/arm/mach-s5pv210/setup-i2c1.c new file +30 -0
new file mode 100644
index 0000000..3e9ed3b
@@ -0,0 +1,30 @@
+/*
+ * linux/arch/arm/mach-s5pv210/setup-i2c1.c
+ *
+ * Copyright 2009 Samsung Electronics Co.
+ *
+ * Base S5PV210 I2C bus 1 gpio configuration
+ *
+ * Based on mach-s3c64xx/setup-i2c1.c
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+
+struct platform_device; /* don't need the contents */
+
+#include <mach/gpio.h>
+#include <plat/iic.h>
+#include <plat/gpio-cfg.h>
+
+void s3c_i2c1_cfg_gpio(struct platform_device *dev)
+{
+	s3c_gpio_cfgpin(S5PV210_GPD1(2), S3C_GPIO_SFN(2));
+	s3c_gpio_setpull(S5PV210_GPD1(2), S3C_GPIO_PULL_UP);
+	s3c_gpio_cfgpin(S5PV210_GPD1(3), S3C_GPIO_SFN(2));
+	s3c_gpio_setpull(S5PV210_GPD1(3), S3C_GPIO_PULL_UP);
+}
arch/arm/mach-s5pv210/setup-i2c2.c new file +31 -0
new file mode 100644
index 0000000..6cdbbdc
@@ -0,0 +1,31 @@
+/*
+ * linux/arch/arm/mach-s5pv210/setup-i2c2.c
+ *
+ * Copyright (C) 2009 Samsung Electronics Co.Ltd
+ *
+ * Base S5PV210 I2C bus 2 gpio configuration
+ *
+ * Based on mach-s3c64xx/setup-i2c1.c
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+
+struct platform_device; /* don't need the contents */
+
+#include <mach/gpio.h>
+#include <plat/iic.h>
+#include <plat/gpio-cfg.h>
+
+void s3c_i2c2_cfg_gpio(struct platform_device *dev)
+{
+	s3c_gpio_cfgpin(S5PV210_GPD1(4), S3C_GPIO_SFN(2));
+	s3c_gpio_setpull(S5PV210_GPD1(4), S3C_GPIO_PULL_UP);
+	s3c_gpio_cfgpin(S5PV210_GPD1(5), S3C_GPIO_SFN(2));
+	s3c_gpio_setpull(S5PV210_GPD1(5), S3C_GPIO_PULL_UP);
+}
arch/arm/plat-samsung/Kconfig +5 -0
index 6ccfd60..44f7da1 100644
@@ -170,6 +170,11 @@ config S3C_DEV_I2C1
 	help
 	  Compile in platform device definitions for I2C channel 1
 
+config S3C_DEV_I2C2
+	bool
+	help
+	  Compile in platform device definitions for I2C channel 2
+
 config S3C_DEV_FB
 	bool
 	help
arch/arm/plat-samsung/Makefile +1 -0
index 0ad820a..45fad33 100644
@@ -36,6 +36,7 @@ obj-$(CONFIG_S3C_DEV_HSMMC2)	+= dev-hsmmc2.o
 obj-$(CONFIG_S3C_DEV_HWMON)	+= dev-hwmon.o
 obj-y				+= dev-i2c0.o
 obj-$(CONFIG_S3C_DEV_I2C1)	+= dev-i2c1.o
+obj-$(CONFIG_S3C_DEV_I2C2)	+= dev-i2c2.o
 obj-$(CONFIG_S3C_DEV_FB)	+= dev-fb.o
 obj-y				+= dev-uart.o
 obj-$(CONFIG_S3C_DEV_USB_HOST)	+= dev-usb.o
arch/arm/plat-samsung/dev-i2c2.c new file +69 -0

69 lines not on this page · raw message

arch/arm/plat-samsung/include/plat/devs.h +1 -0
index 796d242..faa3e8f 100644
@@ -45,6 +45,7 @@ extern struct platform_device s3c_device_lcd;
 extern struct platform_device s3c_device_wdt;
 extern struct platform_device s3c_device_i2c0;
 extern struct platform_device s3c_device_i2c1;
+extern struct platform_device s3c_device_i2c2;
 extern struct platform_device s3c_device_rtc;
 extern struct platform_device s3c_device_adc;
 extern struct platform_device s3c_device_sdi;
arch/arm/plat-samsung/include/plat/iic-core.h +7 -0
index 36397ca..f182669 100644
@@ -32,4 +32,11 @@ static inline void s3c_i2c1_setname(char *name)
 #endif
 }
 
+static inline void s3c_i2c2_setname(char *name)
+{
+#ifdef CONFIG_S3C_DEV_I2C2
+	s3c_device_i2c2.name = name;
+#endif
+}
+
 #endif /* __ASM_ARCH_IIC_H */
arch/arm/plat-samsung/include/plat/iic.h +2 -0
index 3083df0..133308b 100644
@@ -54,9 +54,11 @@ struct s3c2410_platform_i2c {
  */
 extern void s3c_i2c0_set_platdata(struct s3c2410_platform_i2c *i2c);
 extern void s3c_i2c1_set_platdata(struct s3c2410_platform_i2c *i2c);
+extern void s3c_i2c2_set_platdata(struct s3c2410_platform_i2c *i2c);
 
 /* defined by architecture to configure gpio */
 extern void s3c_i2c0_cfg_gpio(struct platform_device *dev);
 extern void s3c_i2c1_cfg_gpio(struct platform_device *dev);
+extern void s3c_i2c2_cfg_gpio(struct platform_device *dev);
 
 #endif /* __ASM_ARCH_IIC_H */
Signature · 1 line
1.6.4
#10 lore raw

PATCH 7/7 ARM: S5PV210: add common HSMMC device helpers

In reply to Marek Szyprowski

This patch adds sdhci platform helpers required by sdhci-s3c driver.

---
 arch/arm/mach-s5pv210/Kconfig              |   11 +++
 arch/arm/mach-s5pv210/Makefile             |    2 +
 arch/arm/mach-s5pv210/cpu.c                |    6 ++
 arch/arm/mach-s5pv210/include/mach/map.h   |    5 ++
 arch/arm/mach-s5pv210/setup-sdhci-gpio.c   |  103 ++++++++++++++++++++++++++++
 arch/arm/mach-s5pv210/setup-sdhci.c        |   62 +++++++++++++++++
 arch/arm/plat-samsung/include/plat/sdhci.h |   55 +++++++++++++++
 7 files changed, 244 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-s5pv210/setup-sdhci-gpio.c
 create mode 100644 arch/arm/mach-s5pv210/setup-sdhci.c
arch/arm/mach-s5pv210/Kconfig +11 -0
index 8b5975a..16fbc06 100644
@@ -30,6 +30,17 @@ config S5PV210_SETUP_FB_24BPP
 	help
           Common setup code for S5PV210 with an 24bpp RGB display helper.
 
+config S5PV210_SETUP_SDHCI
+        bool
+        select S5PV210_SETUP_SDHCI_GPIO
+        help
+          Internal helper functions for S5PV210 based SDHCI systems
+
+config S5PV210_SETUP_SDHCI_GPIO
+	bool
+	help
+	  Common setup code for SDHCI gpio.
+
 config MACH_SMDKV210
 	bool "SMDKV210"
 	select CPU_S5PV210
arch/arm/mach-s5pv210/Makefile +2 -0
index ea7119a..0579d36 100644
@@ -20,6 +20,8 @@ obj-$(CONFIG_CPU_S5PV210)	+= setup-i2c0.o
 obj-$(CONFIG_S5PV210_SETUP_FB_24BPP)	+= setup-fb-24bpp.o
 obj-$(CONFIG_S5PV210_SETUP_I2C1) 	+= setup-i2c1.o
 obj-$(CONFIG_S5PV210_SETUP_I2C2) 	+= setup-i2c2.o
+obj-$(CONFIG_S5PV210_SETUP_SDHCI)       += setup-sdhci.o
+obj-$(CONFIG_S5PV210_SETUP_SDHCI_GPIO)	+= setup-sdhci-gpio.o
 
 # machine support
 
arch/arm/mach-s5pv210/cpu.c +6 -0
index 2d4a3d2..c5d53ab 100644
@@ -33,6 +33,7 @@
 #include <plat/clock.h>
 #include <plat/s5pv210.h>
 #include <plat/iic-core.h>
+#include <plat/sdhci.h>
 
 /* Initial IO mappings */
 
@@ -77,6 +78,11 @@ void __init s5pv210_map_io(void)
 {
 	iotable_init(s5pv210_iodesc, ARRAY_SIZE(s5pv210_iodesc));
 
+	/* initialise device information early */
+	s5pv210_default_sdhci0();
+	s5pv210_default_sdhci1();
+	s5pv210_default_sdhci2();
+
 	/* the i2c devices are directly compatible with s3c2440 */
 	s3c_i2c0_setname("s3c2440-i2c");
 	s3c_i2c1_setname("s3c2440-i2c");
arch/arm/mach-s5pv210/include/mach/map.h +5 -0
index 36bc608..def7762 100644
@@ -47,6 +47,8 @@
 
 #define S5PV210_PA_FB		(0xF8000000)
 
+#define S5PV210_PA_HSMMC(x)	(0xEB000000 + ((x) * 0x100000))
+
 #define S5PV210_PA_VIC0		(0xF2000000)
 #define S5P_PA_VIC0		S5PV210_PA_VIC0
 
@@ -64,6 +66,9 @@
 
 /* compatibiltiy defines. */
 #define S3C_PA_UART		S5PV210_PA_UART
+#define S3C_PA_HSMMC0		S5PV210_PA_HSMMC(0)
+#define S3C_PA_HSMMC1		S5PV210_PA_HSMMC(1)
+#define S3C_PA_HSMMC2		S5PV210_PA_HSMMC(2)
 #define S3C_PA_IIC		S5PV210_PA_IIC0
 #define S3C_PA_IIC1		S5PV210_PA_IIC1
 #define S3C_PA_IIC2		S5PV210_PA_IIC2
arch/arm/mach-s5pv210/setup-sdhci-gpio.c new file +103 -0

103 lines not on this page · raw message

arch/arm/mach-s5pv210/setup-sdhci.c new file +62 -0

62 lines not on this page · raw message

arch/arm/plat-samsung/include/plat/sdhci.h +55 -0

65 lines not on this page · raw message

Signature · 1 line
1.6.4