qcom-ipq8065-nbg6817.dts 7.5 KB

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