board-mplcec4.c 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. * Copyright (C) 2012 MPL AG, Switzerland
  3. * Stefan Peter <s.peter@mpl.ch>
  4. *
  5. * arch/arm/mach-kirkwood/board-mplcec4.c
  6. *
  7. * This file is licensed under the terms of the GNU General Public
  8. * License version 2. This program is licensed "as is" without any
  9. * warranty of any kind, whether express or implied.
  10. */
  11. #include <linux/kernel.h>
  12. #include <linux/init.h>
  13. #include <linux/mv643xx_eth.h>
  14. #include <linux/platform_data/mmc-mvsdio.h>
  15. #include "common.h"
  16. #include "mpp.h"
  17. static struct mv643xx_eth_platform_data mplcec4_ge00_data = {
  18. .phy_addr = MV643XX_ETH_PHY_ADDR(1),
  19. };
  20. static struct mv643xx_eth_platform_data mplcec4_ge01_data = {
  21. .phy_addr = MV643XX_ETH_PHY_ADDR(2),
  22. };
  23. static unsigned int mplcec4_mpp_config[] __initdata = {
  24. MPP0_NF_IO2,
  25. MPP1_NF_IO3,
  26. MPP2_NF_IO4,
  27. MPP3_NF_IO5,
  28. MPP4_NF_IO6,
  29. MPP5_NF_IO7,
  30. MPP6_SYSRST_OUTn,
  31. MPP7_GPO, /* Status LED Green High Active */
  32. MPP10_UART0_TXD,
  33. MPP11_UART0_RXD,
  34. MPP12_SD_CLK,
  35. MPP13_SD_CMD, /* Alt UART1_TXD */
  36. MPP14_SD_D0, /* Alt UART1_RXD */
  37. MPP15_SD_D1,
  38. MPP16_SD_D2,
  39. MPP17_SD_D3,
  40. MPP18_NF_IO0,
  41. MPP19_NF_IO1,
  42. MPP28_GPIO, /* Input SYS_POR_DET (active High) */
  43. MPP29_GPIO, /* Input SYS_RTC_INT (active High) */
  44. MPP34_SATA1_ACTn,
  45. MPP35_SATA0_ACTn,
  46. MPP40_GPIO, /* LED User1 orange */
  47. MPP41_GPIO, /* LED User1 green */
  48. MPP44_GPIO, /* LED User0 orange */
  49. MPP45_GPIO, /* LED User0 green */
  50. MPP46_GPIO, /* Status LED Yellow High Active */
  51. MPP47_GPIO, /* SD_CD# (in/IRQ)*/
  52. 0
  53. };
  54. static struct mvsdio_platform_data mplcec4_mvsdio_data = {
  55. .gpio_card_detect = 47, /* MPP47 used as SD card detect */
  56. };
  57. void __init mplcec4_init(void)
  58. {
  59. /*
  60. * Basic setup. Needs to be called early.
  61. */
  62. kirkwood_mpp_conf(mplcec4_mpp_config);
  63. kirkwood_ehci_init();
  64. kirkwood_ge00_init(&mplcec4_ge00_data);
  65. kirkwood_ge01_init(&mplcec4_ge01_data);
  66. kirkwood_sdio_init(&mplcec4_mvsdio_data);
  67. kirkwood_pcie_init(KW_PCIE0);
  68. }