blob: f40c2987e5451f2f55fa613a603f1d03e1382229 [file] [log] [blame]
Ryan Mallona3662f62010-01-22 01:42:02 +01001/*
2 * arch/arm/mach-ep93xx/simone.c
3 * Simplemachines Sim.One support.
4 *
Ryan Mallon1c5454e2011-06-15 14:45:36 +10005 * Copyright (C) 2010 Ryan Mallon
Ryan Mallona3662f62010-01-22 01:42:02 +01006 *
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 Mallona3662f62010-01-22 01:42:02 +010021#include <linux/i2c.h>
22#include <linux/i2c-gpio.h>
23
24#include <mach/hardware.h>
25#include <mach/fb.h>
Linus Walleijbd5f12a2011-09-22 08:07:00 +010026#include <mach/gpio-ep93xx.h>
Ryan Mallona3662f62010-01-22 01:42:02 +010027
Jamie Iles9a6879b2011-09-27 20:07:05 +010028#include <asm/hardware/vic.h>
Ryan Mallona3662f62010-01-22 01:42:02 +010029#include <asm/mach-types.h>
30#include <asm/mach/arch.h>
31
Ryan Mallon258249e2012-01-11 09:06:08 +110032#include "soc.h"
33
Hartley Sweetenb370e082010-03-18 18:04:06 +010034static struct ep93xx_eth_data __initdata simone_eth_data = {
Ryan Mallona3662f62010-01-22 01:42:02 +010035 .phy_id = 1,
36};
37
Hartley Sweetenb370e082010-03-18 18:04:06 +010038static struct ep93xxfb_mach_info __initdata simone_fb_info = {
Ryan Mallona3662f62010-01-22 01:42:02 +010039 .num_modes = EP93XXFB_USE_MODEDB,
40 .bpp = 16,
41 .flags = EP93XXFB_USE_SDCSN0 | EP93XXFB_PCLK_FALLING,
42};
43
Hartley Sweetenb370e082010-03-18 18:04:06 +010044static struct i2c_gpio_platform_data __initdata simone_i2c_gpio_data = {
Ryan Mallona3662f62010-01-22 01:42:02 +010045 .sda_pin = EP93XX_GPIO_LINE_EEDAT,
46 .sda_is_open_drain = 0,
47 .scl_pin = EP93XX_GPIO_LINE_EECLK,
48 .scl_is_open_drain = 0,
49 .udelay = 0,
50 .timeout = 0,
51};
52
53static struct i2c_board_info __initdata simone_i2c_board_info[] = {
54 {
55 I2C_BOARD_INFO("ds1337", 0x68),
56 },
57};
58
Mika Westerberge5063fe2011-09-11 12:28:53 +030059static struct platform_device simone_audio_device = {
60 .name = "simone-audio",
61 .id = -1,
62};
63
64static void __init simone_register_audio(void)
65{
66 ep93xx_register_ac97();
67 platform_device_register(&simone_audio_device);
68}
69
Ryan Mallona3662f62010-01-22 01:42:02 +010070static void __init simone_init_machine(void)
71{
72 ep93xx_init_devices();
Hartley Sweeten16bcf782010-06-10 16:19:08 +010073 ep93xx_register_flash(2, EP93XX_CS6_PHYS_BASE, SZ_8M);
Ryan Mallona3662f62010-01-22 01:42:02 +010074 ep93xx_register_eth(&simone_eth_data, 1);
75 ep93xx_register_fb(&simone_fb_info);
76 ep93xx_register_i2c(&simone_i2c_gpio_data, simone_i2c_board_info,
77 ARRAY_SIZE(simone_i2c_board_info));
Mika Westerberge5063fe2011-09-11 12:28:53 +030078 simone_register_audio();
Ryan Mallona3662f62010-01-22 01:42:02 +010079}
80
81MACHINE_START(SIM_ONE, "Simplemachines Sim.One Board")
Nicolas Pitree562cf12011-07-05 22:38:11 -040082 /* Maintainer: Ryan Mallon */
83 .atag_offset = 0x100,
Ryan Mallona3662f62010-01-22 01:42:02 +010084 .map_io = ep93xx_map_io,
85 .init_irq = ep93xx_init_irq,
Jamie Iles9a6879b2011-09-27 20:07:05 +010086 .handle_irq = vic_handle_irq,
Ryan Mallona3662f62010-01-22 01:42:02 +010087 .timer = &ep93xx_timer,
88 .init_machine = simone_init_machine,
Russell King32751662011-11-05 09:54:14 +000089 .restart = ep93xx_restart,
Ryan Mallona3662f62010-01-22 01:42:02 +010090MACHINE_END