qcom-ipq8065-nbg6817.dts 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. #include "qcom-ipq8065-v1.0.dtsi"
  2. #include <dt-bindings/input/input.h>
  3. / {
  4. model = "ZyXEL NBG6817";
  5. compatible = "zyxel,nbg6817", "qcom,ipq8065";
  6. memory@0 {
  7. reg = <0x42000000 0x1e000000>;
  8. device_type = "memory";
  9. };
  10. reserved-memory {
  11. #address-cells = <1>;
  12. #size-cells = <1>;
  13. ranges;
  14. rsvd@41200000 {
  15. reg = <0x41200000 0x300000>;
  16. no-map;
  17. };
  18. };
  19. aliases {
  20. serial0 = &uart4;
  21. mdio-gpio0 = &mdio0;
  22. sdcc1 = &sdcc1;
  23. };
  24. chosen {
  25. bootargs = "root=/dev/mmcblk0p5 rootfstype=squashfs,ext4 rootwait noinitrd";
  26. linux,stdout-path = "serial0:115200n8";
  27. };
  28. soc {
  29. pinmux@800000 {
  30. pinctrl-0 = <&mdio0_pins &rgmii2_pins>;
  31. pinctrl-names = "default";
  32. i2c4_pins: i2c4_pinmux {
  33. mux {
  34. pins = "gpio12", "gpio13";
  35. function = "gsbi4";
  36. drive-strength = <12>;
  37. bias-disable;
  38. };
  39. };
  40. mdio0_pins: mdio0_pins {
  41. mux {
  42. pins = "gpio0", "gpio1";
  43. function = "gpio";
  44. drive-strength = <8>;
  45. bias-disable;
  46. };
  47. clk {
  48. pins = "gpio1";
  49. input-disable;
  50. };
  51. };
  52. rgmii2_pins: rgmii2_pins {
  53. mux {
  54. pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32",
  55. "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ;
  56. function = "rgmii2";
  57. drive-strength = <8>;
  58. bias-disable;
  59. };
  60. tx {
  61. pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32" ;
  62. input-disable;
  63. };
  64. };
  65. spi_pins: spi_pins {
  66. mux {
  67. pins = "gpio18", "gpio19", "gpio21";
  68. function = "gsbi5";
  69. drive-strength = <10>;
  70. bias-none;
  71. };
  72. cs {
  73. pins = "gpio20";
  74. drive-strength = <12>;
  75. };
  76. };
  77. };
  78. gsbi@16300000 {
  79. qcom,mode = <GSBI_PROT_I2C_UART>;
  80. status = "ok";
  81. serial@16340000 {
  82. status = "ok";
  83. };
  84. /*
  85. * The i2c device on gsbi4 should not be enabled.
  86. * On ipq806x designs gsbi4 i2c is meant for exclusive
  87. * RPM usage. Turning this on in kernel manifests as
  88. * i2c failure for the RPM.
  89. */
  90. };
  91. gsbi5: gsbi@1a200000 {
  92. qcom,mode = <GSBI_PROT_SPI>;
  93. status = "ok";
  94. spi4: spi@1a280000 {
  95. status = "ok";
  96. spi-max-frequency = <50000000>;
  97. pinctrl-0 = <&spi_pins>;
  98. pinctrl-names = "default";
  99. cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
  100. flash: m25p80@0 {
  101. compatible = "s25fl512s";
  102. #address-cells = <1>;
  103. #size-cells = <1>;
  104. spi-max-frequency = <51200000>;
  105. reg = <0>;
  106. linux,part-probe = "qcom-smem";
  107. };
  108. };
  109. };
  110. phy@100f8800 { /* USB3 port 1 HS phy */
  111. status = "ok";
  112. };
  113. phy@100f8830 { /* USB3 port 1 SS phy */
  114. status = "ok";
  115. };
  116. phy@110f8800 { /* USB3 port 0 HS phy */
  117. status = "ok";
  118. };
  119. phy@110f8830 { /* USB3 port 0 SS phy */
  120. status = "ok";
  121. };
  122. usb30@0 {
  123. status = "ok";
  124. };
  125. usb30@1 {
  126. status = "ok";
  127. };
  128. pcie0: pci@1b500000 {
  129. status = "ok";
  130. reset-gpio = <&qcom_pinmux 3 GPIO_ACTIVE_LOW>;
  131. pinctrl-0 = <&pcie0_pins>;
  132. pinctrl-names = "default";
  133. };
  134. pcie1: pci@1b700000 {
  135. status = "ok";
  136. reset-gpio = <&qcom_pinmux 48 GPIO_ACTIVE_LOW>;
  137. pinctrl-0 = <&pcie1_pins>;
  138. pinctrl-names = "default";
  139. };
  140. mdio0: mdio {
  141. compatible = "virtual,mdio-gpio";
  142. #address-cells = <1>;
  143. #size-cells = <0>;
  144. gpios = <&qcom_pinmux 1 0 &qcom_pinmux 0 0>;
  145. phy0: ethernet-phy@0 {
  146. device_type = "ethernet-phy";
  147. reg = <0>;
  148. qca,ar8327-initvals = <
  149. 0x00004 0x7600000 /* PAD0_MODE */
  150. 0x00008 0x1000000 /* PAD5_MODE */
  151. 0x0000c 0x80 /* PAD6_MODE */
  152. 0x000e4 0xaa545 /* MAC_POWER_SEL */
  153. 0x000e0 0xc74164de /* SGMII_CTRL */
  154. 0x0007c 0x4e /* PORT0_STATUS */
  155. 0x00094 0x4e /* PORT6_STATUS */
  156. 0x00970 0x1e864443 /* QM_PORT0_CTRL0 */
  157. 0x00974 0x000001c6 /* QM_PORT0_CTRL1 */
  158. 0x00978 0x19008643 /* QM_PORT1_CTRL0 */
  159. 0x0097c 0x000001c6 /* QM_PORT1_CTRL1 */
  160. 0x00980 0x19008643 /* QM_PORT2_CTRL0 */
  161. 0x00984 0x000001c6 /* QM_PORT2_CTRL1 */
  162. 0x00988 0x19008643 /* QM_PORT3_CTRL0 */
  163. 0x0098c 0x000001c6 /* QM_PORT3_CTRL1 */
  164. 0x00990 0x19008643 /* QM_PORT4_CTRL0 */
  165. 0x00994 0x000001c6 /* QM_PORT4_CTRL1 */
  166. 0x00998 0x1e864443 /* QM_PORT5_CTRL0 */
  167. 0x0099c 0x000001c6 /* QM_PORT5_CTRL1 */
  168. 0x009a0 0x1e864443 /* QM_PORT6_CTRL0 */
  169. 0x009a4 0x000001c6 /* QM_PORT6_CTRL1 */
  170. >;
  171. };
  172. phy4: ethernet-phy@4 {
  173. device_type = "ethernet-phy";
  174. reg = <4>;
  175. qca,ar8327-initvals = <
  176. 0x000e4 0x6a545 /* MAC_POWER_SEL */
  177. 0x0000c 0x80 /* PAD6_MODE */
  178. >;
  179. };
  180. };
  181. gmac1: ethernet@37200000 {
  182. status = "ok";
  183. phy-mode = "rgmii";
  184. qcom,id = <1>;
  185. qcom,phy_mdio_addr = <4>;
  186. qcom,poll_required = <0>;
  187. qcom,rgmii_delay = <1>;
  188. qcom,phy_mii_type = <0>;
  189. qcom,emulation = <0>;
  190. qcom,irq = <255>;
  191. mdiobus = <&mdio0>;
  192. fixed-link {
  193. speed = <1000>;
  194. full-duplex;
  195. };
  196. };
  197. gmac2: ethernet@37400000 {
  198. status = "ok";
  199. phy-mode = "sgmii";
  200. qcom,id = <2>;
  201. qcom,phy_mdio_addr = <0>; /* none */
  202. qcom,poll_required = <0>; /* no polling */
  203. qcom,rgmii_delay = <0>;
  204. qcom,phy_mii_type = <1>;
  205. qcom,emulation = <0>;
  206. qcom,irq = <258>;
  207. mdiobus = <&mdio0>;
  208. fixed-link {
  209. speed = <1000>;
  210. full-duplex;
  211. };
  212. };
  213. rpm@108000 {
  214. pinctrl-0 = <&i2c4_pins>;
  215. pinctrl-names = "default";
  216. };
  217. amba {
  218. sdcc1: sdcc@12400000 {
  219. status = "okay";
  220. dmas = <&sdcc1bam 2>, <&sdcc1bam 1>;
  221. dma-names = "tx", "rx";
  222. };
  223. };
  224. };
  225. gpio-keys {
  226. compatible = "gpio-keys";
  227. wifi {
  228. label = "wifi";
  229. gpios = <&qcom_pinmux 6 GPIO_ACTIVE_LOW>;
  230. linux,code = <KEY_RFKILL>;
  231. };
  232. reset {
  233. label = "reset";
  234. gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
  235. linux,code = <KEY_RESTART>;
  236. };
  237. wps {
  238. label = "wps";
  239. gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
  240. linux,code = <KEY_WPS_BUTTON>;
  241. };
  242. };
  243. gpio-leds {
  244. compatible = "gpio-leds";
  245. internet {
  246. label = "nbg6817:white:internet";
  247. gpios = <&qcom_pinmux 64 GPIO_ACTIVE_HIGH>;
  248. };
  249. power {
  250. label = "nbg6817:white:power";
  251. gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
  252. default-state = "on";
  253. };
  254. wifi {
  255. label = "nbg6817:amber:wifi";
  256. gpios = <&qcom_pinmux 33 GPIO_ACTIVE_HIGH>;
  257. };
  258. wifi5g {
  259. label = "nbg6817:amber:wifi5g";
  260. gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
  261. };
  262. };
  263. gpio_export {
  264. compatible = "gpio-export";
  265. #size-cells = <0>;
  266. usb0_status {
  267. gpio-export,name = "usb0";
  268. gpio-export,output = <1>;
  269. gpios = <&qcom_pinmux 15 GPIO_ACTIVE_HIGH>;
  270. };
  271. usb1_status {
  272. gpio-export,name = "usb1";
  273. gpio-export,output = <1>;
  274. gpios = <&qcom_pinmux 16 GPIO_ACTIVE_HIGH>;
  275. };
  276. usb1_power {
  277. gpio-export,name = "usb1_power";
  278. gpio-export,output = <1>;
  279. gpios = <&qcom_pinmux 14 GPIO_ACTIVE_HIGH>;
  280. };
  281. usb2_power {
  282. gpio-export,name = "usb2_power";
  283. gpio-export,output = <1>;
  284. gpios = <&qcom_pinmux 17 GPIO_ACTIVE_HIGH>;
  285. };
  286. };
  287. };
  288. &adm_dma {
  289. status = "ok";
  290. };