ar1022_iodata_wn-ag300dgr.dts 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  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 "ar9344.dtsi"
  6. / {
  7. compatible = "iodata,wn-ag300dgr", "qca,ar9344";
  8. model = "I-O DATA WN-AG300DGR";
  9. aliases {
  10. led-boot = &router;
  11. led-failsafe = &router;
  12. led-running = &router;
  13. led-upgrade = &router;
  14. };
  15. leds {
  16. compatible = "gpio-leds";
  17. router: router {
  18. label = "wn-ag300dgr:green:router";
  19. gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
  20. default-state = "on";
  21. };
  22. children {
  23. label = "wn-ag300dgr:green:children";
  24. gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
  25. };
  26. eco {
  27. label = "wn-ag300dgr:green:eco";
  28. gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
  29. };
  30. notification {
  31. label = "wn-ag300dgr:amber:notification";
  32. gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
  33. };
  34. wlan2g {
  35. label = "wn-ag300dgr:green:wlan2g";
  36. gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
  37. linux,default-trigger = "phy0tpt";
  38. };
  39. wlan5g {
  40. label = "wn-ag300dgr:green:wlan5g";
  41. gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
  42. linux,default-trigger = "phy1tpt";
  43. };
  44. };
  45. keys {
  46. compatible = "gpio-keys-polled";
  47. poll-interval = <20>;
  48. eco {
  49. label = "eco";
  50. gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
  51. linux,code = <BTN_1>;
  52. debounce-interval = <60>;
  53. };
  54. router {
  55. label = "router";
  56. gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
  57. linux,code = <BTN_0>;
  58. linux,input-type = <EV_SW>;
  59. debounce-interval = <60>;
  60. };
  61. auto {
  62. label = "auto";
  63. gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
  64. linux,code = <BTN_0>;
  65. linux,input-type = <EV_SW>;
  66. debounce-interval = <60>;
  67. };
  68. wps {
  69. label = "wps";
  70. gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
  71. linux,code = <KEY_WPS_BUTTON>;
  72. debounce-interval = <60>;
  73. };
  74. reset {
  75. label = "reset";
  76. gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
  77. linux,code = <KEY_RESTART>;
  78. debounce-interval = <60>;
  79. };
  80. children {
  81. label = "children";
  82. gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
  83. linux,code = <BTN_1>;
  84. debounce-interval = <60>;
  85. };
  86. };
  87. };
  88. &ref {
  89. clock-frequency = <25000000>;
  90. };
  91. &spi {
  92. num-cs = <1>;
  93. status = "okay";
  94. flash@0 {
  95. compatible = "jedec,spi-nor";
  96. reg = <0>;
  97. spi-max-frequency = <25000000>;
  98. partitions {
  99. compatible = "fixed-partitions";
  100. #address-cells = <1>;
  101. #size-cells = <1>;
  102. partition@0 {
  103. label = "u-boot";
  104. reg = <0x000000 0x030000>;
  105. read-only;
  106. };
  107. partition@30000 {
  108. label = "u-boot-env";
  109. reg = <0x030000 0x010000>;
  110. read-only;
  111. };
  112. partition@40000 {
  113. compatible = "denx,uimage";
  114. label = "firmware";
  115. reg = <0x040000 0xf10000>;
  116. };
  117. partition@f50000 {
  118. label = "manufacture";
  119. reg = <0xf50000 0x40000>;
  120. read-only;
  121. };
  122. partition@f90000 {
  123. label = "backup";
  124. reg = <0xf90000 0x10000>;
  125. read-only;
  126. };
  127. partition@fa0000 {
  128. label = "storage";
  129. reg = <0xfa0000 0x50000>;
  130. read-only;
  131. };
  132. partition@ff0000 {
  133. label = "art";
  134. reg = <0xff0000 0x010000>;
  135. read-only;
  136. };
  137. };
  138. };
  139. };
  140. &mdio0 {
  141. status = "okay";
  142. phy0: ethernet-phy@0 {
  143. reg = <0>;
  144. phy-mode = "rgmii";
  145. qca,ar8327-initvals = <
  146. 0x04 0x07a00000 /* PORT0 PAD MODE CTRL */
  147. 0x7c 0x000000fe /* PORT0_STATUS */
  148. >;
  149. };
  150. };
  151. &eth0 {
  152. status = "okay";
  153. pll-data = <0x06000000 0x00000101 0x00001616>;
  154. phy-mode = "rgmii";
  155. phy-handle = <&phy0>;
  156. gmac-config {
  157. device = <&gmac>;
  158. rgmii-gmac0 = <1>;
  159. };
  160. };
  161. &pcie {
  162. status = "okay";
  163. };
  164. &uart {
  165. status = "okay";
  166. };
  167. &usb {
  168. status = "okay";
  169. };
  170. &usb_phy {
  171. status = "okay";
  172. };
  173. &wmac {
  174. status = "okay";
  175. qca,no-eeprom;
  176. };