Adds board files and related headers for Nokia RX-51 Internet Tablet. Signed-off-by: Lauri Leukkunen <lauri.leukkunen@xxxxxxxxx> --- arch/arm/mach-omap2/Kconfig | 4 + arch/arm/mach-omap2/Makefile | 9 + arch/arm/mach-omap2/board-rx51-flash.c | 75 ++++++++ arch/arm/mach-omap2/board-rx51-peripherals.c | 250 ++++++++++++++++++++++++++ arch/arm/mach-omap2/board-rx51-sdram.c | 219 ++++++++++++++++++++++ arch/arm/mach-omap2/board-rx51-video.c | 79 ++++++++ arch/arm/mach-omap2/board-rx51.c | 102 +++++++++++ arch/arm/plat-omap/include/mach/board-rx51.h | 47 +++++ arch/arm/plat-omap/include/mach/hardware.h | 5 + 9 files changed, 790 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-omap2/board-rx51-flash.c create mode 100644 arch/arm/mach-omap2/board-rx51-peripherals.c create mode 100644 arch/arm/mach-omap2/board-rx51-sdram.c create mode 100644 arch/arm/mach-omap2/board-rx51-video.c create mode 100644 arch/arm/mach-omap2/board-rx51.c create mode 100644 arch/arm/plat-omap/include/mach/board-rx51.h diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 0a86a88..8fa650d 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -53,6 +53,10 @@ config MACH_NOKIA_N810_WIMAX depends on MACH_NOKIA_N800 select MACH_NOKIA_N810 +config MACH_NOKIA_RX51 + bool "Nokia RX-51 board" + depends on ARCH_OMAP3 && ARCH_OMAP34XX + config MACH_OMAP2_TUSB6010 bool depends on ARCH_OMAP2 && ARCH_OMAP2420 diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 00b2fb8..631166d 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -74,6 +74,15 @@ obj-$(CONFIG_MACH_NOKIA_N800) += board-n800.o board-n800-flash.o \ board-n800-dsp.o \ board-n800-camera.o obj-$(CONFIG_MACH_NOKIA_N810) += board-n810.o +obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \ + board-n800-flash.o \ + board-rx51-flash.o \ + board-rx51-sdram.o \ + board-rx51-video.o \ + board-rx51-peripherals.o \ + mmc-twl4030.o \ + usb-musb.o + obj-$(CONFIG_MACH_OVERO) += board-overo.o \ mmc-twl4030.o \ usb-musb.o \ diff --git a/arch/arm/mach-omap2/board-rx51-flash.c b/arch/arm/mach-omap2/board-rx51-flash.c new file mode 100644 index 0000000..7af0d46 --- /dev/null +++ b/arch/arm/mach-omap2/board-rx51-flash.c @@ -0,0 +1,75 @@ +/* + * linux/arch/arm/mach-omap2/board-rx51-flash.c + * + * Copyright (C) 2008 Nokia + * + * 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/init.h> +#include <linux/platform_device.h> +#include <linux/mtd/mtd.h> +#include <linux/mtd/partitions.h> +#include <asm/mach/flash.h> + +#include <mach/onenand.h> + +#include "mmc-twl4030.h" + +#define RX51_FLASH_CS 0 + +extern struct mtd_partition n800_partitions[ONENAND_MAX_PARTITIONS]; +extern int n800_onenand_setup(void __iomem *onenand_base, int freq); +extern void __init n800_flash_init(void); + +static struct flash_platform_data rx51_flash_data = { + .map_name = "cfi_probe", + .width = 2, + .parts = n800_partitions, + .nr_parts = ARRAY_SIZE(n800_partitions), +}; + +static struct resource rx51_flash_resource = { + .flags = IORESOURCE_MEM, +}; + +static struct platform_device rx51_flash_device = { + .name = "omapflash", + .id = 0, + .dev = { + .platform_data = &rx51_flash_data, + }, + .num_resources = 1, + .resource = &rx51_flash_resource, +}; + +static struct platform_device *rx51_flash_devices[] = { + &rx51_flash_device, +}; + +static struct twl4030_hsmmc_info mmc[] __initdata = { + { + .mmc = 1, + .wires = 8, + .gpio_cd = 160, + .gpio_wp = -EINVAL, + }, + { + .mmc = 2, + .wires = 8, + .gpio_cd = -EINVAL, + .gpio_wp = -EINVAL, + }, + {} /* Terminator */ +}; + +void __init rx51_flash_init(void) +{ + platform_add_devices(rx51_flash_devices, ARRAY_SIZE(rx51_flash_devices)); + n800_flash_init(); + twl4030_mmc_init(mmc); +} + diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c new file mode 100644 index 0000000..9da0187 --- /dev/null +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c @@ -0,0 +1,250 @@ +/* + * linux/arch/arm/mach-omap2/board-rx51-flash.c + * + * Copyright (C) 2008 Nokia + * + * 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/init.h> +#include <linux/platform_device.h> +#include <linux/input.h> +#include <linux/spi/spi.h> +#include <linux/spi/tsc2005.h> +#include <linux/i2c.h> +#include <linux/i2c/twl4030.h> +#include <linux/clk.h> +#include <linux/delay.h> + +#include <mach/mcspi.h> +#include <mach/gpio.h> +#include <mach/mux.h> +#include <mach/board.h> +#include <mach/common.h> +#include <mach/keypad.h> +#include <mach/dma.h> +#include <mach/gpmc.h> + +#define RX51_DEBUG_BASE 0x08000000 /* debug board */ +#define RX51_ETHR_START RX51_DEBUG_BASE +#define RX51_ETHR_GPIO_IRQ 54 + +#define RX51_TSC2005_RESET_GPIO 104 +#define RX51_TSC2005_IRQ_GPIO 100 + +#define RX51_SMC91X_CS 1 + +static struct resource rx51_smc91x_resources[] = { + [0] = { + .start = RX51_ETHR_START, + .end = RX51_ETHR_START + SZ_4K, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = OMAP_GPIO_IRQ(RX51_ETHR_GPIO_IRQ), + .end = 0, + .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, + }, +}; + +static struct platform_device rx51_smc91x_device = { + .name = "smc91x", + .id = -1, + .num_resources = ARRAY_SIZE(rx51_smc91x_resources), + .resource = rx51_smc91x_resources, +}; + +static struct tsc2005_platform_data tsc2005_config = { + .reset_gpio = RX51_TSC2005_RESET_GPIO, /* not used */ + + .ts_x_plate_ohm = 280, + .ts_hw_avg = 0, + .ts_touch_pressure = 1500, + .ts_stab_time = 1000, + .ts_pressure_max = 2048, + .ts_pressure_fudge = 2, + .ts_x_max = 4096, + .ts_x_fudge = 4, + .ts_y_max = 4096, + .ts_y_fudge = 7, +}; + +static struct omap2_mcspi_device_config tsc2005_mcspi_config = { + .turbo_mode = 0, + .single_channel = 1, +}; + + +static struct spi_board_info rx51_peripherals_spi_board_info[] = { + [0] = { + .modalias = "tsc2005", + .bus_num = 1, + .chip_select = 0, + .irq = OMAP_GPIO_IRQ(RX51_TSC2005_IRQ_GPIO), + .max_speed_hz = 6000000, + .controller_data = &tsc2005_mcspi_config, + .platform_data = &tsc2005_config, + }, +}; + +static int rx51_keymap[] = { + KEY(0, 0, KEY_Q), + KEY(0, 1, KEY_W), + KEY(0, 2, KEY_E), + KEY(0, 3, KEY_R), + KEY(0, 4, KEY_T), + KEY(0, 5, KEY_Y), + KEY(0, 6, KEY_U), + KEY(0, 7, KEY_I), + KEY(1, 0, KEY_O), + KEY(1, 1, KEY_D), + KEY(1, 2, KEY_DOT ), + KEY(1, 3, KEY_V), + KEY(1, 4, KEY_DOWN ), + KEY(2, 0, KEY_P), + KEY(2, 1, KEY_F), + KEY(2, 2, KEY_UP ), + KEY(2, 3, KEY_B), + KEY(2, 4, KEY_RIGHT ), + KEY(3, 0, KEY_COMMA ), + KEY(3, 1, KEY_G), + KEY(3, 2, KEY_ENTER ), + KEY(3, 3, KEY_N), + KEY(4, 0, KEY_BACKSPACE ), + KEY(4, 1, KEY_H), + KEY(4, 3, KEY_M), + KEY(4, 4, KEY_LEFTCTRL), + KEY(5, 1, KEY_J), + KEY(5, 2, KEY_Z), + KEY(5, 3, KEY_SPACE), + KEY(5, 4, KEY_LEFTSHIFT), + KEY(6, 0, KEY_A), + KEY(6, 1, KEY_K), + KEY(6, 2, KEY_X), + KEY(6, 3, KEY_SPACE), + KEY(6, 4, KEY_FN ), + KEY(7, 0, KEY_S), + KEY(7, 1, KEY_L), + KEY(7, 2, KEY_C), + KEY(7, 3, KEY_LEFT), + KEY(0xff, 0, KEY_F6), + KEY(0xff, 1, KEY_F7), + KEY(0xff, 2, KEY_F8), + KEY(0xff, 4, KEY_F9), + KEY(0xff, 5, KEY_F10), +}; + +static struct twl4030_keypad_data rx51_kp_data = { + .rows = 8, + .cols = 8, + .keymap = rx51_keymap, + .keymapsize = ARRAY_SIZE(rx51_keymap), + .rep = 1, +}; + +static struct platform_device *rx51_peripherals_devices[] = { + &rx51_smc91x_device, +}; + +static void __init rx51_init_smc91x(void) +{ + int eth_cs; + unsigned long cs_mem_base; + unsigned int rate; + struct clk *l3ck; + + eth_cs = RX51_SMC91X_CS; + + l3ck = clk_get(NULL, "core_l3_ck"); + if (IS_ERR(l3ck)) + rate = 100000000; + else + rate = clk_get_rate(l3ck); + + if (gpmc_cs_request(eth_cs, SZ_16M, &cs_mem_base) < 0) { + printk(KERN_ERR "Failed to request GPMC mem for smc91x\n"); + return; + } + + rx51_smc91x_resources[0].start = cs_mem_base + 0x0; + rx51_smc91x_resources[0].end = cs_mem_base + 0xf; + udelay(100); + + if (gpio_request(RX51_ETHR_GPIO_IRQ, "SMC91X irq") < 0) { + printk(KERN_ERR "Failed to request GPIO%d for smc91x IRQ\n", + RX51_ETHR_GPIO_IRQ); + return; + } + gpio_direction_input(RX51_ETHR_GPIO_IRQ); +} + +static void __init rx51_init_tsc2005(void) +{ + int r; + + r = gpio_request(RX51_TSC2005_IRQ_GPIO, "tsc2005 DAV IRQ"); + if (r >= 0) { + gpio_direction_input(RX51_TSC2005_IRQ_GPIO); + } else { + printk(KERN_ERR "unable to get DAV GPIO"); + } +} + +static struct twl4030_usb_data rx51_usb_data = { + .usb_mode = T2_USB_MODE_ULPI, +}; + +static struct twl4030_madc_platform_data rx51_madc_data = { + .irq_line = 1, +}; + +static struct twl4030_gpio_platform_data rx51_gpio_data = { + .gpio_base = OMAP_MAX_GPIO_LINES, + .irq_base = TWL4030_GPIO_IRQ_BASE, + .irq_end = TWL4030_GPIO_IRQ_END, +}; + +static struct twl4030_platform_data rx51_twldata = { + .irq_base = TWL4030_IRQ_BASE, + .irq_end = TWL4030_IRQ_END, + + /* platform_data for children goes here */ + .gpio = &rx51_gpio_data, + .keypad = &rx51_kp_data, + .madc = &rx51_madc_data, + .usb = &rx51_usb_data, +}; + +static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_1[] = { + { + I2C_BOARD_INFO("twl4030", 0x48), + .flags = I2C_CLIENT_WAKE, + .irq = INT_34XX_SYS_NIRQ, + .platform_data = &rx51_twldata, + }, +}; + +static int __init rx51_i2c_init(void) +{ + omap_register_i2c_bus(1, 2600, rx51_peripherals_i2c_board_info_1, + ARRAY_SIZE(rx51_peripherals_i2c_board_info_1)); + omap_register_i2c_bus(2, 100, NULL, 0); + omap_register_i2c_bus(3, 400, NULL, 0); + return 0; +} + + +void __init rx51_peripherals_init(void) +{ + platform_add_devices(rx51_peripherals_devices, + ARRAY_SIZE(rx51_peripherals_devices)); + spi_register_board_info(rx51_peripherals_spi_board_info, + ARRAY_SIZE(rx51_peripherals_spi_board_info)); + rx51_i2c_init(); + rx51_init_smc91x(); + rx51_init_tsc2005(); +} + diff --git a/arch/arm/mach-omap2/board-rx51-sdram.c b/arch/arm/mach-omap2/board-rx51-sdram.c new file mode 100644 index 0000000..32b5da4 --- /dev/null +++ b/arch/arm/mach-omap2/board-rx51-sdram.c @@ -0,0 +1,219 @@ +/* + * SDRC register values for the Samsung K4X1G323PC + * + * Copyright (C) 2008 Nokia Corporation + * + * Lauri Leukkunen <lauri.leukkunen@xxxxxxxxx> + * + * Original code by Juha Yrjölä <juha.yrjola@xxxxxxxxxxxxx> + * + * 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/clk.h> +#include <linux/err.h> +#include <linux/io.h> + +#include <mach/io.h> +#include <mach/common.h> +#include <mach/clock.h> +#include <mach/sdrc.h> + + +/* In picoseconds, except for tREF */ +struct sdram_timings { + u32 casl; + u32 tDAL; + u32 tDPL; + u32 tRRD; + u32 tRCD; + u32 tRP; + u32 tRAS; + u32 tRC; + u32 tRFC; + u32 tXSR; + + u32 tREF; /* in ms */ +}; + +struct sdram_info { + u8 row_lines; +}; + + +struct omap_sdrc_params rx51_sdrc_params[2]; + +static const struct sdram_timings rx51_timings[] = { + { + .casl = 3, + .tDAL = 15000 + 18000, + .tDPL = 15000, + .tRRD = 12000, + .tRCD = 18000, + .tRP = 18000, + .tRAS = 42000, + .tRC = 66000, + .tRFC = 97500, + .tXSR = 120000, + + .tREF = 64, + }, +}; + +static const struct sdram_info rx51_info = { + .row_lines = 13, +}; + +#define CM_BASE 0x48004000 + +#define CM_CLKSEL_CORE 0x0a40 +#define CM_CLKSEL1_PLL 0x0d40 + +#define PRM_CLKSEL 0x48306d40 +#define PRM_CLKSRC_CTRL 0x48307270 + +static u32 cm_base = CM_BASE; + +static inline u32 cm_read_reg(int idx) +{ + return *(u32 *)OMAP2_IO_ADDRESS(cm_base + idx); +} + +static const unsigned long sys_clk_rate_table[] = { + 12000, 13000, 19200, 26000, 38400, 16800 +}; + +static unsigned long get_sys_clk_rate(void) +{ + unsigned long rate; + + rate = sys_clk_rate_table[*(u32 *)OMAP2_IO_ADDRESS(PRM_CLKSEL) & 0x07]; + if (((*(u32 *)OMAP2_IO_ADDRESS(PRM_CLKSRC_CTRL) >> 6) & 0x03) == 0x02) + rate /= 2; + return rate; +} + +static unsigned long get_core_rate(void) +{ + unsigned long rate; + u32 l; + + l = cm_read_reg(CM_CLKSEL1_PLL); + rate = get_sys_clk_rate(); + rate *= ((l >> 16) & 0x7ff); + rate /= ((l >> 8) & 0x7f) + 1; + rate /= (l >> 27) & 0x1f; + + return rate; +} + +static unsigned long get_l3_rate(void) +{ + u32 l; + + l = cm_read_reg(CM_CLKSEL_CORE); + return get_core_rate() / (l & 0x03); +} + + + +static unsigned long sdrc_get_fclk_period(void) +{ + /* In picoseconds */ + return 1000000000 / get_l3_rate(); +} + +static unsigned int sdrc_ps_to_ticks(unsigned int time_ps) +{ + unsigned long tick_ps; + + /* Calculate in picosecs to yield more exact results */ + tick_ps = sdrc_get_fclk_period(); + + return (time_ps + tick_ps - 1) / tick_ps; +} +#undef DEBUG +#ifdef DEBUG +static int set_sdrc_timing_regval(u32 *regval, int st_bit, int end_bit, + int time, const char *name) +#else +static int set_sdrc_timing_regval(u32 *regval, int st_bit, int end_bit, + int time) +#endif +{ + int ticks, mask, nr_bits; + + if (time == 0) + ticks = 0; + else + ticks = sdrc_ps_to_ticks(time); + nr_bits = end_bit - st_bit + 1; + if (ticks >= 1 << nr_bits) + return -1; + mask = (1 << nr_bits) - 1; + *regval &= ~(mask << st_bit); + *regval |= ticks << st_bit; +#ifdef DEBUG + printk("SDRC %s: %i ticks %i ns\n", name, ticks, + (unsigned int)sdrc_get_fclk_period() * ticks / 1000); +#endif + + return 0; +} + +#ifdef DEBUG +#define SDRC_SET_ONE(reg, st, end, field) \ + if (set_sdrc_timing_regval((reg), (st), (end), rx51_timings->field, #field) < 0) \ + err = -1 +#else +#define SDRC_SET_ONE(reg, st, end, field) \ + if (set_sdrc_timing_regval((reg), (st), (end), rx51_timings->field) < 0) \ + err = -1 +#endif + +struct omap_sdrc_params *rx51_get_sdram_timings(void) +{ + u32 ticks_per_ms; + u32 rfr, l; + u32 actim_ctrla, actim_ctrlb; + u32 rfr_ctrl; + int err = 0; + + SDRC_SET_ONE(&actim_ctrla, 0, 4, tDAL); + SDRC_SET_ONE(&actim_ctrla, 6, 8, tDPL); + SDRC_SET_ONE(&actim_ctrla, 9, 11, tRRD); + SDRC_SET_ONE(&actim_ctrla, 12, 14, tRCD); + SDRC_SET_ONE(&actim_ctrla, 15, 17, tRP); + SDRC_SET_ONE(&actim_ctrla, 18, 21, tRAS); + SDRC_SET_ONE(&actim_ctrla, 22, 26, tRC); + SDRC_SET_ONE(&actim_ctrla, 27, 31, tRFC); + + SDRC_SET_ONE(&actim_ctrlb, 0, 7, tXSR); + + ticks_per_ms = sdrc_ps_to_ticks(1000000000); + rfr = rx51_timings[0].tREF * ticks_per_ms / (1 << rx51_info.row_lines); + if (rfr > 65535 + 50) + rfr = 65535; + else + rfr -= 50; + + l = rfr << 8; + rfr_ctrl = l | 0x3; /* autorefresh, reload counter with 8xARCV */ + + rx51_sdrc_params[0].rate = 133333333; + rx51_sdrc_params[0].actim_ctrla = actim_ctrla; + rx51_sdrc_params[0].actim_ctrlb = actim_ctrlb; + rx51_sdrc_params[0].rfr_ctrl = rfr_ctrl; + rx51_sdrc_params[0].mr = 0x32; + + rx51_sdrc_params[1].rate = 0; + + if (err < 0) + return NULL; + + return &rx51_sdrc_params[0]; +} + diff --git a/arch/arm/mach-omap2/board-rx51-video.c b/arch/arm/mach-omap2/board-rx51-video.c new file mode 100644 index 0000000..6ebdc82 --- /dev/null +++ b/arch/arm/mach-omap2/board-rx51-video.c @@ -0,0 +1,79 @@ +/* + * linux/arch/arm/mach-omap2/board-rx51-video.c + * + * Copyright (C) 2008 Nokia + * + * 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/init.h> +#include <linux/platform_device.h> +#include <linux/delay.h> +#include <linux/spi/spi.h> + +#include <mach/lcd_mipid.h> +#include <mach/mcspi.h> +#include <mach/gpio.h> +#include <mach/board.h> + + +static struct omap2_mcspi_device_config mipid_mcspi_config = { + .turbo_mode = 0, + .single_channel = 1, +}; + +static struct platform_device rx51_lcd_device = { + .name = "lcd_mipid", + .id = -1, +}; + +static void mipid_shutdown(struct mipid_platform_data *pdata) +{ + if (pdata->nreset_gpio != -1) { + pr_info("shutdown LCD\n"); + gpio_direction_output(pdata->nreset_gpio, 0); + msleep(120); + } +} + +static struct mipid_platform_data rx51_mipid_platform_data = { + .shutdown = mipid_shutdown, +}; + +static void __init mipid_dev_init(void) +{ + const struct omap_lcd_config *conf; + + conf = omap_get_config(OMAP_TAG_LCD, struct omap_lcd_config); + if (conf != NULL) { + rx51_mipid_platform_data.nreset_gpio = conf->nreset_gpio; + rx51_mipid_platform_data.data_lines = conf->data_lines; + } +} + +static struct spi_board_info rx51_video_spi_board_info[] = { + [0] = { + .modalias = "lcd_mipid", + .bus_num = 1, + .chip_select = 2, + .max_speed_hz = 6000000, + .controller_data = &mipid_mcspi_config, + .platform_data = &rx51_mipid_platform_data, + }, +}; + +static struct platform_device *rx51_video_devices[] = { + &rx51_lcd_device, +}; + +void __init rx51_video_init(void) +{ + platform_add_devices(rx51_video_devices, ARRAY_SIZE(rx51_video_devices)); + spi_register_board_info(rx51_video_spi_board_info, + ARRAY_SIZE(rx51_video_spi_board_info)); + mipid_dev_init(); +} + diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c new file mode 100644 index 0000000..e845aac --- /dev/null +++ b/arch/arm/mach-omap2/board-rx51.c @@ -0,0 +1,102 @@ +/* + * linux/arch/arm/mach-omap2/board-rx51.c + * + * Copyright (C) 2007, 2008 Nokia + * + * 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/init.h> +#include <linux/platform_device.h> +#include <linux/delay.h> +#include <linux/err.h> +#include <linux/clk.h> + +#include <mach/hardware.h> +#include <asm/mach-types.h> +#include <asm/mach/arch.h> +#include <asm/mach/map.h> + +#include <mach/mcspi.h> +#include <mach/gpio.h> +#include <mach/mux.h> +#include <mach/board.h> +#include <mach/common.h> +#include <mach/keypad.h> +#include <mach/dma.h> +#include <mach/gpmc.h> +#include <mach/usb-musb.h> + +#include <asm/io.h> +#include <asm/delay.h> + + +static struct omap_uart_config rx51_uart_config = { + .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), +}; + +static struct omap_lcd_config rx51_lcd_config = { + .ctrl_name = "internal", +}; + +static struct omap_fbmem_config rx51_fbmem0_config = { + .size = 752 * 1024, +}; + +static struct omap_fbmem_config rx51_fbmem1_config = { + .size = 752 * 1024, +}; + +static struct omap_fbmem_config rx51_fbmem2_config = { + .size = 752 * 1024, +}; + +static struct omap_board_config_kernel rx51_config[] = { + { OMAP_TAG_UART, &rx51_uart_config }, + { OMAP_TAG_FBMEM, &rx51_fbmem0_config }, + { OMAP_TAG_FBMEM, &rx51_fbmem1_config }, + { OMAP_TAG_FBMEM, &rx51_fbmem2_config }, + { OMAP_TAG_LCD, &rx51_lcd_config }, +}; + +static void __init rx51_init_irq(void) +{ + omap2_init_common_hw(rx51_get_sdram_timings()); + omap_init_irq(); + omap_gpio_init(); +} + +extern void __init rx51_flash_init(void); +extern void __init rx51_peripherals_init(void); +extern void __init rx51_video_init(void); + +static void __init rx51_init(void) +{ + omap_board_config = rx51_config; + omap_board_config_size = ARRAY_SIZE(rx51_config); + omap_serial_init(); + usb_musb_init(); + rx51_flash_init(); + rx51_peripherals_init(); + rx51_video_init(); +} + +static void __init rx51_map_io(void) +{ + omap2_set_globals_343x(); + omap2_map_common_io(); +} + +MACHINE_START(NOKIA_RX51, "Nokia RX-51 board") + /* Maintainer: Lauri Leukkunen <lauri.leukkunen@xxxxxxxxx> */ + .phys_io = 0x48000000, + .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc, + .boot_params = 0x80000100, + .map_io = rx51_map_io, + .init_irq = rx51_init_irq, + .init_machine = rx51_init, + .timer = &omap_timer, +MACHINE_END diff --git a/arch/arm/plat-omap/include/mach/board-rx51.h b/arch/arm/plat-omap/include/mach/board-rx51.h new file mode 100644 index 0000000..7b32872 --- /dev/null +++ b/arch/arm/plat-omap/include/mach/board-rx51.h @@ -0,0 +1,47 @@ +/* + * linux/include/asm-arm/arch-omap/board-rx51.h + * + * Copyright (C) 2007 Nokia + * + * Hardware definitions for Nokia RX-51 + * based on board-3430sdp.h + * + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef __ASM_ARCH_OMAP_BOARD_RX51_H +#define __ASM_ARCH_OMAP_BOARD_RX51_H + +#include <mach/board-nokia.h> + +#ifdef CONFIG_USB_MUSB_SOC +extern void rx51_usb_init(void); +#else +static inline void rx51_usb_init(void) { } +#endif + +extern void n800_bt_init(void); + +struct omap_sdrc_params *rx51_get_sdram_timings(void); + +#endif /* __ASM_ARCH_OMAP_BOARD_RX51_H */ + diff --git a/arch/arm/plat-omap/include/mach/hardware.h b/arch/arm/plat-omap/include/mach/hardware.h index 3486524..659300e 100644 --- a/arch/arm/plat-omap/include/mach/hardware.h +++ b/arch/arm/plat-omap/include/mach/hardware.h @@ -322,6 +322,11 @@ #include "board-nokia.h" #endif +#ifdef CONFIG_MACH_NOKIA_RX51 +#include "board-rx51.h" +#endif + + #ifdef CONFIG_MACH_OMAP_2430SDP #include "board-2430sdp.h" #endif -- 1.6.0.6 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html