board-openblocks_a6.c 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * Copyright 2012 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
  3. *
  4. * arch/arm/mach-kirkwood/board-openblocks_a6.c
  5. *
  6. * This file is licensed under the terms of the GNU General Public
  7. * License version 2. This program is licensed "as is" without any
  8. * warranty of any kind, whether express or implied.
  9. */
  10. #include <linux/kernel.h>
  11. #include <linux/init.h>
  12. #include <linux/mv643xx_eth.h>
  13. #include <linux/clk.h>
  14. #include <linux/clk-private.h>
  15. #include "common.h"
  16. #include "mpp.h"
  17. static struct mv643xx_eth_platform_data openblocks_ge00_data = {
  18. .phy_addr = MV643XX_ETH_PHY_ADDR(0),
  19. };
  20. static unsigned int openblocks_a6_mpp_config[] __initdata = {
  21. MPP0_NF_IO2,
  22. MPP1_NF_IO3,
  23. MPP2_NF_IO4,
  24. MPP3_NF_IO5,
  25. MPP4_NF_IO6,
  26. MPP5_NF_IO7,
  27. MPP6_SYSRST_OUTn,
  28. MPP8_UART1_RTS,
  29. MPP9_UART1_CTS,
  30. MPP10_UART0_TXD,
  31. MPP11_UART0_RXD,
  32. MPP13_UART1_TXD,
  33. MPP14_UART1_RXD,
  34. MPP15_UART0_RTS,
  35. MPP16_UART0_CTS,
  36. MPP18_NF_IO0,
  37. MPP19_NF_IO1,
  38. MPP20_GPIO, /* DIP SW0 */
  39. MPP21_GPIO, /* DIP SW1 */
  40. MPP22_GPIO, /* DIP SW2 */
  41. MPP23_GPIO, /* DIP SW3 */
  42. MPP24_GPIO, /* GPIO 0 */
  43. MPP25_GPIO, /* GPIO 1 */
  44. MPP26_GPIO, /* GPIO 2 */
  45. MPP27_GPIO, /* GPIO 3 */
  46. MPP28_GPIO, /* GPIO 4 */
  47. MPP29_GPIO, /* GPIO 5 */
  48. MPP30_GPIO, /* GPIO 6 */
  49. MPP31_GPIO, /* GPIO 7 */
  50. MPP36_TW1_SDA,
  51. MPP37_TW1_SCK,
  52. MPP38_GPIO, /* INIT */
  53. MPP39_GPIO, /* USB OC */
  54. MPP41_GPIO, /* LED: Red */
  55. MPP42_GPIO, /* LED: Green */
  56. MPP43_GPIO, /* LED: Yellow */
  57. 0,
  58. };
  59. void __init openblocks_a6_init(void)
  60. {
  61. /*
  62. * Basic setup. Needs to be called early.
  63. */
  64. kirkwood_mpp_conf(openblocks_a6_mpp_config);
  65. kirkwood_ge00_init(&openblocks_ge00_data);
  66. }