1
0

ar7242_buffalo_wzr-hp-g302h-a1a0.dts 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  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 "ar7242.dtsi"
  6. / {
  7. compatible = "buffalo,wzr-hp-g302h-a1a0", "qca,ar7242";
  8. model = "Buffalo WZR-HP-G302H A1A0";
  9. aliases {
  10. led-boot = &diag;
  11. led-failsafe = &diag;
  12. led-upgrade = &diag;
  13. };
  14. extosc: ref {
  15. compatible = "fixed-clock";
  16. #clock-cells = <0>;
  17. clock-frequency = <40000000>;
  18. };
  19. keys {
  20. compatible = "gpio-keys-polled";
  21. poll-interval = <20>;
  22. reset {
  23. label = "reset";
  24. linux,code = <KEY_RESTART>;
  25. gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
  26. debounce-interval = <60>;
  27. };
  28. button_usb {
  29. label = "usb";
  30. linux,code = <BTN_2>;
  31. gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
  32. debounce-interval = <60>;
  33. };
  34. router_on {
  35. label = "router_on";
  36. linux,code = <BTN_5>;
  37. linux,input-type = <EV_SW>;
  38. gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
  39. debounce-interval = <60>;
  40. };
  41. movie_engine {
  42. label = "movie_engine";
  43. linux,code = <BTN_3>;
  44. linux,input-type = <EV_SW>;
  45. gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
  46. debounce-interval = <60>;
  47. };
  48. wps {
  49. label = "wps";
  50. linux,code = <KEY_WPS_BUTTON>;
  51. gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
  52. debounce-interval = <60>;
  53. };
  54. };
  55. leds {
  56. compatible = "gpio-leds";
  57. diag: diag {
  58. label = "buffalo:red:diag";
  59. gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
  60. };
  61. };
  62. ath9k-leds {
  63. compatible = "gpio-leds";
  64. usb {
  65. label = "buffalo:blue:usb";
  66. gpios = <&ath9k 4 GPIO_ACTIVE_LOW>;
  67. trigger-sources = <&hub_port>;
  68. linux,default-trigger = "usbport";
  69. };
  70. wireless {
  71. label = "buffalo:green:wireless";
  72. gpios = <&ath9k 5 GPIO_ACTIVE_LOW>;
  73. linux,default-trigger = "phy0tpt";
  74. };
  75. security {
  76. label = "buffalo:orange:security";
  77. gpios = <&ath9k 6 GPIO_ACTIVE_LOW>;
  78. };
  79. router {
  80. label = "buffalo:green:router";
  81. gpios = <&ath9k 7 GPIO_ACTIVE_LOW>;
  82. };
  83. movie_engine_on {
  84. label = "buffalo:blue:movie_engine_on";
  85. gpios = <&ath9k 8 GPIO_ACTIVE_LOW>;
  86. };
  87. movie_engine_off {
  88. label = "buffalo:blue:movie_engine_off";
  89. gpios = <&ath9k 9 GPIO_ACTIVE_LOW>;
  90. };
  91. };
  92. gpio-export {
  93. compatible = "gpio-export";
  94. #size-cells = <0>;
  95. gpio_usb_power {
  96. gpio-export,name = "buffalo:usb-power";
  97. gpio-export,output = <1>;
  98. gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
  99. };
  100. };
  101. virtual_flash {
  102. compatible = "mtd-concat";
  103. devices = <&flash0 &flash1>;
  104. partitions {
  105. compatible = "fixed-partitions";
  106. #address-cells = <1>;
  107. #size-cells = <1>;
  108. partition@0 {
  109. reg = <0x0 0x40000>;
  110. label = "u-boot";
  111. read-only;
  112. };
  113. partition@40000 {
  114. reg = <0x40000 0x10000>;
  115. label = "u-boot-env";
  116. };
  117. art: partition@50000 {
  118. reg = <0x50000 0x10000>;
  119. label = "art";
  120. read-only;
  121. };
  122. partition@60000 {
  123. compatible = "denx,uimage";
  124. reg = <0x60000 0x1f60000>;
  125. label = "firmware";
  126. };
  127. partition@1fc0000 {
  128. reg = <0x1fc0000 0x40000>;
  129. label = "user_property";
  130. read-only;
  131. };
  132. };
  133. };
  134. };
  135. &spi {
  136. status = "okay";
  137. cs-gpios = <0>, <0>;
  138. num-cs = <2>;
  139. flash0: flash@0 {
  140. compatible = "jedec,spi-nor";
  141. reg = <0>;
  142. spi-max-frequency = <25000000>;
  143. };
  144. flash1: flash@1 {
  145. compatible = "jedec,spi-nor";
  146. reg = <1>;
  147. spi-max-frequency = <25000000>;
  148. };
  149. };
  150. &mdio0 {
  151. status = "okay";
  152. phy-mask = <0x1>;
  153. phy0: ethernet-phy@0 {
  154. reg = <0>;
  155. phy-mode = "rgmii";
  156. };
  157. };
  158. &eth0 {
  159. status = "okay";
  160. pll-data = <0x1c000000 0x00000101 0x00001616>;
  161. mtd-mac-address = <&art 0x120c>;
  162. phy-mode = "rgmii";
  163. phy-handle = <&phy0>;
  164. };
  165. &pcie {
  166. status = "okay";
  167. ath9k: wifi@0,0 {
  168. compatible = "pci168c,002a";
  169. reg = <0x0000 0 0 0 0>;
  170. mtd-mac-address = <&art 0x120c>;
  171. qca,no-eeprom;
  172. #gpio-cells = <2>;
  173. gpio-controller;
  174. };
  175. };
  176. &pll {
  177. clocks = <&extosc>;
  178. };
  179. &uart {
  180. status = "okay";
  181. };
  182. &usb_phy {
  183. status = "okay";
  184. };
  185. &usb {
  186. #address-cells = <1>;
  187. #size-cells = <0>;
  188. status = "okay";
  189. hub_port: port@1 {
  190. reg = <1>;
  191. #trigger-source-cells = <0>;
  192. };
  193. };