561-board_WAP-5813n.patch 2.4 KB

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