561-board_WAP-5813n.patch 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
  2. +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
  3. @@ -13,6 +13,8 @@
  4. #include <linux/kernel.h>
  5. #include <linux/string.h>
  6. #include <linux/pci_ids.h>
  7. +#include <linux/platform_data/b53.h>
  8. +#include <linux/spi/spi.h>
  9. #include <asm/addrspace.h>
  10. #include <bcm63xx_board.h>
  11. #include <bcm63xx_cpu.h>
  12. @@ -1674,6 +1676,65 @@ static struct board_info __initdata boar
  13. .has_ohci0 = 1,
  14. .has_ehci0 = 1,
  15. };
  16. +
  17. +static struct b53_platform_data WAP5813n_b53_pdata = {
  18. + .alias = "eth0",
  19. +};
  20. +
  21. +static struct spi_board_info WAP5813n_spi_devices[] = {
  22. + {
  23. + .modalias = "b53-switch",
  24. + .max_speed_hz = 781000,
  25. + .bus_num = 0,
  26. + .chip_select = 0,
  27. + .platform_data = &WAP5813n_b53_pdata,
  28. + }
  29. +};
  30. +
  31. +static struct sprom_fixup __initdata wap5813n_fixups[] = {
  32. + { .offset = 97, .value = 0xfeed },
  33. + { .offset = 98, .value = 0x15d1 },
  34. + { .offset = 99, .value = 0xfb0d },
  35. + { .offset = 113, .value = 0xfef7 },
  36. + { .offset = 114, .value = 0x15f7 },
  37. + { .offset = 115, .value = 0xfb1a },
  38. +};
  39. +
  40. +static struct board_info __initdata board_WAP5813n = {
  41. + .name = "96369R-1231N",
  42. + .expected_cpu_id = 0x6368,
  43. +
  44. + .has_uart0 = 1,
  45. + .has_pci = 1,
  46. + .use_fallback_sprom = 1,
  47. + .has_ohci0 = 1,
  48. + .has_ehci0 = 1,
  49. +
  50. + .has_enetsw = 1,
  51. + .enetsw = {
  52. + .used_ports = {
  53. + [4] = {
  54. + .used = 1,
  55. + .phy_id = 0xff,
  56. + .bypass_link = 1,
  57. + .force_speed = 1000,
  58. + .force_duplex_full = 1,
  59. + .name = "RGMII",
  60. + },
  61. + },
  62. + },
  63. +
  64. + .fallback_sprom = {
  65. + .type = SPROM_BCM43222,
  66. + .pci_bus = 0,
  67. + .pci_dev = 1,
  68. + .board_fixups = wap5813n_fixups,
  69. + .num_board_fixups = ARRAY_SIZE(wap5813n_fixups),
  70. + },
  71. +
  72. + .spis = WAP5813n_spi_devices,
  73. + .num_spis = ARRAY_SIZE(WAP5813n_spi_devices),
  74. +};
  75. #endif /* CONFIG_BCM63XX_CPU_6368 */
  76. /*
  77. @@ -1910,6 +1971,7 @@ static const struct board_info __initcon
  78. #ifdef CONFIG_BCM63XX_CPU_6368
  79. &board_96368mvwg,
  80. &board_96368mvngr,
  81. + &board_WAP5813n,
  82. #endif
  83. #ifdef CONFIG_BCM63XX_CPU_63268
  84. &board_963268bu_p300,
  85. @@ -2002,6 +2064,7 @@ static struct of_device_id const bcm963x
  86. #ifdef CONFIG_BCM63XX_CPU_6368
  87. { .compatible = "brcm,bcm96368mvngr", .data = &board_96368mvngr, },
  88. { .compatible = "brcm,bcm96368mvwg", .data = &board_96368mvwg, },
  89. + { .compatible = "comtrend,wap-5813n", .data = &board_WAP5813n, },
  90. #endif
  91. #ifdef CONFIG_BCM63XX_CPU_63268
  92. { .compatible = "brcm,bcm963268bu_p300", .data = &board_963268bu_p300, },