528-board_nb6.patch 2.5 KB

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