simone.c 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * arch/arm/mach-ep93xx/simone.c
  3. * Simplemachines Sim.One support.
  4. *
  5. * Copyright (C) 2010 Ryan Mallon
  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. #include <linux/kernel.h>
  18. #include <linux/init.h>
  19. #include <linux/platform_device.h>
  20. #include <linux/i2c.h>
  21. #include <linux/i2c-gpio.h>
  22. #include <mach/hardware.h>
  23. #include <mach/fb.h>
  24. #include <mach/gpio-ep93xx.h>
  25. #include <asm/hardware/vic.h>
  26. #include <asm/mach-types.h>
  27. #include <asm/mach/arch.h>
  28. #include "soc.h"
  29. static struct ep93xx_eth_data __initdata simone_eth_data = {
  30. .phy_id = 1,
  31. };
  32. static struct ep93xxfb_mach_info __initdata simone_fb_info = {
  33. .num_modes = EP93XXFB_USE_MODEDB,
  34. .bpp = 16,
  35. .flags = EP93XXFB_USE_SDCSN0 | EP93XXFB_PCLK_FALLING,
  36. };
  37. static struct i2c_gpio_platform_data __initdata simone_i2c_gpio_data = {
  38. .sda_pin = EP93XX_GPIO_LINE_EEDAT,
  39. .sda_is_open_drain = 0,
  40. .scl_pin = EP93XX_GPIO_LINE_EECLK,
  41. .scl_is_open_drain = 0,
  42. .udelay = 0,
  43. .timeout = 0,
  44. };
  45. static struct i2c_board_info __initdata simone_i2c_board_info[] = {
  46. {
  47. I2C_BOARD_INFO("ds1337", 0x68),
  48. },
  49. };
  50. static struct platform_device simone_audio_device = {
  51. .name = "simone-audio",
  52. .id = -1,
  53. };
  54. static void __init simone_register_audio(void)
  55. {
  56. ep93xx_register_ac97();
  57. platform_device_register(&simone_audio_device);
  58. }
  59. static void __init simone_init_machine(void)
  60. {
  61. ep93xx_init_devices();
  62. ep93xx_register_flash(2, EP93XX_CS6_PHYS_BASE, SZ_8M);
  63. ep93xx_register_eth(&simone_eth_data, 1);
  64. ep93xx_register_fb(&simone_fb_info);
  65. ep93xx_register_i2c(&simone_i2c_gpio_data, simone_i2c_board_info,
  66. ARRAY_SIZE(simone_i2c_board_info));
  67. simone_register_audio();
  68. }
  69. MACHINE_START(SIM_ONE, "Simplemachines Sim.One Board")
  70. /* Maintainer: Ryan Mallon */
  71. .atag_offset = 0x100,
  72. .map_io = ep93xx_map_io,
  73. .init_irq = ep93xx_init_irq,
  74. .handle_irq = vic_handle_irq,
  75. .timer = &ep93xx_timer,
  76. .init_machine = simone_init_machine,
  77. .restart = ep93xx_restart,
  78. MACHINE_END