0008-ar71xx-add-board-support-for-ubnt-loco-m-xw.patch 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Wed, 26 Nov 2014 23:20:46 +0100
  3. Subject: ar71xx: add board support for ubnt loco m xw
  4. Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
  5. diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
  6. index d9c7328..924766d 100755
  7. --- a/target/linux/ar71xx/base-files/etc/diag.sh
  8. +++ b/target/linux/ar71xx/base-files/etc/diag.sh
  9. @@ -34,7 +34,7 @@ get_status_led() {
  10. aw-nr580)
  11. status_led="aw-nr580:green:ready"
  12. ;;
  13. - bullet-m | rocket-m | nano-m | nanostation-m | nanostation-m-xw)
  14. + bullet-m | rocket-m | nano-m | nanostation-m | nanostation-m-xw | loco-m-xw)
  15. status_led="ubnt:green:link4"
  16. ;;
  17. bxu2000n-2-a1)
  18. diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
  19. index a6e6721..2676b48 100755
  20. --- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
  21. +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
  22. @@ -38,7 +38,8 @@ ap113)
  23. bullet-m | \
  24. nanostation-m | \
  25. rocket-m | \
  26. -nanostation-m-xw)
  27. +nanostation-m-xw | \
  28. +loco-m-xw)
  29. ucidef_set_led_rssi "rssilow" "RSSILOW" "ubnt:red:link1" "wlan0" "1" "100" "0" "13"
  30. ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "ubnt:orange:link2" "wlan0" "26" "100" "-25" "13"
  31. ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "ubnt:green:link3" "wlan0" "51" "100" "-50" "13"
  32. diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
  33. index 78f4992..c494310 100755
  34. --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
  35. +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
  36. @@ -293,6 +293,7 @@ bullet-m |\
  37. cap4200ag |\
  38. eap300v2 |\
  39. eap7660d |\
  40. +loco-m-xw |\
  41. mr600 |\
  42. mr600v2 |\
  43. rb-411 |\
  44. diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
  45. index c13a8eb..19cd1a7 100755
  46. --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
  47. +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
  48. @@ -396,6 +396,9 @@ ar71xx_board_detect() {
  49. *"Bullet M")
  50. name="bullet-m"
  51. ;;
  52. + *"Loco M XW")
  53. + name="loco-m-xw"
  54. + ;;
  55. *"Nanostation M")
  56. name="nanostation-m"
  57. ;;
  58. diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
  59. index c583215..a566b62 100755
  60. --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
  61. +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
  62. @@ -217,6 +217,7 @@ platform_check_image() {
  63. airgateway | \
  64. airrouter | \
  65. bullet-m | \
  66. + loco-m-xw | \
  67. nanostation-m | \
  68. rocket-m | \
  69. nanostation-m-xw | \
  70. diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
  71. index 55f11dc..3fdaf47 100644
  72. --- a/target/linux/ar71xx/image/Makefile
  73. +++ b/target/linux/ar71xx/image/Makefile
  74. @@ -1276,6 +1276,7 @@ $(eval $(call SingleProfile,UBNTXM,64kraw,UBNTNANOM,ubnt-nano-m,UBNT-NM,ttyS0,11
  75. $(eval $(call SingleProfile,UBNTXM,64kraw,UBNTUNIFI,ubnt-unifi,UBNT-UF,ttyS0,115200,XM,BZ,ar7240))
  76. $(eval $(call SingleProfile,UBNTXM,64kraw,UBNTUNIFIOUTDOOR,ubnt-unifi-outdoor,UBNT-U20,ttyS0,115200,XM,BZ,ar7240))
  77. $(eval $(call SingleProfile,UBNTXM,64kraw,UBNTNANOMXW,ubnt-nano-m-xw,UBNT-NM-XW,ttyS0,115200,XM,XW,ar934x))
  78. +$(eval $(call SingleProfile,UBNTXM,64kraw,UBNTLOCOXW,ubnt-loco-m-xw,UBNT-LOCO-XW,ttyS0,115200,XM,XW,ar934x))
  79. $(eval $(call SingleProfile,UBNTXM,64kraw,UBNTAIRGW,ubnt-air-gateway,UBNT-AGW,ttyATH0,115200,XM,AirGW,ar933x))
  80. $(eval $(call SingleProfile,WHRHPG300N,64kraw,WHRG301N,whr-g301n,WHR-G301N,ttyS0,115200,$$(whrhpg300n_mtdlayout),WHR-G301N))
  81. @@ -1322,7 +1323,7 @@ $(eval $(call MultiProfile,TLWR941,TLWR941NV2 TLWR941NV3 TLWR941NV4 TLWR941NV6))
  82. $(eval $(call MultiProfile,TLWR1043,TLWR1043V1 TLWR1043V2))
  83. $(eval $(call MultiProfile,TLWDR4300,TLWDR3500V1 TLWDR3600V1 TLWDR4300V1 TLWDR4300V1IL TLWDR4310V1 MW4530RV1))
  84. $(eval $(call MultiProfile,TUBE2H,TUBE2H8M TUBE2H16M))
  85. -$(eval $(call MultiProfile,UBNT,UBNTAIRROUTER UBNTRS UBNTRSPRO UBNTLSSR71 UBNTBULLETM UBNTROCKETM UBNTNANOM UBNTNANOMXW UBNTUNIFI UBNTUNIFIOUTDOOR UAPPRO UBNTAIRGW))
  86. +$(eval $(call MultiProfile,UBNT,UBNTAIRROUTER UBNTRS UBNTRSPRO UBNTLSSR71 UBNTBULLETM UBNTROCKETM UBNTNANOM UBNTNANOMXW UBNTLOCOXW UBNTUNIFI UBNTUNIFIOUTDOOR UAPPRO UBNTAIRGW))
  87. $(eval $(call MultiProfile,WNDR3700,WNDR3700V1 WNDR3700V2 WNDR3800 WNDR3800CH WNDRMAC WNDRMACV2))
  88. $(eval $(call MultiProfile,WNR612V2,REALWNR612V2 N150R))
  89. $(eval $(call MultiProfile,WP543,WP543_2M WP543_4M WP543_8M WP543_16M))
  90. diff --git a/target/linux/ar71xx/patches-3.10/616-MIPS-ath79-ubnt-xw.patch b/target/linux/ar71xx/patches-3.10/616-MIPS-ath79-ubnt-xw.patch
  91. index 9413bd8..5e3d4d4 100644
  92. --- a/target/linux/ar71xx/patches-3.10/616-MIPS-ath79-ubnt-xw.patch
  93. +++ b/target/linux/ar71xx/patches-3.10/616-MIPS-ath79-ubnt-xw.patch
  94. @@ -1,8 +1,6 @@
  95. -Index: linux-3.10.49/arch/mips/ath79/mach-ubnt-xm.c
  96. -===================================================================
  97. ---- linux-3.10.49.orig/arch/mips/ath79/mach-ubnt-xm.c 2014-08-15 22:55:37.890080659 +0200
  98. -+++ linux-3.10.49/arch/mips/ath79/mach-ubnt-xm.c 2014-08-15 22:58:31.061570912 +0200
  99. -@@ -332,3 +332,67 @@
  100. +--- a/arch/mips/ath79/mach-ubnt-xm.c
  101. ++++ b/arch/mips/ath79/mach-ubnt-xm.c
  102. +@@ -332,3 +332,78 @@ static void __init ubnt_uap_pro_setup(vo
  103. MIPS_MACHINE(ATH79_MACH_UBNT_UAP_PRO, "UAP-PRO", "Ubiquiti UniFi AP Pro",
  104. ubnt_uap_pro_setup);
  105. @@ -67,15 +65,27 @@ Index: linux-3.10.49/arch/mips/ath79/mach-ubnt-xm.c
  106. + ath79_register_eth(0);
  107. +}
  108. +
  109. ++static void __init ubnt_loco_m_xw_setup(void)
  110. ++{
  111. ++ ubnt_xw_init();
  112. ++
  113. ++ ath79_register_mdio(0, ~BIT(1));
  114. ++ ath79_eth0_data.phy_mask = BIT(1);
  115. ++ ath79_register_eth(0);
  116. ++}
  117. ++
  118. +MIPS_MACHINE(ATH79_MACH_UBNT_NANO_M_XW, "UBNT-NM-XW", "Ubiquiti Nanostation M XW",
  119. + ubnt_nano_m_xw_setup);
  120. +
  121. ++MIPS_MACHINE(ATH79_MACH_UBNT_LOCO_M_XW, "UBNT-LOCO-XW", "Ubiquiti Loco M XW",
  122. ++ ubnt_loco_m_xw_setup);
  123. --- a/arch/mips/ath79/machtypes.h
  124. +++ b/arch/mips/ath79/machtypes.h
  125. -@@ -121,9 +121,10 @@ enum ath79_mach_type {
  126. +@@ -121,9 +121,11 @@ enum ath79_mach_type {
  127. ATH79_MACH_TL_WR941ND, /* TP-LINK TL-WR941ND */
  128. ATH79_MACH_UBNT_AIRROUTER, /* Ubiquiti AirRouter */
  129. ATH79_MACH_UBNT_BULLET_M, /* Ubiquiti Bullet M */
  130. ++ ATH79_MACH_UBNT_LOCO_M_XW, /* Ubiquiti Loco M XW */
  131. ATH79_MACH_UBNT_LSSR71, /* Ubiquiti LS-SR71 */
  132. ATH79_MACH_UBNT_LSX, /* Ubiquiti LSX */
  133. ATH79_MACH_UBNT_NANO_M, /* Ubiquiti NanoStation M */
  134. diff --git a/target/linux/ar71xx/patches-3.10/722-MIPS-ath79-add-airGateway-support.patch b/target/linux/ar71xx/patches-3.10/722-MIPS-ath79-add-airGateway-support.patch
  135. index 0fe62d9..c9d1e1e 100644
  136. --- a/target/linux/ar71xx/patches-3.10/722-MIPS-ath79-add-airGateway-support.patch
  137. +++ b/target/linux/ar71xx/patches-3.10/722-MIPS-ath79-add-airGateway-support.patch
  138. @@ -12,10 +12,10 @@
  139. #include "dev-ap9x-pci.h"
  140. #include "dev-eth.h"
  141. #include "dev-gpio-buttons.h"
  142. -@@ -389,3 +391,65 @@ static void __init ubnt_nano_m_xw_setup(
  143. +@@ -406,3 +408,65 @@ MIPS_MACHINE(ATH79_MACH_UBNT_NANO_M_XW,
  144. - MIPS_MACHINE(ATH79_MACH_UBNT_NANO_M_XW, "UBNT-NM-XW", "Ubiquiti Nanostation M XW",
  145. - ubnt_nano_m_xw_setup);
  146. + MIPS_MACHINE(ATH79_MACH_UBNT_LOCO_M_XW, "UBNT-LOCO-XW", "Ubiquiti Loco M XW",
  147. + ubnt_loco_m_xw_setup);
  148. +
  149. +static struct gpio_led ubnt_airgateway_gpio_leds[] __initdata = {
  150. + {
  151. @@ -87,4 +87,4 @@
  152. + ATH79_MACH_UBNT_AIRGW, /* Ubiquiti AirGateway */
  153. ATH79_MACH_UBNT_AIRROUTER, /* Ubiquiti AirRouter */
  154. ATH79_MACH_UBNT_BULLET_M, /* Ubiquiti Bullet M */
  155. - ATH79_MACH_UBNT_LSSR71, /* Ubiquiti LS-SR71 */
  156. + ATH79_MACH_UBNT_LOCO_M_XW, /* Ubiquiti Loco M XW */