board-usi_topkick.c 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. void __init usi_topkick_init(void)
  61. {
  62. /*
  63. * Basic setup. Needs to be called early.
  64. */
  65. kirkwood_mpp_conf(topkick_mpp_config);
  66. kirkwood_ge00_init(&topkick_ge00_data);
  67. kirkwood_sdio_init(&topkick_mvsdio_data);
  68. }