qcom-ipq8065-nighthawk.dtsi 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541
  1. #include "qcom-ipq8065-smb208.dtsi"
  2. #include <dt-bindings/input/input.h>
  3. #include <dt-bindings/leds/common.h>
  4. / {
  5. memory@0 {
  6. reg = <0x42000000 0x1e000000>;
  7. device_type = "memory";
  8. };
  9. reserved-memory {
  10. rsvd@5fe00000 {
  11. reg = <0x5fe00000 0x200000>;
  12. reusable;
  13. };
  14. ramoops@42100000 {
  15. compatible = "ramoops";
  16. reg = <0x42100000 0x40000>;
  17. record-size = <0x4000>;
  18. console-size = <0x4000>;
  19. ftrace-size = <0x4000>;
  20. pmsg-size = <0x4000>;
  21. };
  22. };
  23. aliases {
  24. label-mac-device = &gmac2;
  25. led-boot = &power_white;
  26. led-failsafe = &power_amber;
  27. led-running = &power_white;
  28. led-upgrade = &power_amber;
  29. mdio-gpio0 = &mdio0;
  30. };
  31. keys {
  32. compatible = "gpio-keys";
  33. pinctrl-0 = <&button_pins>;
  34. pinctrl-names = "default";
  35. wifi {
  36. label = "wifi";
  37. gpios = <&qcom_pinmux 6 GPIO_ACTIVE_LOW>;
  38. linux,code = <KEY_RFKILL>;
  39. debounce-interval = <60>;
  40. wakeup-source;
  41. };
  42. reset {
  43. label = "reset";
  44. gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
  45. linux,code = <KEY_RESTART>;
  46. debounce-interval = <60>;
  47. wakeup-source;
  48. };
  49. wps {
  50. label = "wps";
  51. gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
  52. linux,code = <KEY_WPS_BUTTON>;
  53. debounce-interval = <60>;
  54. wakeup-source;
  55. };
  56. };
  57. leds: leds {
  58. compatible = "gpio-leds";
  59. pinctrl-0 = <&led_pins>;
  60. pinctrl-names = "default";
  61. power_white: power_white {
  62. function = LED_FUNCTION_POWER;
  63. color = <LED_COLOR_ID_WHITE>;
  64. gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
  65. default-state = "keep";
  66. };
  67. power_amber: power_amber {
  68. function = LED_FUNCTION_POWER;
  69. color = <LED_COLOR_ID_AMBER>;
  70. gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
  71. };
  72. wan_white {
  73. function = LED_FUNCTION_WAN;
  74. color = <LED_COLOR_ID_WHITE>;
  75. gpios = <&qcom_pinmux 22 GPIO_ACTIVE_HIGH>;
  76. };
  77. wan_amber {
  78. function = LED_FUNCTION_WAN;
  79. color = <LED_COLOR_ID_AMBER>;
  80. gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
  81. };
  82. wifi {
  83. label = "white:wifi";
  84. gpios = <&qcom_pinmux 64 GPIO_ACTIVE_HIGH>;
  85. };
  86. wps {
  87. function = LED_FUNCTION_WPS;
  88. color = <LED_COLOR_ID_WHITE>;
  89. gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
  90. };
  91. };
  92. };
  93. &qcom_pinmux {
  94. button_pins: button_pins {
  95. mux {
  96. pins = "gpio6", "gpio54", "gpio65";
  97. function = "gpio";
  98. drive-strength = <2>;
  99. bias-pull-up;
  100. };
  101. };
  102. led_pins: led_pins {
  103. mux {
  104. pins = "gpio7", "gpio8", "gpio9",
  105. "gpio22", "gpio23", "gpio24",
  106. "gpio26", "gpio53", "gpio64";
  107. function = "gpio";
  108. drive-strength = <2>;
  109. bias-pull-down;
  110. };
  111. };
  112. mdio0_pins: mdio0-pins {
  113. clk {
  114. pins = "gpio1";
  115. input-disable;
  116. };
  117. };
  118. rgmii2_pins: rgmii2-pins {
  119. tx {
  120. pins = "gpio27", "gpio28", "gpio29",
  121. "gpio30", "gpio31", "gpio32";
  122. input-disable;
  123. };
  124. };
  125. spi_pins: spi_pins {
  126. mux {
  127. pins = "gpio18", "gpio19", "gpio21";
  128. function = "gsbi5";
  129. bias-pull-down;
  130. };
  131. data {
  132. pins = "gpio18", "gpio19";
  133. drive-strength = <10>;
  134. };
  135. cs {
  136. pins = "gpio20";
  137. drive-strength = <10>;
  138. bias-pull-up;
  139. };
  140. clk {
  141. pins = "gpio21";
  142. drive-strength = <12>;
  143. };
  144. };
  145. spi6_pins: spi6_pins {
  146. mux {
  147. pins = "gpio55", "gpio56", "gpio58";
  148. function = "gsbi6";
  149. bias-pull-down;
  150. };
  151. mosi {
  152. pins = "gpio55";
  153. drive-strength = <12>;
  154. };
  155. miso {
  156. pins = "gpio56";
  157. drive-strength = <14>;
  158. };
  159. cs {
  160. pins = "gpio57";
  161. drive-strength = <12>;
  162. bias-pull-up;
  163. };
  164. clk {
  165. pins = "gpio58";
  166. drive-strength = <12>;
  167. };
  168. reset {
  169. pins = "gpio33";
  170. drive-strength = <10>;
  171. bias-pull-down;
  172. output-high;
  173. };
  174. };
  175. usb0_pwr_en_pins: usb0_pwr_en_pins {
  176. mux {
  177. pins = "gpio15";
  178. function = "gpio";
  179. drive-strength = <12>;
  180. bias-pull-down;
  181. output-high;
  182. };
  183. };
  184. usb1_pwr_en_pins: usb1_pwr_en_pins {
  185. mux {
  186. pins = "gpio16", "gpio68";
  187. function = "gpio";
  188. drive-strength = <12>;
  189. bias-pull-down;
  190. output-high;
  191. };
  192. };
  193. };
  194. &nand {
  195. status = "okay";
  196. nand@0 {
  197. reg = <0>;
  198. compatible = "qcom,nandcs";
  199. nand-ecc-strength = <4>;
  200. nand-bus-width = <8>;
  201. nand-ecc-step-size = <512>;
  202. nand-is-boot-medium;
  203. qcom,boot-partitions = <0x0 0x1180000>;
  204. partitions: partitions {
  205. compatible = "fixed-partitions";
  206. #address-cells = <1>;
  207. #size-cells = <1>;
  208. partition@0 {
  209. label = "qcadata";
  210. reg = <0x0000000 0x0c80000>;
  211. read-only;
  212. };
  213. partition@c80000 {
  214. label = "APPSBL";
  215. reg = <0x0c80000 0x0500000>;
  216. read-only;
  217. };
  218. partition@1180000 {
  219. label = "APPSBLENV";
  220. reg = <0x1180000 0x0080000>;
  221. read-only;
  222. };
  223. art: partition@1200000 {
  224. label = "art";
  225. reg = <0x1200000 0x0140000>;
  226. read-only;
  227. nvmem-layout {
  228. compatible = "fixed-layout";
  229. #address-cells = <1>;
  230. #size-cells = <1>;
  231. macaddr_art_0: macaddr@0 {
  232. reg = <0x0 0x6>;
  233. };
  234. macaddr_art_6: macaddr@6 {
  235. compatible = "mac-base";
  236. reg = <0x6 0x6>;
  237. #nvmem-cell-cells = <1>;
  238. };
  239. macaddr_art_c: macaddr@c {
  240. reg = <0xc 0x6>;
  241. };
  242. precal_art_1000: precal@1000 {
  243. reg = <0x1000 0x2f20>;
  244. };
  245. precal_art_5000: precal@5000 {
  246. reg = <0x5000 0x2f20>;
  247. };
  248. };
  249. };
  250. partition@1340000 {
  251. label = "artbak";
  252. reg = <0x1340000 0x0140000>;
  253. read-only;
  254. };
  255. partition@1480000 {
  256. label = "kernel";
  257. reg = <0x1480000 0x0400000>;
  258. };
  259. };
  260. };
  261. };
  262. &mdio0 {
  263. status = "okay";
  264. pinctrl-0 = <&mdio0_pins>;
  265. pinctrl-names = "default";
  266. switch@10 {
  267. compatible = "qca,qca8337";
  268. #address-cells = <1>;
  269. #size-cells = <0>;
  270. reg = <0x10>;
  271. ports {
  272. #address-cells = <1>;
  273. #size-cells = <0>;
  274. port@0 {
  275. reg = <0>;
  276. label = "cpu";
  277. ethernet = <&gmac1>;
  278. phy-mode = "rgmii";
  279. tx-internal-delay-ps = <1000>;
  280. rx-internal-delay-ps = <1000>;
  281. fixed-link {
  282. speed = <1000>;
  283. full-duplex;
  284. };
  285. };
  286. port@1 {
  287. reg = <1>;
  288. label = "lan4";
  289. phy-mode = "internal";
  290. phy-handle = <&phy_port1>;
  291. };
  292. port@2 {
  293. reg = <2>;
  294. label = "lan3";
  295. phy-mode = "internal";
  296. phy-handle = <&phy_port2>;
  297. };
  298. port@3 {
  299. reg = <3>;
  300. label = "lan2";
  301. phy-mode = "internal";
  302. phy-handle = <&phy_port3>;
  303. };
  304. port@4 {
  305. reg = <4>;
  306. label = "lan1";
  307. phy-mode = "internal";
  308. phy-handle = <&phy_port4>;
  309. };
  310. port@5 {
  311. reg = <5>;
  312. label = "wan";
  313. phy-mode = "internal";
  314. phy-handle = <&phy_port5>;
  315. };
  316. port@6 {
  317. reg = <6>;
  318. label = "cpu";
  319. ethernet = <&gmac2>;
  320. phy-mode = "sgmii";
  321. qca,sgmii-enable-pll;
  322. fixed-link {
  323. speed = <1000>;
  324. full-duplex;
  325. };
  326. };
  327. };
  328. mdio {
  329. #address-cells = <1>;
  330. #size-cells = <0>;
  331. phy_port1: phy@0 {
  332. reg = <0>;
  333. };
  334. phy_port2: phy@1 {
  335. reg = <1>;
  336. };
  337. phy_port3: phy@2 {
  338. reg = <2>;
  339. };
  340. phy_port4: phy@3 {
  341. reg = <3>;
  342. };
  343. phy_port5: phy@4 {
  344. reg = <4>;
  345. };
  346. };
  347. };
  348. };
  349. &gmac1 {
  350. status = "okay";
  351. phy-mode = "rgmii";
  352. qcom,id = <1>;
  353. qcom,phy_mdio_addr = <4>;
  354. qcom,poll_required = <0>;
  355. qcom,rgmii_delay = <1>;
  356. qcom,phy_mii_type = <0>;
  357. qcom,emulation = <0>;
  358. qcom,irq = <255>;
  359. mdiobus = <&mdio0>;
  360. pinctrl-0 = <&rgmii2_pins>;
  361. pinctrl-names = "default";
  362. nvmem-cells = <&macaddr_art_6 0>;
  363. nvmem-cell-names = "mac-address";
  364. fixed-link {
  365. speed = <1000>;
  366. full-duplex;
  367. };
  368. };
  369. &gmac2 {
  370. status = "okay";
  371. phy-mode = "sgmii";
  372. qcom,id = <2>;
  373. qcom,phy_mdio_addr = <0>; /* none */
  374. qcom,poll_required = <0>; /* no polling */
  375. qcom,rgmii_delay = <0>;
  376. qcom,phy_mii_type = <1>;
  377. qcom,emulation = <0>;
  378. qcom,irq = <258>;
  379. mdiobus = <&mdio0>;
  380. nvmem-cells = <&macaddr_art_0>;
  381. nvmem-cell-names = "mac-address";
  382. fixed-link {
  383. speed = <1000>;
  384. full-duplex;
  385. };
  386. };
  387. &adm_dma {
  388. status = "okay";
  389. };
  390. &sata_phy {
  391. status = "okay";
  392. };
  393. &sata {
  394. status = "okay";
  395. };
  396. &hs_phy_0 {
  397. status = "okay";
  398. };
  399. &ss_phy_0 {
  400. status = "okay";
  401. };
  402. &usb3_0 {
  403. status = "okay";
  404. pinctrl-0 = <&usb0_pwr_en_pins>;
  405. pinctrl-names = "default";
  406. };
  407. &hs_phy_1 {
  408. status = "okay";
  409. };
  410. &ss_phy_1 {
  411. status = "okay";
  412. };
  413. &usb3_1 {
  414. status = "okay";
  415. pinctrl-0 = <&usb1_pwr_en_pins>;
  416. pinctrl-names = "default";
  417. };
  418. &pcie0 {
  419. status = "okay";
  420. bridge@0,0 {
  421. reg = <0x00000000 0 0 0 0>;
  422. #address-cells = <3>;
  423. #size-cells = <2>;
  424. ranges;
  425. wifi0: wifi@1,0 {
  426. compatible = "pci168c,0046";
  427. reg = <0x00010000 0 0 0 0>;
  428. };
  429. };
  430. };
  431. &pcie1 {
  432. status = "okay";
  433. max-link-speed = <1>;
  434. bridge@0,0 {
  435. reg = <0x00000000 0 0 0 0>;
  436. #address-cells = <3>;
  437. #size-cells = <2>;
  438. ranges;
  439. wifi1: wifi@1,0 {
  440. compatible = "pci168c,0046";
  441. reg = <0x00010000 0 0 0 0>;
  442. };
  443. };
  444. };