ar7161_buffalo_wzr-hp-ag300h.dts 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. /dts-v1/;
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. #include "ar7100.dtsi"
  6. / {
  7. compatible = "buffalo,wzr-hp-ag300h", "qca,ar7161";
  8. model = "Buffalo WZR-HP-AG300H/WZR-600DHP";
  9. aliases {
  10. led-boot = &diag;
  11. led-failsafe = &diag;
  12. led-upgrade = &diag;
  13. };
  14. chosen {
  15. bootargs = "console=ttyS0,115200";
  16. };
  17. extosc: ref {
  18. compatible = "fixed-clock";
  19. #clock-cells = <0>;
  20. clock-output-names = "ref";
  21. clock-frequency = <40000000>;
  22. };
  23. gpio-leds {
  24. compatible = "gpio-leds";
  25. diag: diag {
  26. label = "buffalo:red:diag";
  27. gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
  28. };
  29. };
  30. ath9k-leds {
  31. // those leds are indeed attached to the wifi chips
  32. compatible = "gpio-leds";
  33. band2g_a {
  34. label = "buffalo:amber:band2g";
  35. gpios = <&ath9k0 1 GPIO_ACTIVE_LOW>;
  36. };
  37. usb {
  38. label = "buffalo:green:usb";
  39. gpios = <&ath9k0 3 GPIO_ACTIVE_LOW>;
  40. trigger-sources = <&usb_ochi_port>, <&usb_echi_port>;
  41. linux,default-trigger = "usbport";
  42. };
  43. band2g_g {
  44. label = "buffalo:green:band2g";
  45. gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>;
  46. linux,default-trigger = "phy0tpt";
  47. };
  48. band5g_g {
  49. label = "buffalo:green:band5g";
  50. gpios = <&ath9k1 1 GPIO_ACTIVE_LOW>;
  51. linux,default-trigger = "phy1tpt";
  52. };
  53. router {
  54. label = "buffalo:green:router";
  55. gpios = <&ath9k1 3 GPIO_ACTIVE_LOW>;
  56. };
  57. movie_engine {
  58. label = "buffalo:blue:movie_engine";
  59. gpios = <&ath9k1 4 GPIO_ACTIVE_LOW>;
  60. };
  61. band5g_a {
  62. label = "buffalo:amber:band5g";
  63. gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>;
  64. };
  65. };
  66. keys {
  67. compatible = "gpio-keys-polled";
  68. poll-interval = <20>;
  69. reset {
  70. linux,code = <KEY_RESTART>;
  71. gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
  72. debounce-interval = <60>;
  73. };
  74. usb {
  75. linux,code = <BTN_2>;
  76. gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
  77. debounce-interval = <60>;
  78. };
  79. aoss {
  80. linux,code = <KEY_WPS_BUTTON>;
  81. gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
  82. debounce-interval = <60>;
  83. };
  84. router_auto {
  85. linux,code = <BTN_6>;
  86. gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
  87. debounce-interval = <60>;
  88. };
  89. router_off {
  90. linux,code = <BTN_5>;
  91. gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
  92. debounce-interval = <60>;
  93. };
  94. movie_engine {
  95. linux,code = <BTN_7>;
  96. gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
  97. debounce-interval = <60>;
  98. };
  99. };
  100. gpio-export {
  101. compatible = "gpio-export";
  102. gpio_usb_power {
  103. gpio-export,name = "buffalo:power:usb";
  104. gpio-export,output = <1>;
  105. gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
  106. };
  107. };
  108. flash {
  109. compatible = "mtd-concat";
  110. devices = <&flash0 &flash1>;
  111. partitions {
  112. compatible = "fixed-partitions";
  113. #address-cells = <1>;
  114. #size-cells = <1>;
  115. partition@0 {
  116. label = "u-boot";
  117. reg = <0x0000000 0x0040000>;
  118. read-only;
  119. };
  120. partition@40000 {
  121. label = "u-boot-env";
  122. reg = <0x0040000 0x0010000>;
  123. read-only;
  124. };
  125. art: partition@50000 {
  126. label = "art";
  127. reg = <0x0050000 0x0010000>;
  128. read-only;
  129. };
  130. partition@60000 {
  131. compatible = "denx,uimage";
  132. label = "firmware";
  133. reg = <0x0060000 0x1f90000>;
  134. };
  135. partition@1ff0000 {
  136. label = "user_property";
  137. reg = <0x1ff0000 0x0010000>;
  138. read-only;
  139. };
  140. };
  141. };
  142. };
  143. &usb_phy {
  144. status = "okay";
  145. };
  146. &usb1 {
  147. #address-cells = <1>;
  148. #size-cells = <0>;
  149. status = "okay";
  150. usb_ochi_port: port@1 {
  151. reg = <1>;
  152. #trigger-source-cells = <0>;
  153. };
  154. };
  155. &usb2 {
  156. #address-cells = <1>;
  157. #size-cells = <0>;
  158. status = "okay";
  159. usb_echi_port: port@1 {
  160. reg = <1>;
  161. #trigger-source-cells = <0>;
  162. };
  163. };
  164. &pcie0 {
  165. status = "okay";
  166. ath9k0: wifi@0,11 {
  167. compatible = "pci168c,0029";
  168. reg = <0x8800 0 0 0 0>;
  169. qca,no-eeprom;
  170. #gpio-cells = <2>;
  171. gpio-controller;
  172. };
  173. ath9k1: wifi@0,12 {
  174. compatible = "pci168c,0029";
  175. reg = <0x9000 0 0 0 0>;
  176. qca,no-eeprom;
  177. #gpio-cells = <2>;
  178. gpio-controller;
  179. };
  180. };
  181. &uart {
  182. status = "okay";
  183. };
  184. &pll {
  185. clocks = <&extosc>;
  186. };
  187. &spi {
  188. status = "okay";
  189. num-cs = <2>;
  190. cs-gpios = <0>, <0>;
  191. flash0: flash@0 {
  192. compatible = "jedec,spi-nor";
  193. reg = <0>;
  194. spi-max-frequency = <104000000>;
  195. m25p,fast-read;
  196. };
  197. flash1: flash@1 {
  198. compatible = "jedec,spi-nor";
  199. reg = <1>;
  200. spi-max-frequency = <104000000>;
  201. m25p,fast-read;
  202. };
  203. };
  204. &mdio0 {
  205. status = "okay";
  206. phy4: ethernet-phy@4 {
  207. reg = <4>;
  208. phy-mode = "rgmii";
  209. };
  210. };
  211. &eth0 {
  212. status = "okay";
  213. mtd-mac-address = <&art 0x120c>;
  214. fixed-link {
  215. speed = <1000>;
  216. full-duplex;
  217. };
  218. };
  219. &eth1 {
  220. status = "okay";
  221. mtd-mac-address = <&art 0x520c>;
  222. mtd-mac-address-increment = <1>;
  223. phy-handle = <&phy4>;
  224. };