wndr4700.dts 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405
  1. /*
  2. * Device Tree Source for Netgear WNDR4700/WNDR4720 Series
  3. *
  4. * Copyright 2008 DENX Software Engineering, Stefan Roese <sr@denx.de>
  5. *
  6. * This file is licensed under the terms of the GNU General Public
  7. * License version 2. This program is licensed "as is" without
  8. * any warranty of any kind, whether express or implied.
  9. */
  10. /dts-v1/;
  11. #include "apm82181.dtsi"
  12. #include <dt-bindings/thermal/thermal.h>
  13. / {
  14. model = "Netgear WNDR4700/WNDR4720 Series";
  15. compatible = "netgear,wndr4700";
  16. aliases {
  17. serial0 = &UART0;
  18. };
  19. chosen {
  20. linux,stdout-path = "/plb/opb/serial@ef600300";
  21. };
  22. thermal-zones {
  23. cpu_thermal: cpu-thermal {
  24. polling-delay-passive = <10000>; /* milliseconds */
  25. polling-delay = <20000>; /* milliseconds */
  26. thermal-sensors = <&temp0 1>;
  27. trips {
  28. /*
  29. * Once the thermal governers are a bit smarter
  30. * and do hysteresis properly, we can disable
  31. * the fan when the HDD and CPU has < 39 C.
  32. */
  33. cpu_alert0: cpu-alert0 {
  34. temperature = <25000>;
  35. hysteresis = <2000>;
  36. type = "active";
  37. };
  38. cpu_alert1: cpu-alert1 {
  39. temperature = <27000>; /* millicelsius */
  40. hysteresis = <2000>; /* millicelsius */
  41. type = "active";
  42. };
  43. cpu_alert2: cpu-alert2 {
  44. temperature = <65000>; /* millicelsius */
  45. hysteresis = <2000>; /* millicelsius */
  46. type = "active";
  47. };
  48. cpu_alert3: cpu-alert3 {
  49. temperature = <70000>; /* millicelsius */
  50. hysteresis = <2000>; /* millicelsius */
  51. type = "active";
  52. };
  53. cpu_alert4: cpu-alert4 {
  54. temperature = <75000>; /* millicelsius */
  55. hysteresis = <2000>; /* millicelsius */
  56. type = "active";
  57. };
  58. cpu_alert5: cpu-alert5 {
  59. temperature = <80000>; /* millicelsius */
  60. hysteresis = <2000>; /* millicelsius */
  61. type = "active";
  62. };
  63. cpu_alert6: cpu-alert6 {
  64. temperature = <850000>; /* millicelsius */
  65. hysteresis = <2000>; /* millicelsius */
  66. type = "active";
  67. };
  68. cpu_crit: cpu-crit {
  69. temperature = <90000>; /* millicelsius */
  70. hysteresis = <2000>; /* millicelsius */
  71. type = "critical";
  72. };
  73. };
  74. cooling-maps {
  75. map0 {
  76. trip = <&cpu_alert0>;
  77. cooling-device = <&fan0 THERMAL_NO_LIMIT 0>;
  78. };
  79. map1 {
  80. trip = <&cpu_alert1>;
  81. cooling-device = <&fan0 1 87>;
  82. };
  83. map2 {
  84. trip = <&cpu_alert2>;
  85. cooling-device = <&fan0 88 100>;
  86. };
  87. map3 {
  88. trip = <&cpu_alert3>;
  89. cooling-device = <&fan0 101 147>;
  90. };
  91. map4 {
  92. trip = <&cpu_alert4>;
  93. cooling-device = <&fan0 148 207>;
  94. };
  95. map5 {
  96. trip = <&cpu_alert5>;
  97. cooling-device = <&fan0 208 231>;
  98. };
  99. map6 {
  100. trip = <&cpu_alert6>;
  101. cooling-device =<&fan0 232 THERMAL_NO_LIMIT>;
  102. };
  103. };
  104. };
  105. };
  106. };
  107. &CRYPTO {
  108. status = "okay";
  109. };
  110. &PKA {
  111. status = "okay";
  112. };
  113. &TRNG {
  114. status = "okay";
  115. };
  116. &SATA1 {
  117. status = "okay";
  118. };
  119. &USBOTG0 {
  120. status = "okay";
  121. dr_mode = "host";
  122. };
  123. &EBC0 {
  124. ndfc@1,0 {
  125. status = "okay";
  126. /* 128 MiB Nand Flash */
  127. nand {
  128. #address-cells = <1>;
  129. #size-cells = <1>;
  130. partition0,0@0x00000000 {
  131. label = "NAND 128MiB 3,3V 8-bit";
  132. reg = <0x00000000 0x08000000>;
  133. read-only;
  134. };
  135. partition0,1@0x00000000 {
  136. label = "uboot";
  137. reg = <0x00000000 0x00180000>;
  138. read-only;
  139. };
  140. partition0,2@0x00180000 {
  141. label = "device-tree";
  142. reg = <0x00180000 0x00020000>;
  143. };
  144. partition0,3@0x001a0000 {
  145. label = "kernel";
  146. reg = <0x001a0000 0x001e0000>;
  147. /*
  148. * will also contain a fake/empty
  149. * rootfs to fool Netgear's uboot
  150. * rootfs integrety checks.
  151. */
  152. };
  153. partition0,4@0x00380000 {
  154. label = "ubi";
  155. reg = <0x00380000 0x01660000>;
  156. };
  157. partition0,5@0x019e0000 {
  158. label = "config";
  159. reg = <0x019e0000 0x00080000>;
  160. read-only;
  161. };
  162. partition0,6@0x01a60000 {
  163. label = "pot";
  164. reg = <0x01a60000 0x00080000>;
  165. read-only;
  166. };
  167. partition0,7@0x01ae0000 {
  168. label = "traffic_meter";
  169. reg = <0x01ae0000 0x00300000>;
  170. read-only;
  171. };
  172. partition0,8@0x01de0000 {
  173. label = "language";
  174. reg = <0x01de0000 0x001c0000>;
  175. read-only;
  176. };
  177. partition0,9@0x01fa0000 {
  178. label = "ecos";
  179. reg = <0x01fa0000 0x06020000>;
  180. read-only;
  181. };
  182. partition0,10@0x07fc0000 {
  183. label = "wifi_data";
  184. reg = <0x07fc0000 0x00040000>;
  185. read-only;
  186. };
  187. partition0,11@0x00180000 {
  188. label = "firmware";
  189. reg = <0x00180000 0x01860000>;
  190. read-only;
  191. };
  192. };
  193. };
  194. };
  195. &UART0 {
  196. status = "okay";
  197. };
  198. &GPIO0 {
  199. status = "okay";
  200. #interrupt-cells = <2>;
  201. interrupt-controller;
  202. interrupts-extended = <&UIC1 0x14>,
  203. <&UIC1 0x1e>,
  204. <&UIC1 0x1f>,
  205. <&UIC2 0x19>;
  206. };
  207. &IIC0 {
  208. status = "okay";
  209. fan0: fan@1b {
  210. compatible = "microchip,tc654";
  211. reg = <0x1b>;
  212. cooling-min-level = <0>;
  213. cooling-max-level = <255>;
  214. #cooling-cells = <2>; /* min followed by max */
  215. gpios = <&GPIO0 16 GPIO_ACTIVE_LOW>; /* fan status */
  216. alarm-gpios = <&GPIO0 5 GPIO_ACTIVE_LOW>; /* fault */
  217. interrupt-parent = <&UIC3>;
  218. interrupts = <0x16 IRQ_TYPE_EDGE_FALLING>; /* fault */
  219. };
  220. temp0: temp@4d {
  221. compatible = "gmt,g781";
  222. reg = <0x4d>;
  223. #thermal-sensor-cells = <1>;
  224. /*
  225. * The LM90 has two sensors:
  226. * temp0 -> internal to LM90
  227. * temp1 -> external NTC near CPU
  228. */
  229. };
  230. };
  231. &EMAC0 {
  232. status = "okay";
  233. phy-handle = <&phy0>;
  234. mdio {
  235. #address-cells = <1>;
  236. #size-cells = <0>;
  237. phy0: ethernet-phy@0 {
  238. device_type = "ethernet-phy";
  239. reg = <0>;
  240. qca,ar8327-initvals = <
  241. 0x0010 0x40000000
  242. 0x0624 0x007f7f7f
  243. 0x0004 0x07a00000 /* PAD0_MODE */
  244. 0x000c 0x01000000 /* PAD6_MODE */
  245. 0x007c 0x0000007e /* PORT0_STATUS */
  246. >;
  247. };
  248. };
  249. };
  250. &POB0 {
  251. gpio_keys_polled {
  252. compatible = "gpio-keys-polled";
  253. #address-cells = <1>;
  254. #size-cells = <0>;
  255. #interrupt-cells = <2>;
  256. autorepeat;
  257. poll-interval = <60>; /* 3 * 20 = 60ms */
  258. reset {
  259. label = "Reset button";
  260. linux,code = <KEY_RESTART>;
  261. gpios = <&GPIO0 15 GPIO_ACTIVE_HIGH>;
  262. interrupt-parent = <&UIC1>;
  263. interrupts = <0x14 IRQ_TYPE_EDGE_FALLING>;
  264. };
  265. backup_hd {
  266. label = "Backup HD button";
  267. gpios = <&GPIO0 19 GPIO_ACTIVE_HIGH>;
  268. linux,code = <BTN_0>;
  269. interrupt-parent = <&UIC1>;
  270. interrupts = <0x1e IRQ_TYPE_EDGE_FALLING>;
  271. };
  272. rfkill {
  273. label = "RFKILL button";
  274. gpios = <&GPIO0 20 GPIO_ACTIVE_HIGH>;
  275. linux,code = <KEY_RFKILL>;
  276. interrupt-parent = <&UIC1>;
  277. interrupts = <0x1f IRQ_TYPE_EDGE_FALLING>;
  278. };
  279. wps {
  280. label = "WPS button";
  281. gpios = <&GPIO0 23 GPIO_ACTIVE_HIGH>;
  282. linux,code = <KEY_WPS_BUTTON>;
  283. interrupt-parent = <&UIC2>;
  284. interrupts = <0x19 IRQ_TYPE_EDGE_FALLING>;
  285. };
  286. sdcard {
  287. label = "SDCard inserted";
  288. gpios = <&GPIO0 7 GPIO_ACTIVE_LOW>;
  289. linux,code = <BTN_1>;
  290. };
  291. };
  292. gpio-leds {
  293. compatible = "gpio-leds";
  294. power-green {
  295. label = "wndr4700:green:power";
  296. gpios = <&GPIO0 8 GPIO_ACTIVE_HIGH>;
  297. };
  298. power-orange {
  299. label = "wndr4700:orange:power";
  300. gpios = <&GPIO0 9 GPIO_ACTIVE_LOW>;
  301. linux,default-trigger = "panic";
  302. };
  303. usb-blue {
  304. label = "wndr4700:blue:usb";
  305. gpios = <&GPIO0 10 GPIO_ACTIVE_HIGH>;
  306. };
  307. logo-white {
  308. label = "wndr4700:white:logo";
  309. gpios = <&GPIO0 11 GPIO_ACTIVE_HIGH>;
  310. };
  311. wan-yellow {
  312. label = "wndr4700:yellow:wan";
  313. gpios = <&GPIO0 3 GPIO_ACTIVE_HIGH>;
  314. };
  315. wan-green {
  316. label = "wndr4700:green:wan";
  317. gpios = <&GPIO0 12 GPIO_ACTIVE_HIGH>;
  318. };
  319. hd-green {
  320. label = "wndr4700:green:hd";
  321. gpios = <&GPIO0 14 GPIO_ACTIVE_HIGH>;
  322. };
  323. hd-red {
  324. label = "wndr4700:red:hd";
  325. gpios = <&GPIO0 17 GPIO_ACTIVE_HIGH>;
  326. };
  327. wlan-blue {
  328. label = "wndr4700:blue:wlan";
  329. gpios = <&GPIO0 18 GPIO_ACTIVE_HIGH>;
  330. };
  331. };
  332. };
  333. &PCIE0 {
  334. status = "okay";
  335. };
  336. &MSI {
  337. status = "okay";
  338. };