Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Board support file for OMAP4430 SDP. |
| 3 | * |
| 4 | * Copyright (C) 2009 Texas Instruments |
| 5 | * |
| 6 | * Author: Santosh Shilimkar <santosh.shilimkar@ti.com> |
| 7 | * |
| 8 | * Based on mach-omap2/board-3430sdp.c |
| 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify |
| 11 | * it under the terms of the GNU General Public License version 2 as |
| 12 | * published by the Free Software Foundation. |
| 13 | */ |
| 14 | |
| 15 | #include <linux/kernel.h> |
| 16 | #include <linux/init.h> |
| 17 | #include <linux/platform_device.h> |
| 18 | #include <linux/io.h> |
| 19 | #include <linux/gpio.h> |
Maulik Mankad | bce0668 | 2010-02-17 14:09:32 -0800 | [diff] [blame] | 20 | #include <linux/usb/otg.h> |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 21 | |
| 22 | #include <mach/hardware.h> |
| 23 | #include <asm/mach-types.h> |
| 24 | #include <asm/mach/arch.h> |
| 25 | #include <asm/mach/map.h> |
| 26 | |
Tony Lindgren | ce491cf | 2009-10-20 09:40:47 -0700 | [diff] [blame] | 27 | #include <plat/board.h> |
| 28 | #include <plat/common.h> |
| 29 | #include <plat/control.h> |
| 30 | #include <plat/timer-gp.h> |
Maulik Mankad | bce0668 | 2010-02-17 14:09:32 -0800 | [diff] [blame] | 31 | #include <plat/usb.h> |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 32 | #include <asm/hardware/gic.h> |
| 33 | |
| 34 | static struct platform_device sdp4430_lcd_device = { |
| 35 | .name = "sdp4430_lcd", |
| 36 | .id = -1, |
| 37 | }; |
| 38 | |
| 39 | static struct platform_device *sdp4430_devices[] __initdata = { |
| 40 | &sdp4430_lcd_device, |
| 41 | }; |
| 42 | |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 43 | static struct omap_lcd_config sdp4430_lcd_config __initdata = { |
| 44 | .ctrl_name = "internal", |
| 45 | }; |
| 46 | |
| 47 | static struct omap_board_config_kernel sdp4430_config[] __initdata = { |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 48 | { OMAP_TAG_LCD, &sdp4430_lcd_config }, |
| 49 | }; |
| 50 | |
| 51 | static void __init gic_init_irq(void) |
| 52 | { |
Tony Lindgren | e4e7a13 | 2009-10-19 15:25:26 -0700 | [diff] [blame] | 53 | void __iomem *base; |
| 54 | |
| 55 | /* Static mapping, never released */ |
| 56 | base = ioremap(OMAP44XX_GIC_DIST_BASE, SZ_4K); |
| 57 | BUG_ON(!base); |
| 58 | gic_dist_init(0, base, 29); |
| 59 | |
| 60 | /* Static mapping, never released */ |
| 61 | gic_cpu_base_addr = ioremap(OMAP44XX_GIC_CPU_BASE, SZ_512); |
| 62 | BUG_ON(!gic_cpu_base_addr); |
| 63 | gic_cpu_init(0, gic_cpu_base_addr); |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 64 | } |
| 65 | |
| 66 | static void __init omap_4430sdp_init_irq(void) |
| 67 | { |
Santosh Shilimkar | 5b7815b | 2009-10-22 14:48:14 -0700 | [diff] [blame] | 68 | omap_board_config = sdp4430_config; |
| 69 | omap_board_config_size = ARRAY_SIZE(sdp4430_config); |
Jean Pihet | 58cda88 | 2009-07-24 19:43:25 -0600 | [diff] [blame] | 70 | omap2_init_common_hw(NULL, NULL); |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 71 | #ifdef CONFIG_OMAP_32K_TIMER |
| 72 | omap2_gp_clockevent_set_gptimer(1); |
| 73 | #endif |
| 74 | gic_init_irq(); |
| 75 | omap_gpio_init(); |
| 76 | } |
| 77 | |
Maulik Mankad | bce0668 | 2010-02-17 14:09:32 -0800 | [diff] [blame] | 78 | static struct omap_musb_board_data musb_board_data = { |
| 79 | .interface_type = MUSB_INTERFACE_UTMI, |
| 80 | .mode = MUSB_PERIPHERAL, |
| 81 | .power = 100, |
| 82 | }; |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 83 | |
| 84 | static void __init omap_4430sdp_init(void) |
| 85 | { |
| 86 | platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices)); |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 87 | omap_serial_init(); |
Maulik Mankad | bce0668 | 2010-02-17 14:09:32 -0800 | [diff] [blame] | 88 | /* OMAP4 SDP uses internal transceiver so register nop transceiver */ |
| 89 | usb_nop_xceiv_register(); |
| 90 | usb_musb_init(&musb_board_data); |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 91 | } |
| 92 | |
| 93 | static void __init omap_4430sdp_map_io(void) |
| 94 | { |
| 95 | omap2_set_globals_443x(); |
Tony Lindgren | 6fbd55d | 2010-02-12 12:26:47 -0800 | [diff] [blame] | 96 | omap44xx_map_common_io(); |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 97 | } |
| 98 | |
| 99 | MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board") |
| 100 | /* Maintainer: Santosh Shilimkar - Texas Instruments Inc */ |
| 101 | .phys_io = 0x48000000, |
Santosh Shilimkar | b4224b2 | 2009-10-19 17:25:55 -0700 | [diff] [blame] | 102 | .io_pg_offst = ((0xfa000000) >> 18) & 0xfffc, |
Santosh Shilimkar | 46ba0ab | 2009-05-28 14:16:05 -0700 | [diff] [blame] | 103 | .boot_params = 0x80000100, |
| 104 | .map_io = omap_4430sdp_map_io, |
| 105 | .init_irq = omap_4430sdp_init_irq, |
| 106 | .init_machine = omap_4430sdp_init, |
| 107 | .timer = &omap_timer, |
| 108 | MACHINE_END |