Skip to content

Commit

Permalink
ARM: Merge for-2635-4/s5pv210-boards
Browse files Browse the repository at this point in the history
Merge branch 'for-2635-4/s5pv210-boards' into for-2635-4/partial1

Conflicts:
	arch/arm/mach-s5pv210/include/mach/map.h
  • Loading branch information
Ben Dooks committed May 20, 2010
2 parents fac3d35 + eff4c74 commit ea5a4e2
Show file tree
Hide file tree
Showing 22 changed files with 773 additions and 8 deletions.
50 changes: 44 additions & 6 deletions arch/arm/mach-s5pv210/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,50 @@ config CPU_S5PV210
help
Enable S5PV210 CPU support

choice
prompt "Select machine type"
depends on ARCH_S5PV210
default MACH_SMDKV210
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
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.

# machine support

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

config MACH_GONI
bool "GONI"
select CPU_S5PV210
select ARCH_SPARSEMEM_ENABLE
help
Machine support for Samsung GONI board
S5PC110(MCP) is one of package option of S5PV210

config MACH_SMDKV210
bool "SMDKV210"
Expand All @@ -39,6 +79,4 @@ config MACH_SMDKC110
Machine support for Samsung SMDKC110
S5PC110(MCP) is one of package option of S5PV210

endchoice

endif
7 changes: 7 additions & 0 deletions arch/arm/mach-s5pv210/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,16 @@ obj-$(CONFIG_CPU_S5PV210) += setup-i2c0.o

# machine support

obj-$(CONFIG_MACH_AQUILA) += mach-aquila.o
obj-$(CONFIG_MACH_SMDKV210) += mach-smdkv210.o
obj-$(CONFIG_MACH_SMDKC110) += mach-smdkc110.o
obj-$(CONFIG_MACH_GONI) += mach-goni.o

# device support

obj-y += dev-audio.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
12 changes: 12 additions & 0 deletions arch/arm/mach-s5pv210/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#include <plat/devs.h>
#include <plat/clock.h>
#include <plat/s5pv210.h>
#include <plat/iic-core.h>
#include <plat/sdhci.h>

/* Initial IO mappings */

Expand Down Expand Up @@ -77,6 +79,16 @@ void __init s5pv210_map_io(void)
s3c_device_adc.name = "s3c64xx-adc";

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");
s3c_i2c2_setname("s3c2440-i2c");
}

void __init s5pv210_init_clocks(int xtal)
Expand Down
5 changes: 5 additions & 0 deletions arch/arm/mach-s5pv210/include/mach/irqs.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,9 @@
#define EINT_GPIO_2(x) S5PV210_GPH2(x)
#define EINT_GPIO_3(x) S5PV210_GPH3(x)

/* Compatibility */
#define IRQ_LCD_FIFO IRQ_LCD0
#define IRQ_LCD_VSYNC IRQ_LCD1
#define IRQ_LCD_SYSTEM IRQ_LCD2

#endif /* ASM_ARCH_IRQS_H */
13 changes: 13 additions & 0 deletions arch/arm/mach-s5pv210/include/mach/map.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -47,6 +49,10 @@
#define S5PV210_PA_PDMA0 0xE0900000
#define S5PV210_PA_PDMA1 0xE0A00000

#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

Expand Down Expand Up @@ -79,7 +85,14 @@

/* 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
#define S3C_PA_FB S5PV210_PA_FB

#define SAMSUNG_PA_ADC S5PV210_PA_ADC

#endif /* __ASM_ARCH_MAP_H */
1 change: 1 addition & 0 deletions arch/arm/mach-s5pv210/include/mach/regs-clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,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)
Expand Down
149 changes: 149 additions & 0 deletions arch/arm/mach-s5pv210/mach-aquila.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
/* 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 <linux/fb.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 <mach/regs-fb.h>

#include <plat/regs-serial.h>
#include <plat/s5pv210.h>
#include <plat/devs.h>
#include <plat/cpu.h>
#include <plat/fb.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,
},
};

/* Frame Buffer */
static struct s3c_fb_pd_win aquila_fb_win0 = {
.win_mode = {
.pixclock = 1000000000000ULL / ((16+16+2+480)*(28+3+2+800)*60),
.left_margin = 16,
.right_margin = 16,
.upper_margin = 3,
.lower_margin = 28,
.hsync_len = 2,
.vsync_len = 2,
.xres = 480,
.yres = 800,
},
.max_bpp = 32,
.default_bpp = 16,
};

static struct s3c_fb_pd_win aquila_fb_win1 = {
.win_mode = {
.pixclock = 1000000000000ULL / ((16+16+2+480)*(28+3+2+800)*60),
.left_margin = 16,
.right_margin = 16,
.upper_margin = 3,
.lower_margin = 28,
.hsync_len = 2,
.vsync_len = 2,
.xres = 480,
.yres = 800,
},
.max_bpp = 32,
.default_bpp = 16,
};

static struct s3c_fb_platdata aquila_lcd_pdata __initdata = {
.win[0] = &aquila_fb_win0,
.win[1] = &aquila_fb_win1,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC |
VIDCON1_INV_VCLK | VIDCON1_INV_VDEN,
.setup_gpio = s5pv210_fb_gpio_setup_24bpp,
};

static struct platform_device *aquila_devices[] __initdata = {
&s3c_device_fb,
};

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)
{
/* FB */
s3c_fb_set_platdata(&aquila_lcd_pdata);

platform_add_devices(aquila_devices, ARRAY_SIZE(aquila_devices));
}

MACHINE_START(AQUILA, "Aquila")
/* Maintainers:
Marek Szyprowski <m.szyprowski@samsung.com>
Kyungmin Park <kyungmin.park@samsung.com> */
.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
Loading

0 comments on commit ea5a4e2

Please sign in to comment.