Ryan Mallon | a3662f6 | 2010-01-22 01:42:02 +0100 | [diff] [blame] | 1 | /* |
| 2 | * arch/arm/mach-ep93xx/simone.c |
| 3 | * Simplemachines Sim.One support. |
| 4 | * |
| 5 | * Copyright (C) 2010 Ryan Mallon <ryan@bluewatersys.com> |
| 6 | * |
| 7 | * Based on the 2.6.24.7 support: |
| 8 | * Copyright (C) 2009 Simplemachines |
| 9 | * MMC support by Peter Ivanov <ivanovp@gmail.com>, 2007 |
| 10 | * |
| 11 | * This program is free software; you can redistribute it and/or modify |
| 12 | * it under the terms of the GNU General Public License as published by |
| 13 | * the Free Software Foundation; either version 2 of the License, or (at |
| 14 | * your option) any later version. |
| 15 | * |
| 16 | */ |
| 17 | |
| 18 | #include <linux/kernel.h> |
| 19 | #include <linux/init.h> |
| 20 | #include <linux/platform_device.h> |
Ryan Mallon | a3662f6 | 2010-01-22 01:42:02 +0100 | [diff] [blame] | 21 | #include <linux/gpio.h> |
| 22 | #include <linux/i2c.h> |
| 23 | #include <linux/i2c-gpio.h> |
| 24 | |
| 25 | #include <mach/hardware.h> |
| 26 | #include <mach/fb.h> |
| 27 | |
| 28 | #include <asm/mach-types.h> |
| 29 | #include <asm/mach/arch.h> |
| 30 | |
Hartley Sweeten | b370e08 | 2010-03-18 18:04:06 +0100 | [diff] [blame] | 31 | static struct ep93xx_eth_data __initdata simone_eth_data = { |
Ryan Mallon | a3662f6 | 2010-01-22 01:42:02 +0100 | [diff] [blame] | 32 | .phy_id = 1, |
| 33 | }; |
| 34 | |
Hartley Sweeten | b370e08 | 2010-03-18 18:04:06 +0100 | [diff] [blame] | 35 | static struct ep93xxfb_mach_info __initdata simone_fb_info = { |
Ryan Mallon | a3662f6 | 2010-01-22 01:42:02 +0100 | [diff] [blame] | 36 | .num_modes = EP93XXFB_USE_MODEDB, |
| 37 | .bpp = 16, |
| 38 | .flags = EP93XXFB_USE_SDCSN0 | EP93XXFB_PCLK_FALLING, |
| 39 | }; |
| 40 | |
Hartley Sweeten | b370e08 | 2010-03-18 18:04:06 +0100 | [diff] [blame] | 41 | static struct i2c_gpio_platform_data __initdata simone_i2c_gpio_data = { |
Ryan Mallon | a3662f6 | 2010-01-22 01:42:02 +0100 | [diff] [blame] | 42 | .sda_pin = EP93XX_GPIO_LINE_EEDAT, |
| 43 | .sda_is_open_drain = 0, |
| 44 | .scl_pin = EP93XX_GPIO_LINE_EECLK, |
| 45 | .scl_is_open_drain = 0, |
| 46 | .udelay = 0, |
| 47 | .timeout = 0, |
| 48 | }; |
| 49 | |
| 50 | static struct i2c_board_info __initdata simone_i2c_board_info[] = { |
| 51 | { |
| 52 | I2C_BOARD_INFO("ds1337", 0x68), |
| 53 | }, |
| 54 | }; |
| 55 | |
| 56 | static void __init simone_init_machine(void) |
| 57 | { |
| 58 | ep93xx_init_devices(); |
Hartley Sweeten | 16bcf78 | 2010-06-10 16:19:08 +0100 | [diff] [blame] | 59 | ep93xx_register_flash(2, EP93XX_CS6_PHYS_BASE, SZ_8M); |
Ryan Mallon | a3662f6 | 2010-01-22 01:42:02 +0100 | [diff] [blame] | 60 | ep93xx_register_eth(&simone_eth_data, 1); |
| 61 | ep93xx_register_fb(&simone_fb_info); |
| 62 | ep93xx_register_i2c(&simone_i2c_gpio_data, simone_i2c_board_info, |
| 63 | ARRAY_SIZE(simone_i2c_board_info)); |
Mika Westerberg | d42a280 | 2010-10-14 17:49:08 +0300 | [diff] [blame] | 64 | ep93xx_register_ac97(); |
Ryan Mallon | a3662f6 | 2010-01-22 01:42:02 +0100 | [diff] [blame] | 65 | } |
| 66 | |
| 67 | MACHINE_START(SIM_ONE, "Simplemachines Sim.One Board") |
| 68 | /* Maintainer: Ryan Mallon <ryan@bluewatersys.com> */ |
Ryan Mallon | a3662f6 | 2010-01-22 01:42:02 +0100 | [diff] [blame] | 69 | .boot_params = EP93XX_SDCE0_PHYS_BASE + 0x100, |
| 70 | .map_io = ep93xx_map_io, |
| 71 | .init_irq = ep93xx_init_irq, |
| 72 | .timer = &ep93xx_timer, |
| 73 | .init_machine = simone_init_machine, |
| 74 | MACHINE_END |