board-usi_topkick.c 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*
  2. * Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net>
  3. *
  4. * arch/arm/mach-kirkwood/board-usi_topkick.c
  5. *
  6. * USI Topkick Init for drivers not converted to flattened device tree yet.
  7. *
  8. * This file is licensed under the terms of the GNU General Public
  9. * License version 2. This program is licensed "as is" without any
  10. * warranty of any kind, whether express or implied.
  11. */
  12. #include <linux/kernel.h>
  13. #include <linux/init.h>
  14. #include <linux/mv643xx_eth.h>
  15. #include <linux/gpio.h>
  16. #include <linux/platform_data/mmc-mvsdio.h>
  17. #include "common.h"
  18. #include "mpp.h"
  19. static struct mv643xx_eth_platform_data topkick_ge00_data = {
  20. .phy_addr = MV643XX_ETH_PHY_ADDR(0),
  21. };
  22. static struct mvsdio_platform_data topkick_mvsdio_data = {
  23. /* unfortunately the CD signal has not been connected */
  24. };
  25. /*
  26. * GPIO LED layout
  27. *
  28. * /-SYS_LED(2)
  29. * |
  30. * | /-DISK_LED
  31. * | |
  32. * | | /-WLAN_LED(2)
  33. * | | |
  34. * [SW] [*] [*] [*]
  35. */
  36. /*
  37. * Switch positions
  38. *
  39. * /-SW_LEFT
  40. * |
  41. * | /-SW_IDLE
  42. * | |
  43. * | | /-SW_RIGHT
  44. * | | |
  45. * PS [L] [I] [R] LEDS
  46. */
  47. static unsigned int topkick_mpp_config[] __initdata = {
  48. MPP21_GPIO, /* DISK_LED (low active) - yellow */
  49. MPP36_GPIO, /* SATA0 power enable (high active) */
  50. MPP37_GPIO, /* SYS_LED2 (low active) - red */
  51. MPP38_GPIO, /* SYS_LED (low active) - blue */
  52. MPP39_GPIO, /* WLAN_LED (low active) - green */
  53. MPP43_GPIO, /* SW_LEFT (low active) */
  54. MPP44_GPIO, /* SW_RIGHT (low active) */
  55. MPP45_GPIO, /* SW_IDLE (low active) */
  56. MPP46_GPIO, /* SW_LEFT (low active) */
  57. MPP48_GPIO, /* WLAN_LED2 (low active) - yellow */
  58. 0
  59. };
  60. #define TOPKICK_SATA0_PWR_ENABLE 36
  61. void __init usi_topkick_init(void)
  62. {
  63. /*
  64. * Basic setup. Needs to be called early.
  65. */
  66. kirkwood_mpp_conf(topkick_mpp_config);
  67. /* SATA0 power enable */
  68. gpio_set_value(TOPKICK_SATA0_PWR_ENABLE, 1);
  69. kirkwood_ge00_init(&topkick_ge00_data);
  70. kirkwood_sdio_init(&topkick_mvsdio_data);
  71. }