DGN3500.dtsi 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. #include "ar9.dtsi"
  2. #include <dt-bindings/input/input.h>
  3. / {
  4. chosen {
  5. bootargs = "root= console=ttyLTQ0,115200";
  6. };
  7. aliases {
  8. led-boot = &power_green;
  9. led-failsafe = &power_red;
  10. led-running = &power_green;
  11. led-upgrade = &power_green;
  12. led-dsl = &dsl;
  13. led-internet = &internet;
  14. led-usb = &led_usb;
  15. led-wifi = &wifi_green;
  16. };
  17. memory@0 {
  18. reg = <0x0 0x4000000>;
  19. };
  20. rtl8366rb {
  21. compatible = "realtek,rtl8366rb";
  22. gpio-sda = <&gpio 35 GPIO_ACTIVE_HIGH>;
  23. gpio-sck = <&gpio 37 GPIO_ACTIVE_HIGH>;
  24. realtek,initvals = <
  25. 0x0000 0x0830
  26. 0x0400 0x8130
  27. 0x000A 0x83ED
  28. 0x0F51 0x0017
  29. 0x02F5 0x0048
  30. 0x02FA 0xFFDF
  31. 0x02FB 0xFFE0
  32. 0x0450 0x0000
  33. 0x0401 0x0000
  34. 0x0431 0x0960
  35. >;
  36. };
  37. gpio-keys-polled {
  38. compatible = "gpio-keys-polled";
  39. #address-cells = <1>;
  40. #size-cells = <0>;
  41. poll-interval = <100>;
  42. rfkill {
  43. label = "rfkill";
  44. gpios = <&gpio 36 GPIO_ACTIVE_LOW>;
  45. linux,code = <KEY_RFKILL>;
  46. };
  47. wps {
  48. label = "wps";
  49. gpios = <&gpio 54 GPIO_ACTIVE_LOW>;
  50. linux,code = <KEY_WPS_BUTTON>;
  51. };
  52. reset {
  53. label = "reset";
  54. gpios = <&gpio 53 GPIO_ACTIVE_LOW>;
  55. linux,code = <KEY_RESTART>;
  56. };
  57. };
  58. gpio-leds {
  59. compatible = "gpio-leds";
  60. internet: internet {
  61. label = "dgn3500:green:internet";
  62. gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
  63. };
  64. internet2 {
  65. label = "dgn3500:red:internet";
  66. gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
  67. };
  68. dsl: dsl {
  69. label = "dgn3500:green:dsl";
  70. gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
  71. };
  72. led_usb: usb {
  73. label = "dgn3500:green:usb";
  74. gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
  75. };
  76. power_green: power {
  77. label = "dgn3500:green:power";
  78. gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
  79. default-state = "keep";
  80. };
  81. power_red: power2 {
  82. label = "dgn3500:red:power";
  83. gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
  84. };
  85. wifi_green: wifi {
  86. label = "dgn3500:green:wireless";
  87. gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
  88. };
  89. wifi2 {
  90. label = "dgn3500:amber:wireless";
  91. gpios = <&gpio 51 GPIO_ACTIVE_LOW>;
  92. };
  93. wps {
  94. label = "dgn3500:green:wps";
  95. gpios = <&gpio 52 GPIO_ACTIVE_LOW>;
  96. };
  97. };
  98. };
  99. &gpio {
  100. pinctrl-names = "default";
  101. pinctrl-0 = <&state_default>;
  102. state_default: pinmux {
  103. exin {
  104. lantiq,groups = "exin1";
  105. lantiq,function = "exin";
  106. };
  107. pci {
  108. lantiq,groups = "gnt1", "req1";
  109. lantiq,function = "pci";
  110. };
  111. pci-in {
  112. lantiq,groups = "req1";
  113. lantiq,output = <0>;
  114. lantiq,open-drain = <1>;
  115. lantiq,pull = <2>;
  116. };
  117. pci-out {
  118. lantiq,groups = "gnt1";
  119. lantiq,output = <1>;
  120. lantiq,pull = <0>;
  121. };
  122. };
  123. pins_spi_default: pins_spi_default {
  124. spi_in {
  125. lantiq,groups = "spi_di";
  126. lantiq,function = "spi";
  127. };
  128. spi_out {
  129. lantiq,groups = "spi_do", "spi_clk",
  130. "spi_cs4";
  131. lantiq,function = "spi";
  132. lantiq,output = <1>;
  133. };
  134. };
  135. };
  136. &gsw {
  137. phy-mode = "mii";
  138. };
  139. &pci0 {
  140. status = "okay";
  141. gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
  142. wifi@168c,0029 {
  143. compatible = "pci168c,0029";
  144. reg = <0x7000 0 0 0 0>;
  145. qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
  146. };
  147. };
  148. &spi {
  149. status = "okay";
  150. pinctrl-names = "default";
  151. pinctrl-0 = <&pins_spi_default>;
  152. m25p80@4 {
  153. #address-cells = <1>;
  154. #size-cells = <1>;
  155. compatible = "jedec,spi-nor";
  156. reg = <4 0>;
  157. spi-max-frequency = <20000000>;
  158. partitions {
  159. compatible = "fixed-partitions";
  160. #address-cells = <1>;
  161. #size-cells = <1>;
  162. partition@0 {
  163. reg = <0x0 0x10000>;
  164. label = "uboot";
  165. read-only;
  166. };
  167. partition@10000 {
  168. reg = <0x10000 0x10000>;
  169. label = "uboot-env";
  170. read-only;
  171. };
  172. ath9k_cal: partition@20000 {
  173. reg = <0x20000 0x10000>;
  174. label = "calibration";
  175. read-only;
  176. };
  177. partition@50000 {
  178. reg = <0x50000 0xfa0000>;
  179. label = "firmware";
  180. };
  181. };
  182. };
  183. };
  184. &usb_phy0 {
  185. status = "okay";
  186. };
  187. &usb0 {
  188. status = "okay";
  189. };