sta-s2z

Untitled

Feb 24th, 2016
699
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.38 KB | None | 0 0
  1. diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
  2. index 545bd70..5946f98 100755
  3. --- a/target/linux/ramips/base-files/etc/board.d/01_leds
  4. +++ b/target/linux/ramips/base-files/etc/board.d/01_leds
  5. @@ -258,6 +258,11 @@ case $board in
  6. set_usb_led "lenovo:blue:usb"
  7. set_wifi_led "lenovo:blue:wifi"
  8. ;;
  9. + zbt-wg2626)
  10. + ucidef_set_led_default "power" "power" "zbt-wg2626:green:power" "1"
  11. + set_wifi_led "zbt-wg2626:green:air"
  12. + set_usb_led "zbt-wg2626:green:usb"
  13. + ;;
  14. zte-q7)
  15. set_wifi_led "zte:blue:status"
  16. ;;
  17. diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
  18. index 19ef3f7..d7d016b 100755
  19. --- a/target/linux/ramips/base-files/etc/board.d/02_network
  20. +++ b/target/linux/ramips/base-files/etc/board.d/02_network
  21. @@ -145,7 +145,8 @@ ramips_setup_interfaces()
  22. wsr-1166 | \
  23. wt1520 | \
  24. xiaomi-miwifi-mini |\
  25. - y1)
  26. + y1|\
  27. + zbt-wg2626)
  28. ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
  29. ucidef_add_switch "switch0" "1" "1"
  30. ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 6t"
  31. diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
  32. index d32d692..0747d70 100644
  33. --- a/target/linux/ramips/base-files/etc/diag.sh
  34. +++ b/target/linux/ramips/base-files/etc/diag.sh
  35. @@ -247,6 +247,9 @@ get_status_led() {
  36. y1s)
  37. status_led="lenovo:blue:power"
  38. ;;
  39. + zbt-wg2626)
  40. + status_led="zbt-wg2626:green:power"
  41. + ;;
  42. zte-q7)
  43. status_led="zte:red:status"
  44. ;;
  45. diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
  46. index 70f22a7..e4276d9 100755
  47. --- a/target/linux/ramips/base-files/lib/ramips.sh
  48. +++ b/target/linux/ramips/base-files/lib/ramips.sh
  49. @@ -403,6 +403,9 @@ ramips_board_detect() {
  50. *"Zbtlink ZBT-WA05")
  51. name="zbt-wa05"
  52. ;;
  53. + *"ZBT-WG2626")
  54. + name="zbt-wg2626"
  55. + ;;
  56. *"ZBT WR8305RT")
  57. name="wr8305rt"
  58. ;;
  59. diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
  60. index 11fee85..2f64d8c 100755
  61. --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
  62. +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
  63. @@ -126,8 +126,9 @@ platform_check_image() {
  64. xiaomi-miwifi-mini |\
  65. y1 |\
  66. y1s |\
  67. - zte-q7 |\
  68. - zbt-wa05)
  69. + zbt-wa05 |\
  70. + zbt-wg2626 |\
  71. + zte-q7)
  72. [ "$magic" != "27051956" ] && {
  73. echo "Invalid image type."
  74. return 1
  75. diff --git a/target/linux/ramips/dts/ZBT-WG2626.dts b/target/linux/ramips/dts/ZBT-WG2626.dts
  76. new file mode 100644
  77. index 0000000..6170454
  78. --- /dev/null
  79. +++ b/target/linux/ramips/dts/ZBT-WG2626.dts
  80. @@ -0,0 +1,127 @@
  81. +/dts-v1/;
  82. +
  83. +/include/ "mt7621.dtsi"
  84. +
  85. +/ {
  86. + compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc";
  87. + model = "ZBT-WG2626";
  88. +
  89. + memory@0 {
  90. + device_type = "memory";
  91. + reg = <0x0 0x1c000000>, <0x20000000 0x4000000>;
  92. + };
  93. +
  94. + chosen {
  95. + bootargs = "console=ttyS0,57600";
  96. + };
  97. +
  98. + sdhci@10130000 {
  99. + status = "okay";
  100. + };
  101. +
  102. + palmbus@1E000000 {
  103. + spi@b00 {
  104. + status = "okay";
  105. +
  106. + m25p80@0 {
  107. + #address-cells = <1>;
  108. + #size-cells = <1>;
  109. + compatible = "w25q128";
  110. + reg = <0 0>;
  111. + linux,modalias = "m25p80";
  112. + spi-max-frequency = <10000000>;
  113. +
  114. + partition@0 {
  115. + label = "u-boot";
  116. + reg = <0x0 0x30000>;
  117. + read-only;
  118. + };
  119. +
  120. + partition@30000 {
  121. + label = "u-boot-env";
  122. + reg = <0x30000 0x10000>;
  123. + read-only;
  124. + };
  125. +
  126. + factory: partition@40000 {
  127. + label = "factory";
  128. + reg = <0x40000 0x10000>;
  129. + read-only;
  130. + };
  131. +
  132. + partition@50000 {
  133. + label = "firmware";
  134. + reg = <0x50000 0xfb0000>;
  135. + };
  136. +
  137. + };
  138. + };
  139. +
  140. + i2c@900 {
  141. + compatible = "ralink,i2c-mt7621";
  142. + reg = <0x900 0x100>;
  143. + #address-cells = <1>;
  144. + #size-cells = <0>;
  145. + pinctrl-names = "default";
  146. + pinctrl-0 = <&i2c_pins>;
  147. + status = "okay";
  148. + };
  149. + };
  150. +
  151. + pcie@1e140000 {
  152. + status = "okay";
  153. +
  154. + pcie0 {
  155. + mt76@0,0 {
  156. + reg = <0x0000 0 0 0 0>;
  157. + device_type = "pci";
  158. + mediatek,mtd-eeprom = <&factory 0x8000>;
  159. + mediatek,2ghz = <0>;
  160. + };
  161. + };
  162. +
  163. + pcie1 {
  164. + mt76@1,0 {
  165. + reg = <0x0000 0 0 0 0>;
  166. + device_type = "pci";
  167. + mediatek,mtd-eeprom = <&factory 0x0000>;
  168. + mediatek,5ghz = <0>;
  169. + };
  170. + };
  171. + };
  172. +
  173. + ethernet@1e100000 {
  174. + mtd-mac-address = <&factory 0xe000>;
  175. + };
  176. +
  177. + gpio-keys-polled {
  178. + compatible = "gpio-keys-polled";
  179. + #address-cells = <1>;
  180. + #size-cells = <0>;
  181. + poll-interval = <20>;
  182. +
  183. + reset {
  184. + label = "reset";
  185. + gpios = <&gpio0 18 1>;
  186. + linux,code = <0x198>;
  187. + };
  188. + };
  189. +
  190. + gpio-leds {
  191. + compatible = "gpio-leds";
  192. +
  193. + status {
  194. + label = "zbt-wg2626:green:status";
  195. + gpios = <&gpio0 24 1>;
  196. + };
  197. + };
  198. +
  199. + pinctrl {
  200. + state_default: pinctrl0 {
  201. + gpio {
  202. + ralink,group = "wdt", "rgmii2", "wdt rst", "jtag", "mdio";
  203. + ralink,function = "gpio";
  204. + };
  205. + };
  206. + };
  207. +};
  208. diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
  209. index b4d0897..0dd46ca 100644
  210. --- a/target/linux/ramips/image/Makefile
  211. +++ b/target/linux/ramips/image/Makefile
  212. @@ -928,7 +928,7 @@ endif
  213. #
  214.  
  215. ifeq ($(SUBTARGET),mt7621)
  216. - TARGET_DEVICES += mt7621 wsr-600 wsr-1166 dir-860l-b1 firewrt pbr-m1 re6500
  217. + TARGET_DEVICES += mt7621 wsr-600 wsr-1166 dir-860l-b1 firewrt pbr-m1 re6500 zbt-wg2626
  218. endif
  219.  
  220. define Device/mt7621
  221. @@ -974,6 +974,11 @@ define Device/pbr-m1
  222. IMAGE_SIZE := $(ralink_default_fw_size_16M)
  223. endef
  224.  
  225. +define Device/zbt-wg2626
  226. + DTS := ZBT-WG2626
  227. + IMAGE_SIZE := $(ralink_default_fw_size_16M)
  228. +endef
  229. +
  230. #
  231. # MT7628 Profiles
  232. #
  233. diff --git a/target/linux/ramips/mt7621/profiles/zbt.mk b/target/linux/ramips/mt7621/profiles/zbt.mk
  234. new file mode 100644
  235. index 0000000..cf9beff
  236. --- /dev/null
  237. +++ b/target/linux/ramips/mt7621/profiles/zbt.mk
  238. @@ -0,0 +1,19 @@
  239. +#
  240. +# Copyright (C) 2015 OpenWrt.org
  241. +#
  242. +# This is free software, licensed under the GNU General Public License v2.
  243. +# See /LICENSE for more information.
  244. +#
  245. +
  246. +define Profile/ZBT-WG2626
  247. + NAME:=ZBT-WG2626 Device
  248. + PACKAGES:=\
  249. + kmod-usb-core kmod-usb3 kmod-sdhci-mt7620 \
  250. + kmod-ledtrig-usbdev kmod-ata-core kmod-ata-ahci \
  251. + kmod-usb3-mt7621
  252. +endef
  253. +
  254. +define Profile/ZBT-WG2626/Description
  255. + Package set for ZBT-WG2626 device
  256. +endef
  257. +$(eval $(call Profile,ZBT-WG2626))
Advertisement
Add Comment
Please, Sign In to add comment