520-bcm63xx-add-support-for-96368MVWG-board.patch 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. From eeacc2529942051504bc957726aa178671344421 Mon Sep 17 00:00:00 2001
  2. From: Maxime Bizon <mbizon@freebox.fr>
  3. Date: Wed, 20 Jan 2010 16:21:30 +0100
  4. Subject: [PATCH 32/63] bcm63xx: add support for 96368MVWG board.
  5. ---
  6. arch/mips/bcm63xx/boards/board_bcm963xx.c | 95 ++++++++++++++++++++
  7. .../mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 2 +
  8. 2 files changed, 97 insertions(+), 0 deletions(-)
  9. --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
  10. +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
  11. @@ -1134,6 +1134,59 @@ static struct board_info __initdata boar
  12. #endif /* CONFIG_BCM63XX_CPU_6358 */
  13. /*
  14. + * known 6368 boards
  15. + */
  16. +#ifdef CONFIG_BCM63XX_CPU_6368
  17. +static struct board_info __initdata board_96368mvwg = {
  18. + .name = "96368MVWG",
  19. + .expected_cpu_id = 0x6368,
  20. +
  21. + .has_uart0 = 1,
  22. + .has_pci = 1,
  23. +
  24. + .has_usbd = 1,
  25. +
  26. + .usbd = {
  27. + .use_fullspeed = 0,
  28. + .port_no = 0,
  29. + },
  30. +
  31. + .has_enetsw = 1,
  32. +
  33. + .enetsw = {
  34. + .used_ports = {
  35. + [1] = {
  36. + .used = 1,
  37. + .phy_id = 2,
  38. + .name = "port1",
  39. + },
  40. +
  41. + [2] = {
  42. + .used = 1,
  43. + .phy_id = 3,
  44. + .name = "port2",
  45. + },
  46. +
  47. + [4] = {
  48. + .used = 1,
  49. + .phy_id = 0x12,
  50. + .name = "port0",
  51. + },
  52. +
  53. + [5] = {
  54. + .used = 1,
  55. + .phy_id = 0x11,
  56. + .name = "port3",
  57. + },
  58. + },
  59. + },
  60. +
  61. + .has_ohci0 = 1,
  62. + .has_ehci0 = 1,
  63. +};
  64. +#endif /* CONFIG_BCM63XX_CPU_6368 */
  65. +
  66. +/*
  67. * all boards
  68. */
  69. static const struct board_info __initconst *bcm963xx_boards[] = {
  70. @@ -1185,6 +1238,10 @@ static const struct board_info __initcon
  71. &board_HW553,
  72. &board_spw303v,
  73. #endif
  74. +
  75. +#ifdef CONFIG_BCM63XX_CPU_6368
  76. + &board_96368mvwg,
  77. +#endif
  78. };
  79. static struct of_device_id const bcm963xx_boards_dt[] = {
  80. @@ -1245,6 +1302,7 @@ static struct of_device_id const bcm963x
  81. { .compatible = "telsey,cpva642", .data = &board_CPVA642, },
  82. #endif
  83. #ifdef CONFIG_BCM63XX_CPU_6368
  84. + { .compatible = "brcm,bcm96368mvwg", .data = &board_96368mvwg, },
  85. #endif
  86. #ifdef CONFIG_BCM63XX_CPU_63268
  87. #endif
  88. --- a/arch/mips/bcm63xx/boards/board_common.c
  89. +++ b/arch/mips/bcm63xx/boards/board_common.c
  90. @@ -86,12 +86,25 @@ void __init board_early_setup(const stru
  91. bcm63xx_pci_enabled = 1;
  92. if (BCMCPU_IS_6348())
  93. val |= GPIO_MODE_6348_G2_PCI;
  94. +
  95. + if (BCMCPU_IS_6368())
  96. + val |= GPIO_MODE_6368_PCI_REQ1 |
  97. + GPIO_MODE_6368_PCI_GNT1 |
  98. + GPIO_MODE_6368_PCI_INTB |
  99. + GPIO_MODE_6368_PCI_REQ0 |
  100. + GPIO_MODE_6368_PCI_GNT0;
  101. }
  102. #endif
  103. if (board.has_pccard) {
  104. if (BCMCPU_IS_6348())
  105. val |= GPIO_MODE_6348_G1_MII_PCCARD;
  106. +
  107. + if (BCMCPU_IS_6368())
  108. + val |= GPIO_MODE_6368_PCMCIA_CD1 |
  109. + GPIO_MODE_6368_PCMCIA_CD2 |
  110. + GPIO_MODE_6368_PCMCIA_VS1 |
  111. + GPIO_MODE_6368_PCMCIA_VS2;
  112. }
  113. if (board.has_enet0 && !board.enet0.use_internal_phy) {