qcom-ipq8065-nbg6817.dts 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  1. #include "qcom-ipq8065.dtsi"
  2. #include <dt-bindings/input/input.h>
  3. / {
  4. model = "ZyXEL NBG6817";
  5. compatible = "zyxel,nbg6817", "qcom,ipq8065", "qcom,ipq8064";
  6. memory@0 {
  7. reg = <0x42000000 0x1e000000>;
  8. device_type = "memory";
  9. };
  10. aliases {
  11. mdio-gpio0 = &mdio0;
  12. sdcc1 = &sdcc1;
  13. led-boot = &power;
  14. led-failsafe = &power;
  15. led-running = &power;
  16. led-upgrade = &power;
  17. };
  18. chosen {
  19. bootargs = "rootfstype=squashfs,ext4 rootwait noinitrd fstools_ignore_partname=1";
  20. append-rootblock = "root=/dev/mmcblk0p";
  21. };
  22. keys {
  23. compatible = "gpio-keys";
  24. pinctrl-0 = <&button_pins>;
  25. pinctrl-names = "default";
  26. wifi {
  27. label = "wifi";
  28. gpios = <&qcom_pinmux 53 GPIO_ACTIVE_LOW>;
  29. linux,code = <KEY_RFKILL>;
  30. linux,input-type = <EV_SW>;
  31. debounce-interval = <60>;
  32. wakeup-source;
  33. };
  34. reset {
  35. label = "reset";
  36. gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
  37. linux,code = <KEY_RESTART>;
  38. debounce-interval = <60>;
  39. wakeup-source;
  40. };
  41. wps {
  42. label = "wps";
  43. gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
  44. linux,code = <KEY_WPS_BUTTON>;
  45. debounce-interval = <60>;
  46. wakeup-source;
  47. };
  48. };
  49. leds {
  50. compatible = "gpio-leds";
  51. pinctrl-0 = <&led_pins>;
  52. pinctrl-names = "default";
  53. internet {
  54. label = "white:internet";
  55. gpios = <&qcom_pinmux 64 GPIO_ACTIVE_HIGH>;
  56. };
  57. power: power {
  58. label = "white:power";
  59. gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
  60. default-state = "keep";
  61. };
  62. wifi2g {
  63. label = "amber:wifi2g";
  64. gpios = <&qcom_pinmux 33 GPIO_ACTIVE_HIGH>;
  65. };
  66. /* wifi2g amber from the manual is missing */
  67. wifi5g {
  68. label = "amber:wifi5g";
  69. gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
  70. };
  71. /* wifi5g amber from the manual is missing */
  72. };
  73. };
  74. &qcom_pinmux {
  75. button_pins: button_pins {
  76. mux {
  77. pins = "gpio53", "gpio54", "gpio65";
  78. function = "gpio";
  79. drive-strength = <2>;
  80. bias-pull-up;
  81. };
  82. };
  83. led_pins: led_pins {
  84. mux {
  85. pins = "gpio9", "gpio26", "gpio33", "gpio64";
  86. function = "gpio";
  87. drive-strength = <2>;
  88. bias-pull-down;
  89. };
  90. };
  91. mdio0_pins: mdio0_pins {
  92. clk {
  93. pins = "gpio1";
  94. input-disable;
  95. };
  96. };
  97. rgmii2_pins: rgmii2_pins {
  98. tx {
  99. pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32" ;
  100. input-disable;
  101. };
  102. };
  103. spi_pins: spi_pins {
  104. cs {
  105. pins = "gpio20";
  106. drive-strength = <12>;
  107. };
  108. };
  109. usb0_pwr_en_pins: usb0_pwr_en_pins {
  110. mux {
  111. pins = "gpio16", "gpio17";
  112. function = "gpio";
  113. drive-strength = <12>;
  114. };
  115. pwr {
  116. pins = "gpio17";
  117. bias-pull-down;
  118. output-high;
  119. };
  120. ovc {
  121. pins = "gpio16";
  122. bias-pull-up;
  123. };
  124. };
  125. usb1_pwr_en_pins: usb1_pwr_en_pins {
  126. mux {
  127. pins = "gpio14", "gpio15";
  128. function = "gpio";
  129. drive-strength = <12>;
  130. };
  131. pwr {
  132. pins = "gpio14";
  133. bias-pull-down;
  134. output-high;
  135. };
  136. ovc {
  137. pins = "gpio15";
  138. bias-pull-up;
  139. };
  140. };
  141. };
  142. &gsbi5 {
  143. qcom,mode = <GSBI_PROT_SPI>;
  144. status = "okay";
  145. spi4: spi@1a280000 {
  146. status = "okay";
  147. pinctrl-0 = <&spi_pins>;
  148. pinctrl-names = "default";
  149. cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
  150. m25p80@0 {
  151. compatible = "jedec,spi-nor";
  152. #address-cells = <1>;
  153. #size-cells = <1>;
  154. spi-max-frequency = <51200000>;
  155. reg = <0>;
  156. partitions {
  157. compatible = "qcom,smem-part";
  158. };
  159. };
  160. };
  161. };
  162. &usb3_0 {
  163. status = "okay";
  164. pinctrl-0 = <&usb0_pwr_en_pins>;
  165. pinctrl-names = "default";
  166. };
  167. &usb3_1 {
  168. status = "okay";
  169. pinctrl-0 = <&usb1_pwr_en_pins>;
  170. pinctrl-names = "default";
  171. };
  172. &pcie0 {
  173. status = "okay";
  174. reset-gpio = <&qcom_pinmux 3 GPIO_ACTIVE_LOW>;
  175. pinctrl-0 = <&pcie0_pins>;
  176. pinctrl-names = "default";
  177. };
  178. &pcie1 {
  179. status = "okay";
  180. reset-gpio = <&qcom_pinmux 48 GPIO_ACTIVE_LOW>;
  181. pinctrl-0 = <&pcie1_pins>;
  182. pinctrl-names = "default";
  183. max-link-speed = <1>;
  184. };
  185. &mdio0 {
  186. status = "okay";
  187. pinctrl-0 = <&mdio0_pins>;
  188. pinctrl-names = "default";
  189. phy0: ethernet-phy@0 {
  190. reg = <0>;
  191. qca,ar8327-initvals = <
  192. 0x00004 0x7600000 /* PAD0_MODE */
  193. 0x00008 0x1000000 /* PAD5_MODE */
  194. 0x0000c 0x80 /* PAD6_MODE */
  195. 0x000e4 0xaa545 /* MAC_POWER_SEL */
  196. 0x000e0 0xc74164de /* SGMII_CTRL */
  197. 0x0007c 0x4e /* PORT0_STATUS */
  198. 0x00094 0x4e /* PORT6_STATUS */
  199. 0x00970 0x1e864443 /* QM_PORT0_CTRL0 */
  200. 0x00974 0x000001c6 /* QM_PORT0_CTRL1 */
  201. 0x00978 0x19008643 /* QM_PORT1_CTRL0 */
  202. 0x0097c 0x000001c6 /* QM_PORT1_CTRL1 */
  203. 0x00980 0x19008643 /* QM_PORT2_CTRL0 */
  204. 0x00984 0x000001c6 /* QM_PORT2_CTRL1 */
  205. 0x00988 0x19008643 /* QM_PORT3_CTRL0 */
  206. 0x0098c 0x000001c6 /* QM_PORT3_CTRL1 */
  207. 0x00990 0x19008643 /* QM_PORT4_CTRL0 */
  208. 0x00994 0x000001c6 /* QM_PORT4_CTRL1 */
  209. 0x00998 0x1e864443 /* QM_PORT5_CTRL0 */
  210. 0x0099c 0x000001c6 /* QM_PORT5_CTRL1 */
  211. 0x009a0 0x1e864443 /* QM_PORT6_CTRL0 */
  212. 0x009a4 0x000001c6 /* QM_PORT6_CTRL1 */
  213. >;
  214. };
  215. phy4: ethernet-phy@4 {
  216. reg = <4>;
  217. qca,ar8327-initvals = <
  218. 0x000e4 0x6a545 /* MAC_POWER_SEL */
  219. 0x0000c 0x80 /* PAD6_MODE */
  220. >;
  221. };
  222. };
  223. &gmac1 {
  224. status = "okay";
  225. phy-mode = "rgmii";
  226. qcom,id = <1>;
  227. qcom,phy_mdio_addr = <4>;
  228. qcom,poll_required = <0>;
  229. qcom,rgmii_delay = <1>;
  230. qcom,phy_mii_type = <0>;
  231. qcom,emulation = <0>;
  232. qcom,irq = <255>;
  233. mdiobus = <&mdio0>;
  234. pinctrl-0 = <&rgmii2_pins>;
  235. pinctrl-names = "default";
  236. fixed-link {
  237. speed = <1000>;
  238. full-duplex;
  239. };
  240. };
  241. &gmac2 {
  242. status = "okay";
  243. phy-mode = "sgmii";
  244. qcom,id = <2>;
  245. qcom,phy_mdio_addr = <0>; /* none */
  246. qcom,poll_required = <0>; /* no polling */
  247. qcom,rgmii_delay = <0>;
  248. qcom,phy_mii_type = <1>;
  249. qcom,emulation = <0>;
  250. qcom,irq = <258>;
  251. mdiobus = <&mdio0>;
  252. fixed-link {
  253. speed = <1000>;
  254. full-duplex;
  255. };
  256. };
  257. &amba {
  258. sdcc1: sdcc@12400000 {
  259. status = "okay";
  260. };
  261. };
  262. &adm_dma {
  263. status = "okay";
  264. };