528-board_nb6.patch 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
  2. +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
  3. @@ -12,6 +12,8 @@
  4. #include <linux/string.h>
  5. #include <linux/gpio_keys.h>
  6. #include <linux/input.h>
  7. +#include <linux/platform_device.h>
  8. +#include <linux/rtl8367.h>
  9. #include <asm/addrspace.h>
  10. #include <bcm63xx_board.h>
  11. #include <bcm63xx_cpu.h>
  12. @@ -31,6 +33,9 @@
  13. #define BCM963XX_KEYS_POLL_INTERVAL 20
  14. #define BCM963XX_KEYS_DEBOUNCE_INTERVAL (BCM963XX_KEYS_POLL_INTERVAL * 3)
  15. +#define NB6_GPIO_RTL8367_SDA 18
  16. +#define NB6_GPIO_RTL8367_SCK 20
  17. +
  18. /*
  19. * known 3368 boards
  20. */
  21. @@ -1318,6 +1323,69 @@ static struct board_info __initdata boar
  22. };
  23. #endif /* CONFIG_BCM63XX_CPU_6358 */
  24. +#ifdef CONFIG_BCM63XX_CPU_6362
  25. +static struct rtl8367_extif_config nb6_rtl8367_extif0_cfg = {
  26. + .mode = RTL8367_EXTIF_MODE_RGMII,
  27. + .txdelay = 1,
  28. + .rxdelay = 5,
  29. + .ability = {
  30. + .force_mode = 1,
  31. + .txpause = 1,
  32. + .rxpause = 1,
  33. + .link = 1,
  34. + .duplex = 1,
  35. + .speed = RTL8367_PORT_SPEED_1000,
  36. + },
  37. +};
  38. +
  39. +static struct rtl8367_platform_data nb6_rtl8367_data = {
  40. + .gpio_sda = NB6_GPIO_RTL8367_SDA,
  41. + .gpio_sck = NB6_GPIO_RTL8367_SCK,
  42. + .extif0_cfg = &nb6_rtl8367_extif0_cfg,
  43. +};
  44. +
  45. +static struct platform_device nb6_rtl8367_device = {
  46. + .name = RTL8367_DRIVER_NAME,
  47. + .id = -1,
  48. + .dev = {
  49. + .platform_data = &nb6_rtl8367_data,
  50. + }
  51. +};
  52. +
  53. +static struct platform_device * __initdata nb6_devices[] = {
  54. + &nb6_rtl8367_device,
  55. +};
  56. +
  57. +static struct board_info __initdata board_nb6 = {
  58. + .name = "NB6",
  59. + .expected_cpu_id = 0x6362,
  60. +
  61. + .has_uart0 = 1,
  62. +
  63. + .has_ohci0 = 1,
  64. + .has_ehci0 = 1,
  65. + .num_usbh_ports = 2,
  66. +
  67. + .has_enetsw = 1,
  68. +
  69. + .enetsw = {
  70. + .used_ports = {
  71. + [4] = {
  72. + .used = 1,
  73. + .phy_id = 0xff,
  74. + .bypass_link = 1,
  75. + .force_speed = 1000,
  76. + .force_duplex_full = 1,
  77. + .name = "RGMII",
  78. + },
  79. + },
  80. + },
  81. +
  82. + .devs = nb6_devices,
  83. + .num_devs = ARRAY_SIZE(nb6_devices),
  84. +};
  85. +#endif /* CONFIG_BCM63XX_CPU_6362 */
  86. +
  87. /*
  88. * known 6368 boards
  89. */
  90. @@ -1469,6 +1537,10 @@ static const struct board_info __initcon
  91. &board_DVAG3810BN,
  92. #endif
  93. +#ifdef CONFIG_BCM63XX_CPU_6362
  94. + &board_nb6,
  95. +#endif
  96. +
  97. #ifdef CONFIG_BCM63XX_CPU_6368
  98. &board_96368mvwg,
  99. &board_96368mvngr,
  100. @@ -1537,6 +1609,9 @@ static struct of_device_id const bcm963x
  101. { .compatible = "t-com,spw303v", .data = &board_spw303v, },
  102. { .compatible = "telsey,cpva642", .data = &board_CPVA642, },
  103. #endif
  104. +#ifdef CONFIG_BCM63XX_CPU_6362
  105. + { .compatible = "sfr,nb6-ser-r0", .data = &board_nb6, },
  106. +#endif
  107. #ifdef CONFIG_BCM63XX_CPU_6368
  108. { .compatible = "brcm,bcm96368mvngr", .data = &board_96368mvngr, },
  109. { .compatible = "brcm,bcm96368mvwg", .data = &board_96368mvwg, },