ar7161_netgear_wndr3700.dtsi 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  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. aliases {
  8. led-boot = &power_orange;
  9. led-failsafe = &power_orange;
  10. led-running = &power_green;
  11. led-upgrade = &power_orange;
  12. };
  13. chosen {
  14. bootargs = "console=ttyS0,115200";
  15. };
  16. extosc: ref {
  17. compatible = "fixed-clock";
  18. #clock-cells = <0>;
  19. clock-output-names = "ref";
  20. clock-frequency = <40000000>;
  21. };
  22. reset-leds {
  23. compatible = "reset-leds";
  24. usb_led {
  25. label = "netgear:green:usb";
  26. resets = <&rst 12>;
  27. trigger-sources = <&usb_ochi_port>, <&usb_echi_port>;
  28. linux,default-trigger = "usbport";
  29. };
  30. };
  31. gpio-leds {
  32. compatible = "gpio-leds";
  33. wps {
  34. label = "netgear:orange:wps";
  35. gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
  36. };
  37. power_green: power_green {
  38. label = "netgear:green:power";
  39. gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
  40. };
  41. power_orange: power_orange {
  42. label = "netgear:orange:power";
  43. gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
  44. default-state = "on";
  45. };
  46. wps_green {
  47. label = "netgear:green:wps";
  48. gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
  49. };
  50. wan_green {
  51. label = "netgear:green:wan";
  52. gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
  53. };
  54. };
  55. ath9k-leds {
  56. compatible = "gpio-leds";
  57. wlan2g {
  58. label = "netgear:green:wlan2g";
  59. gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>;
  60. linux,default-trigger = "phy0tpt";
  61. };
  62. wlan5g {
  63. label = "netgear:blue:wlan5g";
  64. gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>;
  65. linux,default-trigger = "phy1tpt";
  66. };
  67. };
  68. keys {
  69. compatible = "gpio-keys";
  70. wps {
  71. label = "wps";
  72. linux,code = <KEY_WPS_BUTTON>;
  73. gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
  74. };
  75. reset {
  76. label = "reset";
  77. linux,code = <KEY_RESTART>;
  78. gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
  79. };
  80. rfkill {
  81. label = "rfkill";
  82. linux,code = <KEY_RFKILL>;
  83. gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
  84. };
  85. };
  86. rtl8366s {
  87. compatible = "realtek,rtl8366s";
  88. gpio-sda = <&gpio 5 GPIO_ACTIVE_HIGH>;
  89. gpio-sck = <&gpio 7 GPIO_ACTIVE_HIGH>;
  90. mdio-bus {
  91. #address-cells = <1>;
  92. #size-cells = <0>;
  93. status = "okay";
  94. phy-mask = <0x10>;
  95. phy4: ethernet-phy@4 {
  96. reg = <4>;
  97. phy-mode = "rgmii";
  98. };
  99. };
  100. };
  101. };
  102. &usb_phy {
  103. status = "okay";
  104. };
  105. &usb1 {
  106. #address-cells = <1>;
  107. #size-cells = <0>;
  108. status = "okay";
  109. usb_ochi_port: port@1 {
  110. reg = <1>;
  111. #trigger-source-cells = <0>;
  112. };
  113. };
  114. &usb2 {
  115. #address-cells = <1>;
  116. #size-cells = <0>;
  117. status = "okay";
  118. usb_echi_port: port@1 {
  119. reg = <1>;
  120. #trigger-source-cells = <0>;
  121. };
  122. };
  123. &pcie0 {
  124. status = "okay";
  125. ath9k0: wifi@0,11 {
  126. compatible = "pci168c,0029";
  127. reg = <0x8800 0 0 0 0>;
  128. mtd-mac-address = <&art 0x0>;
  129. qca,no-eeprom;
  130. #gpio-cells = <2>;
  131. gpio-controller;
  132. /* all WNDR3700 variants have four antennae dedicated
  133. * to the 2.4GHz radio. Two antennae are available for
  134. * each chain. The following configuration is the
  135. * default setting which taken from the vendor's wifi
  136. * code for that radio.
  137. *
  138. * All possible options [GPIO6,GPIO7,GPIO8,GPIO9]:
  139. * [0,1,0,1], [0,1,1,0], [1,0,0,1], [1,0,1,0]
  140. */
  141. antenna-demux {
  142. gpio-hog;
  143. line-name = "fixed antenna group 1";
  144. gpios = <6 GPIO_ACTIVE_LOW>,
  145. <7 GPIO_ACTIVE_HIGH>,
  146. <8 GPIO_ACTIVE_LOW>,
  147. <9 GPIO_ACTIVE_HIGH>;
  148. output-high;
  149. };
  150. };
  151. ath9k1: wifi@0,12 {
  152. compatible = "pci168c,0029";
  153. reg = <0x9000 0 0 0 0>;
  154. mtd-mac-address = <&art 0xc>;
  155. qca,no-eeprom;
  156. #gpio-cells = <2>;
  157. gpio-controller;
  158. };
  159. };
  160. &uart {
  161. status = "okay";
  162. };
  163. &spi {
  164. status = "okay";
  165. num-cs = <1>;
  166. flash@0 {
  167. compatible = "jedec,spi-nor";
  168. reg = <0>;
  169. spi-max-frequency = <25000000>;
  170. partitions: partitions {
  171. compatible = "fixed-partitions";
  172. #address-cells = <1>;
  173. #size-cells = <1>;
  174. };
  175. };
  176. };
  177. &eth0 {
  178. status = "okay";
  179. pll-data = <0x11110000 0x00001099 0x00991099>;
  180. mtd-mac-address = <&art 0x00>;
  181. fixed-link {
  182. speed = <1000>;
  183. full-duplex;
  184. };
  185. };
  186. &eth1 {
  187. status = "okay";
  188. pll-data = <0x11110000 0x00001099 0x00991099>;
  189. mtd-mac-address = <&art 0x06>;
  190. phy-handle = <&phy4>;
  191. };