Advertisement
jiringgot

NBG6515

May 5th, 2021 (edited)
100
1
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.75 KB | None | 1 0
  1. diff --git a/target/linux/ramips/dts/mt7620a_zyxel_nbg6515-ac750.dts b/target/linux/ramips/dts/mt7620a_zyxel_nbg6515-ac750.dts
  2. new file mode 100644
  3. index 0000000000..a5473cb094
  4. --- /dev/null
  5. +++ b/target/linux/ramips/dts/mt7620a_zyxel_nbg6515-ac750.dts
  6. @@ -0,0 +1,222 @@
  7. +#include "mt7620a.dtsi"
  8. +
  9. +#include <dt-bindings/input/input.h>
  10. +#include <dt-bindings/gpio/gpio.h>
  11. +
  12. +/*
  13. + led gpios:
  14. +
  15. + phy0 > 5 GHz
  16. + phy1 > 2.4 Ghz
  17. +
  18. + 7 -> power
  19. + 9 -> reset
  20. + 10 -> usb
  21. + 12 -> phy1
  22. + 13 -> phy0
  23. + 14 -> wps
  24. +
  25. + are the ethernet leds configurable? ethernet switch ports?
  26. +
  27. + ethernet switches:
  28. +
  29. + mt7620a -> switch0:
  30. +
  31. + port0: <not used>
  32. + port1: <not used>
  33. + port2: <not used>
  34. + port3: <not used>
  35. + port4: <not used>
  36. + port5: mt7350
  37. + port6: cpu
  38. + port7: <not used>
  39. +
  40. + mt7350 -> switch1:
  41. +
  42. + port0 -> lan4
  43. + port1 -> lan3
  44. + port2 -> lan2
  45. + port3 -> lan1
  46. + port4 -> wan
  47. + port5 -> <not used>
  48. + port6 -> mt7620a
  49. + port7 -> <not used>
  50. +*/
  51. +
  52. +/ {
  53. + compatible = "zyxel,nbg6515-ac750", "ralink,mt7620a-soc";
  54. + model = "Zyxel NBG6515";
  55. +
  56. + aliases {
  57. + led-boot = &led_power;
  58. + led-failsafe = &led_power;
  59. + led-running = &led_power;
  60. + led-upgrade = &led_power;
  61. + };
  62. +
  63. + leds {
  64. + compatible = "gpio-leds";
  65. +
  66. + led_power: power {
  67. + label = "green:power";
  68. + gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
  69. + default-state = "on";
  70. + };
  71. +
  72. + usb {
  73. + label = "green:usb";
  74. + gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
  75. + linux,default-trigger = "usbport";
  76. + };
  77. +
  78. + wlan5g {
  79. + label = "green:wlan5g";
  80. + gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
  81. + linux,default-trigger = "phy0tpt";
  82. + };
  83. +
  84. + wlan2g {
  85. + label = "green:wlan2g";
  86. + gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
  87. + linux,default-trigger = "phy1tpt";
  88. + };
  89. +
  90. + wps {
  91. + label = "green:wps";
  92. + gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
  93. + };
  94. + };
  95. +};
  96. +
  97. +&spi0 {
  98. + status = "okay";
  99. +
  100. + flash@0 {
  101. + compatible = "jedec,spi-nor";
  102. + reg = <0>;
  103. + spi-max-frequency = <10000000>;
  104. +
  105. + partitions {
  106. + compatible = "fixed-partitions";
  107. + #address-cells = <1>;
  108. + #size-cells = <1>;
  109. +
  110. + partition@0 {
  111. + label = "u-boot";
  112. + reg = <0x0 0x30000>;
  113. + read-only;
  114. + };
  115. +
  116. + partition@30000 {
  117. + label = "u-boot-env";
  118. + reg = <0x30000 0x10000>;
  119. + read-only;
  120. + };
  121. +
  122. + factory: partition@40000 {
  123. + label = "factory";
  124. + reg = <0x40000 0x10000>;
  125. + read-only;
  126. + };
  127. +
  128. + partition@50000 {
  129. + compatible = "denx,uimage";
  130. + label = "firmware";
  131. + reg = <0x50000 0x7b0000>;
  132. + };
  133. + };
  134. + };
  135. +};
  136. +
  137. +
  138. +&state_default {
  139. + gpio {
  140. + groups = "i2c", "uartf";
  141. + function = "gpio";
  142. + };
  143. +};
  144. +
  145. +&ethernet {
  146. + pinctrl-names = "default";
  147. + pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
  148. +
  149. + mtd-mac-address = <&factory 0x48004>;
  150. + mtd-mac-address-increment = <1>;
  151. +
  152. + mediatek,portmap = "llllw";
  153. +
  154. + port@5 {
  155. + status = "okay";
  156. + mediatek,fixed-link = <1000 1 1 1>;
  157. + phy-mode = "rgmii";
  158. + };
  159. +
  160. + mdio-bus {
  161. + status = "okay";
  162. +
  163. + phy0: ethernet-phy@0 {
  164. + reg = <0>;
  165. + phy-mode = "rgmii";
  166. + };
  167. +
  168. + phy1: ethernet-phy@1 {
  169. + reg = <1>;
  170. + phy-mode = "rgmii";
  171. + };
  172. +
  173. + phy2: ethernet-phy@2 {
  174. + reg = <2>;
  175. + phy-mode = "rgmii";
  176. + };
  177. +
  178. + phy3: ethernet-phy@3 {
  179. + reg = <3>;
  180. + phy-mode = "rgmii";
  181. + };
  182. +
  183. + phy4: ethernet-phy@4 {
  184. + reg = <4>;
  185. + phy-mode = "rgmii";
  186. + };
  187. +
  188. + phy1f: ethernet-phy@1f {
  189. + reg = <0x1f>;
  190. + phy-mode = "rgmii";
  191. + };
  192. + };
  193. +};
  194. +
  195. +&gsw {
  196. + mediatek,port4 = "gmac";
  197. +};
  198. +
  199. +&pcie {
  200. + status = "okay";
  201. +};
  202. +
  203. +&ehci {
  204. + status = "okay";
  205. +};
  206. +
  207. +&ohci {
  208. + status = "okay";
  209. +};
  210. +
  211. +&pcie0 {
  212. + wifi@0,0 {
  213. + reg = <0x0000 0 0 0 0>;
  214. + mediatek,mtd-eeprom = <&factory 0x8000>;
  215. + ieee80211-freq-limit = <5000000 6000000>;
  216. + };
  217. +};
  218. +
  219. +&gpio1 {
  220. + status = "okay";
  221. +};
  222. +
  223. +&gpio2 {
  224. + status = "okay";
  225. +};
  226. +
  227. +&gpio3 {
  228. + status = "okay";
  229. diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk
  230. index fe41512f36..7deb47f322 100644
  231. --- a/target/linux/ramips/image/mt7620.mk
  232. +++ b/target/linux/ramips/image/mt7620.mk
  233. @@ -895,6 +895,16 @@ define Device/planex_mzk-ex750np
  234. endef
  235. TARGET_DEVICES += planex_mzk-ex750np
  236.  
  237. +define Device/zyxel_nbg6515-ac750
  238. + SOC := mt7620a
  239. + IMAGE_SIZE := 7872k
  240. + DEVICE_VENDOR := Zyxel
  241. + DEVICE_MODEL := NBG6515
  242. + DEVICE_PACKAGES := kmod-mt76x0e
  243. + SUPPORTED_DEVICES += nbg6515
  244. +endef
  245. +TARGET_DEVICES += zyxel_nbg6515-ac750
  246. +
  247. define Device/ralink_mt7620a-evb
  248. SOC := mt7620a
  249. IMAGE_SIZE := 7872k
  250.  
Advertisement
Comments
  • Voha888
    1 year
    # text 0.10 KB | 0 0
    1. Hello! Does You have 5 GHz ROM for Openwrt 22.03 ? Or its patch compatible with Openwrt 22.03 ? Thank You!
Add Comment
Please, Sign In to add comment
Advertisement