imx6q-cm-fx6.dts 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491
  1. /*
  2. * Copyright 2013 CompuLab Ltd.
  3. *
  4. * Author: Valentin Raevsky <[email protected]>
  5. *
  6. * This file is dual-licensed: you can use it either under the terms
  7. * of the GPL or the X11 license, at your option. Note that this dual
  8. * licensing only applies to this file, and not this project as a
  9. * whole.
  10. *
  11. * a) This file is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU General Public License
  13. * version 2 as published by the Free Software Foundation.
  14. *
  15. * This file is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * Or, alternatively,
  21. *
  22. * b) Permission is hereby granted, free of charge, to any person
  23. * obtaining a copy of this software and associated documentation
  24. * files (the "Software"), to deal in the Software without
  25. * restriction, including without limitation the rights to use,
  26. * copy, modify, merge, publish, distribute, sublicense, and/or
  27. * sell copies of the Software, and to permit persons to whom the
  28. * Software is furnished to do so, subject to the following
  29. * conditions:
  30. *
  31. * The above copyright notice and this permission notice shall be
  32. * included in all copies or substantial portions of the Software.
  33. *
  34. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  35. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  36. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  37. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  38. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  39. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  40. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  41. * OTHER DEALINGS IN THE SOFTWARE.
  42. */
  43. /dts-v1/;
  44. #include <dt-bindings/gpio/gpio.h>
  45. #include <dt-bindings/sound/fsl-imx-audmux.h>
  46. #include "imx6q.dtsi"
  47. / {
  48. model = "CompuLab CM-FX6";
  49. compatible = "compulab,cm-fx6", "fsl,imx6q";
  50. memory@10000000 {
  51. device_type = "memory";
  52. reg = <0x10000000 0x80000000>;
  53. };
  54. leds {
  55. compatible = "gpio-leds";
  56. heartbeat-led {
  57. label = "Heartbeat";
  58. gpios = <&gpio2 31 0>;
  59. linux,default-trigger = "heartbeat";
  60. };
  61. };
  62. awnh387_pwrseq: pwrseq {
  63. pinctrl-names = "default";
  64. pinctrl-0 = <&pinctrl_pwrseq>;
  65. compatible = "mmc-pwrseq-sd8787";
  66. powerdown-gpios = <&gpio7 12 GPIO_ACTIVE_HIGH>;
  67. reset-gpios = <&gpio6 16 GPIO_ACTIVE_HIGH>;
  68. };
  69. reg_pcie_power_on_gpio: regulator-pcie-power-on-gpio {
  70. compatible = "regulator-fixed";
  71. regulator-name = "regulator-pcie-power-on-gpio";
  72. regulator-min-microvolt = <3300000>;
  73. regulator-max-microvolt = <3300000>;
  74. gpio = <&gpio2 24 GPIO_ACTIVE_LOW>;
  75. };
  76. reg_usb_h1_vbus: usb_h1_vbus {
  77. compatible = "regulator-fixed";
  78. regulator-name = "usb_h1_vbus";
  79. regulator-min-microvolt = <5000000>;
  80. regulator-max-microvolt = <5000000>;
  81. gpio = <&gpio7 8 GPIO_ACTIVE_HIGH>;
  82. enable-active-high;
  83. };
  84. reg_usb_otg_vbus: usb_otg_vbus {
  85. compatible = "regulator-fixed";
  86. regulator-name = "usb_otg_vbus";
  87. regulator-min-microvolt = <5000000>;
  88. regulator-max-microvolt = <5000000>;
  89. gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
  90. enable-active-high;
  91. };
  92. sound-analog {
  93. compatible = "simple-audio-card";
  94. simple-audio-card,name = "On-board analog audio";
  95. simple-audio-card,widgets =
  96. "Headphone", "Headphone Jack",
  97. "Line", "Line Out",
  98. "Microphone", "Mic Jack",
  99. "Line", "Line In";
  100. simple-audio-card,routing =
  101. "Headphone Jack", "RHPOUT",
  102. "Headphone Jack", "LHPOUT",
  103. "MICIN", "Mic Bias",
  104. "Mic Bias", "Mic Jack";
  105. simple-audio-card,format = "i2s";
  106. simple-audio-card,bitclock-master = <&sound_master>;
  107. simple-audio-card,frame-master = <&sound_master>;
  108. simple-audio-card,bitclock-inversion;
  109. sound_master: simple-audio-card,cpu {
  110. sound-dai = <&ssi2>;
  111. system-clock-frequency = <2822400>;
  112. };
  113. simple-audio-card,codec {
  114. sound-dai = <&wm8731>;
  115. };
  116. };
  117. sound-spdif {
  118. compatible = "fsl,imx-audio-spdif";
  119. model = "imx-spdif";
  120. spdif-controller = <&spdif>;
  121. spdif-out;
  122. spdif-in;
  123. };
  124. };
  125. &audmux {
  126. pinctrl-names = "default";
  127. pinctrl-0 = <&pinctrl_audmux>;
  128. status = "okay";
  129. ssi2 {
  130. fsl,audmux-port = <1>;
  131. fsl,port-config = <
  132. (IMX_AUDMUX_V2_PTCR_RCLKDIR |
  133. IMX_AUDMUX_V2_PTCR_RCSEL(3 | 0x8) |
  134. IMX_AUDMUX_V2_PTCR_TCLKDIR |
  135. IMX_AUDMUX_V2_PTCR_TCSEL(3))
  136. IMX_AUDMUX_V2_PDCR_RXDSEL(3)
  137. >;
  138. };
  139. audmux4 {
  140. fsl,audmux-port = <3>;
  141. fsl,port-config = <
  142. (IMX_AUDMUX_V2_PTCR_TFSDIR |
  143. IMX_AUDMUX_V2_PTCR_TFSEL(1) |
  144. IMX_AUDMUX_V2_PTCR_RCLKDIR |
  145. IMX_AUDMUX_V2_PTCR_RCSEL(1 | 0x8) |
  146. IMX_AUDMUX_V2_PTCR_TCLKDIR |
  147. IMX_AUDMUX_V2_PTCR_TCSEL(1))
  148. IMX_AUDMUX_V2_PDCR_RXDSEL(1)
  149. >;
  150. };
  151. };
  152. &cpu0 {
  153. /*
  154. * Although the imx6q fuse indicates that 1.2GHz operation is possible,
  155. * the module behaves unstable at this frequency. Hence, remove the
  156. * 1.2GHz operation point here.
  157. */
  158. operating-points = <
  159. /* kHz uV */
  160. 996000 1250000
  161. 852000 1250000
  162. 792000 1175000
  163. 396000 975000
  164. >;
  165. fsl,soc-operating-points = <
  166. /* ARM kHz SOC-PU uV */
  167. 996000 1250000
  168. 852000 1250000
  169. 792000 1175000
  170. 396000 1175000
  171. >;
  172. };
  173. &cpu1 {
  174. /*
  175. * Although the imx6q fuse indicates that 1.2GHz operation is possible,
  176. * the module behaves unstable at this frequency. Hence, remove the
  177. * 1.2GHz operation point here.
  178. */
  179. operating-points = <
  180. /* kHz uV */
  181. 996000 1250000
  182. 852000 1250000
  183. 792000 1175000
  184. 396000 975000
  185. >;
  186. fsl,soc-operating-points = <
  187. /* ARM kHz SOC-PU uV */
  188. 996000 1250000
  189. 852000 1250000
  190. 792000 1175000
  191. 396000 1175000
  192. >;
  193. };
  194. &cpu2 {
  195. /*
  196. * Although the imx6q fuse indicates that 1.2GHz operation is possible,
  197. * the module behaves unstable at this frequency. Hence, remove the
  198. * 1.2GHz operation point here.
  199. */
  200. operating-points = <
  201. /* kHz uV */
  202. 996000 1250000
  203. 852000 1250000
  204. 792000 1175000
  205. 396000 975000
  206. >;
  207. fsl,soc-operating-points = <
  208. /* ARM kHz SOC-PU uV */
  209. 996000 1250000
  210. 852000 1250000
  211. 792000 1175000
  212. 396000 1175000
  213. >;
  214. };
  215. &cpu3 {
  216. /*
  217. * Although the imx6q fuse indicates that 1.2GHz operation is possible,
  218. * the module behaves unstable at this frequency. Hence, remove the
  219. * 1.2GHz operation point here.
  220. */
  221. operating-points = <
  222. /* kHz uV */
  223. 996000 1250000
  224. 852000 1250000
  225. 792000 1175000
  226. 396000 975000
  227. >;
  228. fsl,soc-operating-points = <
  229. /* ARM kHz SOC-PU uV */
  230. 996000 1250000
  231. 852000 1250000
  232. 792000 1175000
  233. 396000 1175000
  234. >;
  235. };
  236. &ecspi1 {
  237. cs-gpios = <&gpio2 30 GPIO_ACTIVE_LOW>, <&gpio3 19 GPIO_ACTIVE_LOW>;
  238. pinctrl-names = "default";
  239. pinctrl-0 = <&pinctrl_ecspi1>;
  240. status = "okay";
  241. flash@0 {
  242. #address-cells = <1>;
  243. #size-cells = <1>;
  244. compatible = "st,m25p", "jedec,spi-nor";
  245. spi-max-frequency = <20000000>;
  246. reg = <0>;
  247. };
  248. };
  249. &fec {
  250. pinctrl-names = "default";
  251. pinctrl-0 = <&pinctrl_enet>;
  252. phy-mode = "rgmii";
  253. status = "okay";
  254. };
  255. &gpmi {
  256. pinctrl-names = "default";
  257. pinctrl-0 = <&pinctrl_gpmi_nand>;
  258. status = "okay";
  259. };
  260. &i2c3 {
  261. pinctrl-names = "default";
  262. pinctrl-0 = <&pinctrl_i2c3>;
  263. status = "okay";
  264. clock-frequency = <100000>;
  265. eeprom@50 {
  266. compatible = "atmel,24c02";
  267. reg = <0x50>;
  268. pagesize = <16>;
  269. };
  270. wm8731: codec@1a {
  271. #sound-dai-cells = <0>;
  272. compatible = "wlf,wm8731";
  273. reg = <0x1a>;
  274. };
  275. };
  276. &iomuxc {
  277. pinctrl_audmux: audmuxgrp {
  278. fsl,pins = <
  279. MX6QDL_PAD_SD2_CMD__AUD4_RXC 0x17059
  280. MX6QDL_PAD_SD2_DAT0__AUD4_RXD 0x17059
  281. MX6QDL_PAD_SD2_DAT3__AUD4_TXC 0x17059
  282. MX6QDL_PAD_SD2_DAT2__AUD4_TXD 0x17059
  283. MX6QDL_PAD_SD2_DAT1__AUD4_TXFS 0x17059
  284. >;
  285. };
  286. pinctrl_ecspi1: ecspi1grp {
  287. fsl,pins = <
  288. MX6QDL_PAD_EIM_D16__ECSPI1_SCLK 0x100b1
  289. MX6QDL_PAD_EIM_D17__ECSPI1_MISO 0x100b1
  290. MX6QDL_PAD_EIM_D18__ECSPI1_MOSI 0x100b1
  291. MX6QDL_PAD_EIM_EB2__GPIO2_IO30 0x100b1
  292. MX6QDL_PAD_EIM_D19__GPIO3_IO19 0x100b1
  293. >;
  294. };
  295. pinctrl_enet: enetgrp {
  296. fsl,pins = <
  297. MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b030
  298. MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x1b030
  299. MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x1b030
  300. MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b030
  301. MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b030
  302. MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b030
  303. MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x1b030
  304. MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b030
  305. MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b030
  306. MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b030
  307. MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x1b030
  308. MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b030
  309. MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x1b0b0
  310. MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0
  311. MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0
  312. >;
  313. };
  314. pinctrl_gpmi_nand: gpminandgrp {
  315. fsl,pins = <
  316. MX6QDL_PAD_NANDF_CLE__NAND_CLE 0xb0b1
  317. MX6QDL_PAD_NANDF_ALE__NAND_ALE 0xb0b1
  318. MX6QDL_PAD_NANDF_WP_B__NAND_WP_B 0xb0b1
  319. MX6QDL_PAD_NANDF_RB0__NAND_READY_B 0xb000
  320. MX6QDL_PAD_NANDF_CS0__NAND_CE0_B 0xb0b1
  321. MX6QDL_PAD_NANDF_CS1__NAND_CE1_B 0xb0b1
  322. MX6QDL_PAD_SD4_CMD__NAND_RE_B 0xb0b1
  323. MX6QDL_PAD_SD4_CLK__NAND_WE_B 0xb0b1
  324. MX6QDL_PAD_NANDF_D0__NAND_DATA00 0xb0b1
  325. MX6QDL_PAD_NANDF_D1__NAND_DATA01 0xb0b1
  326. MX6QDL_PAD_NANDF_D2__NAND_DATA02 0xb0b1
  327. MX6QDL_PAD_NANDF_D3__NAND_DATA03 0xb0b1
  328. MX6QDL_PAD_NANDF_D4__NAND_DATA04 0xb0b1
  329. MX6QDL_PAD_NANDF_D5__NAND_DATA05 0xb0b1
  330. MX6QDL_PAD_NANDF_D6__NAND_DATA06 0xb0b1
  331. MX6QDL_PAD_NANDF_D7__NAND_DATA07 0xb0b1
  332. MX6QDL_PAD_SD4_DAT0__NAND_DQS 0x00b1
  333. >;
  334. };
  335. pinctrl_i2c3: i2c3grp {
  336. fsl,pins = <
  337. MX6QDL_PAD_GPIO_3__I2C3_SCL 0x4001b8b1
  338. MX6QDL_PAD_GPIO_6__I2C3_SDA 0x4001b8b1
  339. >;
  340. };
  341. pinctrl_pcie: pciegrp {
  342. fsl,pins = <
  343. MX6QDL_PAD_ENET_RXD1__GPIO1_IO26 0x1b0b1
  344. MX6QDL_PAD_EIM_CS1__GPIO2_IO24 0x1b0b1
  345. >;
  346. };
  347. pinctrl_pwrseq: pwrseqgrp {
  348. fsl,pins = <
  349. MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x1b0b0
  350. MX6QDL_PAD_NANDF_CS3__GPIO6_IO16 0x1b0b0
  351. >;
  352. };
  353. pinctrl_spdif: spdifgrp {
  354. fsl,pins = <
  355. MX6QDL_PAD_GPIO_16__SPDIF_IN 0x1b0b0
  356. MX6QDL_PAD_GPIO_19__SPDIF_OUT 0x1b0b0
  357. >;
  358. };
  359. pinctrl_uart4: uart4grp {
  360. fsl,pins = <
  361. MX6QDL_PAD_KEY_COL0__UART4_TX_DATA 0x1b0b1
  362. MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA 0x1b0b1
  363. >;
  364. };
  365. pinctrl_usbh1: usbh1grp {
  366. fsl,pins = <
  367. MX6QDL_PAD_SD3_RST__GPIO7_IO08 0x1b0b1
  368. >;
  369. };
  370. pinctrl_usbotg: usbotggrp {
  371. fsl,pins = <
  372. MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x17059
  373. MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x130b0
  374. >;
  375. };
  376. pinctrl_usdhc1: usdhc1grp {
  377. fsl,pins = <
  378. MX6QDL_PAD_SD1_CMD__SD1_CMD 0x17071
  379. MX6QDL_PAD_SD1_CLK__SD1_CLK 0x10071
  380. MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17071
  381. MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17071
  382. MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17071
  383. MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17071
  384. >;
  385. };
  386. };
  387. &pcie {
  388. pinctrl-names = "default";
  389. pinctrl-0 = <&pinctrl_pcie>;
  390. reset-gpio = <&gpio1 26 GPIO_ACTIVE_LOW>;
  391. vpcie-supply = <&reg_pcie_power_on_gpio>;
  392. status = "okay";
  393. };
  394. &sata {
  395. status = "okay";
  396. };
  397. &snvs_poweroff {
  398. status = "okay";
  399. };
  400. &spdif {
  401. pinctrl-names = "default";
  402. pinctrl-0 = <&pinctrl_spdif>;
  403. status = "okay";
  404. };
  405. &ssi2 {
  406. assigned-clocks = <&clks IMX6QDL_CLK_SSI2_SEL>,
  407. <&clks IMX6QDL_CLK_PLL4_AUDIO_DIV>;
  408. assigned-clock-parents = <&clks IMX6QDL_CLK_PLL4_AUDIO_DIV>;
  409. assigned-clock-rates = <0>, <786432000>;
  410. status = "okay";
  411. };
  412. &uart4 {
  413. pinctrl-names = "default";
  414. pinctrl-0 = <&pinctrl_uart4>;
  415. status = "okay";
  416. };
  417. &usbh1 {
  418. vbus-supply = <&reg_usb_h1_vbus>;
  419. pinctrl-names = "default";
  420. pinctrl-0 = <&pinctrl_usbh1>;
  421. status = "okay";
  422. };
  423. &usbotg {
  424. vbus-supply = <&reg_usb_otg_vbus>;
  425. pinctrl-names = "default";
  426. pinctrl-0 = <&pinctrl_usbotg>;
  427. dr_mode = "otg";
  428. status = "okay";
  429. };
  430. &usdhc1 {
  431. pinctrl-names = "default";
  432. pinctrl-0 = <&pinctrl_usdhc1>;
  433. mmc-pwrseq = <&awnh387_pwrseq>;
  434. non-removable;
  435. /*
  436. * If the OS probes the Bluetooth AMP function advertised on this bus
  437. * but the firmware in place does not support it, the WiFi/BT module
  438. * gets unresponsive.
  439. * Users who configured their OS properly can enable this node to gain
  440. * WiFi and/or plain Bluetooth support.
  441. */
  442. status = "disabled";
  443. };