imx8mm-beacon-baseboard.dtsi 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437
  1. // SPDX-License-Identifier: (GPL-2.0 OR MIT)
  2. /*
  3. * Copyright 2020 Compass Electronics Group, LLC
  4. */
  5. #include <dt-bindings/phy/phy-imx8-pcie.h>
  6. / {
  7. leds {
  8. compatible = "gpio-leds";
  9. led0 {
  10. label = "gen_led0";
  11. gpios = <&pca6416_1 4 GPIO_ACTIVE_HIGH>;
  12. default-state = "off";
  13. };
  14. led1 {
  15. label = "gen_led1";
  16. gpios = <&pca6416_1 5 GPIO_ACTIVE_HIGH>;
  17. default-state = "off";
  18. };
  19. led2 {
  20. label = "gen_led2";
  21. gpios = <&pca6416_1 6 GPIO_ACTIVE_HIGH>;
  22. default-state = "off";
  23. };
  24. led3 {
  25. pinctrl-names = "default";
  26. pinctrl-0 = <&pinctrl_led3>;
  27. label = "heartbeat";
  28. gpios = <&gpio4 28 GPIO_ACTIVE_HIGH>;
  29. linux,default-trigger = "heartbeat";
  30. };
  31. };
  32. pcie0_refclk: pcie0-refclk {
  33. compatible = "fixed-clock";
  34. #clock-cells = <0>;
  35. clock-frequency = <100000000>;
  36. };
  37. pcie0_refclk_gated: pcie0-refclk-gated {
  38. compatible = "gpio-gate-clock";
  39. clocks = <&pcie0_refclk>;
  40. #clock-cells = <0>;
  41. enable-gpios = <&pca6416_1 2 GPIO_ACTIVE_LOW>;
  42. };
  43. reg_audio: regulator-audio {
  44. compatible = "regulator-fixed";
  45. regulator-name = "3v3_aud";
  46. regulator-min-microvolt = <3300000>;
  47. regulator-max-microvolt = <3300000>;
  48. gpio = <&pca6416_1 11 GPIO_ACTIVE_HIGH>;
  49. enable-active-high;
  50. };
  51. reg_usbotg1: regulator-usbotg1 {
  52. compatible = "regulator-fixed";
  53. pinctrl-names = "default";
  54. pinctrl-0 = <&pinctrl_reg_usb_otg1>;
  55. regulator-name = "usb_otg_vbus";
  56. regulator-min-microvolt = <5000000>;
  57. regulator-max-microvolt = <5000000>;
  58. gpio = <&gpio4 29 GPIO_ACTIVE_HIGH>;
  59. enable-active-high;
  60. };
  61. reg_camera: regulator-camera {
  62. compatible = "regulator-fixed";
  63. regulator-name = "mipi_pwr";
  64. regulator-min-microvolt = <2800000>;
  65. regulator-max-microvolt = <2800000>;
  66. gpio = <&pca6416_1 0 GPIO_ACTIVE_HIGH>;
  67. enable-active-high;
  68. startup-delay-us = <100000>;
  69. };
  70. reg_pcie0: regulator-pcie {
  71. compatible = "regulator-fixed";
  72. regulator-name = "pci_pwr_en";
  73. regulator-min-microvolt = <3300000>;
  74. regulator-max-microvolt = <3300000>;
  75. enable-active-high;
  76. gpio = <&pca6416_1 1 GPIO_ACTIVE_HIGH>;
  77. startup-delay-us = <100000>;
  78. };
  79. reg_usdhc2_vmmc: regulator-usdhc2 {
  80. compatible = "regulator-fixed";
  81. regulator-name = "VSD_3V3";
  82. regulator-min-microvolt = <3300000>;
  83. regulator-max-microvolt = <3300000>;
  84. gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>;
  85. enable-active-high;
  86. };
  87. sound {
  88. compatible = "fsl,imx-audio-wm8962";
  89. model = "wm8962-audio";
  90. audio-cpu = <&sai3>;
  91. audio-codec = <&wm8962>;
  92. audio-routing =
  93. "Headphone Jack", "HPOUTL",
  94. "Headphone Jack", "HPOUTR",
  95. "Ext Spk", "SPKOUTL",
  96. "Ext Spk", "SPKOUTR",
  97. "AMIC", "MICBIAS",
  98. "IN3R", "AMIC";
  99. };
  100. };
  101. &csi {
  102. status = "okay";
  103. };
  104. &ecspi2 {
  105. pinctrl-names = "default";
  106. pinctrl-0 = <&pinctrl_espi2>;
  107. cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
  108. status = "okay";
  109. eeprom@0 {
  110. compatible = "microchip,at25160bn", "atmel,at25";
  111. reg = <0>;
  112. spi-max-frequency = <5000000>;
  113. spi-cpha;
  114. spi-cpol;
  115. pagesize = <32>;
  116. size = <2048>;
  117. address-width = <16>;
  118. };
  119. };
  120. &i2c2 {
  121. clock-frequency = <400000>;
  122. pinctrl-names = "default";
  123. pinctrl-0 = <&pinctrl_i2c2>;
  124. status = "okay";
  125. camera@3c {
  126. compatible = "ovti,ov5640";
  127. pinctrl-names = "default";
  128. pinctrl-0 = <&pinctrl_ov5640>;
  129. reg = <0x3c>;
  130. clocks = <&clk IMX8MM_CLK_CLKO1>;
  131. clock-names = "xclk";
  132. assigned-clocks = <&clk IMX8MM_CLK_CLKO1>;
  133. assigned-clock-parents = <&clk IMX8MM_CLK_24M>;
  134. assigned-clock-rates = <24000000>;
  135. AVDD-supply = <&reg_camera>; /* 2.8v */
  136. powerdown-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
  137. reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
  138. port {
  139. /* MIPI CSI-2 bus endpoint */
  140. ov5640_to_mipi_csi2: endpoint {
  141. remote-endpoint = <&imx8mm_mipi_csi_in>;
  142. clock-lanes = <0>;
  143. data-lanes = <1 2>;
  144. };
  145. };
  146. };
  147. };
  148. &i2c4 {
  149. clock-frequency = <400000>;
  150. pinctrl-names = "default";
  151. pinctrl-0 = <&pinctrl_i2c4>;
  152. status = "okay";
  153. wm8962: audio-codec@1a {
  154. compatible = "wlf,wm8962";
  155. reg = <0x1a>;
  156. clocks = <&clk IMX8MM_CLK_SAI3_ROOT>;
  157. DCVDD-supply = <&reg_audio>;
  158. DBVDD-supply = <&reg_audio>;
  159. AVDD-supply = <&reg_audio>;
  160. CPVDD-supply = <&reg_audio>;
  161. MICVDD-supply = <&reg_audio>;
  162. PLLVDD-supply = <&reg_audio>;
  163. SPKVDD1-supply = <&reg_audio>;
  164. SPKVDD2-supply = <&reg_audio>;
  165. gpio-cfg = <
  166. 0x0000 /* 0:Default */
  167. 0x0000 /* 1:Default */
  168. 0x0000 /* 2:FN_DMICCLK */
  169. 0x0000 /* 3:Default */
  170. 0x0000 /* 4:FN_DMICCDAT */
  171. 0x0000 /* 5:Default */
  172. >;
  173. };
  174. pca6416_0: gpio@20 {
  175. compatible = "nxp,pcal6416";
  176. reg = <0x20>;
  177. pinctrl-names = "default";
  178. pinctrl-0 = <&pinctrl_pcal6414>;
  179. gpio-controller;
  180. #gpio-cells = <2>;
  181. interrupt-parent = <&gpio4>;
  182. interrupts = <27 IRQ_TYPE_LEVEL_LOW>;
  183. };
  184. pca6416_1: gpio@21 {
  185. compatible = "nxp,pcal6416";
  186. reg = <0x21>;
  187. gpio-controller;
  188. #gpio-cells = <2>;
  189. interrupt-parent = <&gpio4>;
  190. interrupts = <27 IRQ_TYPE_LEVEL_LOW>;
  191. };
  192. };
  193. &mipi_csi {
  194. status = "okay";
  195. ports {
  196. port@0 {
  197. imx8mm_mipi_csi_in: endpoint {
  198. remote-endpoint = <&ov5640_to_mipi_csi2>;
  199. data-lanes = <1 2>;
  200. };
  201. };
  202. };
  203. };
  204. &pcie_phy {
  205. fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_INPUT>;
  206. fsl,tx-deemph-gen1 = <0x2d>;
  207. fsl,tx-deemph-gen2 = <0xf>;
  208. fsl,clkreq-unsupported;
  209. clocks = <&pcie0_refclk_gated>;
  210. clock-names = "ref";
  211. status = "okay";
  212. };
  213. &pcie0 {
  214. pinctrl-names = "default";
  215. pinctrl-0 = <&pinctrl_pcie0>;
  216. reset-gpio = <&gpio4 21 GPIO_ACTIVE_LOW>;
  217. clocks = <&clk IMX8MM_CLK_PCIE1_ROOT>, <&clk IMX8MM_CLK_PCIE1_AUX>,
  218. <&pcie0_refclk_gated>;
  219. clock-names = "pcie", "pcie_aux", "pcie_bus";
  220. assigned-clocks = <&clk IMX8MM_CLK_PCIE1_AUX>,
  221. <&clk IMX8MM_CLK_PCIE1_CTRL>;
  222. assigned-clock-rates = <10000000>, <250000000>;
  223. assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_50M>,
  224. <&clk IMX8MM_SYS_PLL2_250M>;
  225. vpcie-supply = <&reg_pcie0>;
  226. status = "okay";
  227. };
  228. &sai3 {
  229. pinctrl-names = "default";
  230. pinctrl-0 = <&pinctrl_sai3>;
  231. assigned-clocks = <&clk IMX8MM_CLK_SAI3>;
  232. assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>;
  233. assigned-clock-rates = <24576000>;
  234. fsl,sai-mclk-direction-output;
  235. status = "okay";
  236. };
  237. &snvs_pwrkey {
  238. status = "okay";
  239. };
  240. &uart2 { /* console */
  241. pinctrl-names = "default";
  242. pinctrl-0 = <&pinctrl_uart2>;
  243. status = "okay";
  244. };
  245. &uart3 {
  246. pinctrl-names = "default";
  247. pinctrl-0 = <&pinctrl_uart3>;
  248. assigned-clocks = <&clk IMX8MM_CLK_UART3>;
  249. assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_80M>;
  250. uart-has-rtscts;
  251. status = "okay";
  252. };
  253. &usbotg1 {
  254. vbus-supply = <&reg_usbotg1>;
  255. disable-over-current;
  256. dr_mode = "otg";
  257. status = "okay";
  258. };
  259. &usbotg2 {
  260. pinctrl-names = "default";
  261. disable-over-current;
  262. dr_mode = "host";
  263. status = "okay";
  264. };
  265. &usbphynop2 {
  266. reset-gpios = <&pca6416_1 7 GPIO_ACTIVE_HIGH>;
  267. };
  268. &usdhc2 {
  269. pinctrl-names = "default", "state_100mhz", "state_200mhz";
  270. pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
  271. pinctrl-1 = <&pinctrl_usdhc2_100mhz>;
  272. pinctrl-2 = <&pinctrl_usdhc2_200mhz>;
  273. bus-width = <4>;
  274. vmmc-supply = <&reg_usdhc2_vmmc>;
  275. status = "okay";
  276. };
  277. &iomuxc {
  278. pinctrl_espi2: espi2grp {
  279. fsl,pins = <
  280. MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0x82
  281. MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0x82
  282. MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0x82
  283. MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO13 0x41
  284. >;
  285. };
  286. pinctrl_i2c2: i2c2grp {
  287. fsl,pins = <
  288. MX8MM_IOMUXC_I2C2_SCL_I2C2_SCL 0x400001c3
  289. MX8MM_IOMUXC_I2C2_SDA_I2C2_SDA 0x400001c3
  290. >;
  291. };
  292. pinctrl_i2c4: i2c4grp {
  293. fsl,pins = <
  294. MX8MM_IOMUXC_I2C4_SCL_I2C4_SCL 0x400001c3
  295. MX8MM_IOMUXC_I2C4_SDA_I2C4_SDA 0x400001c3
  296. >;
  297. };
  298. pinctrl_led3: led3grp {
  299. fsl,pins = <
  300. MX8MM_IOMUXC_SAI3_RXFS_GPIO4_IO28 0x41
  301. >;
  302. };
  303. pinctrl_ov5640: ov5640grp {
  304. fsl,pins = <
  305. MX8MM_IOMUXC_GPIO1_IO07_GPIO1_IO7 0x19
  306. MX8MM_IOMUXC_GPIO1_IO06_GPIO1_IO6 0x19
  307. MX8MM_IOMUXC_GPIO1_IO14_CCMSRCGPCMIX_CLKO1 0x59
  308. >;
  309. };
  310. pinctrl_pcal6414: pcal6414-gpiogrp {
  311. fsl,pins = <
  312. MX8MM_IOMUXC_SAI2_MCLK_GPIO4_IO27 0x19
  313. >;
  314. };
  315. pinctrl_reg_usb_otg1: usbotg1grp {
  316. fsl,pins = <
  317. MX8MM_IOMUXC_SAI3_RXC_GPIO4_IO29 0x19
  318. >;
  319. };
  320. pinctrl_pcie0: pcie0grp {
  321. fsl,pins = <
  322. MX8MM_IOMUXC_SAI2_RXFS_GPIO4_IO21 0x41
  323. >;
  324. };
  325. pinctrl_sai3: sai3grp {
  326. fsl,pins = <
  327. MX8MM_IOMUXC_SAI3_TXFS_SAI3_TX_SYNC 0xd6
  328. MX8MM_IOMUXC_SAI3_TXC_SAI3_TX_BCLK 0xd6
  329. MX8MM_IOMUXC_SAI3_MCLK_SAI3_MCLK 0xd6
  330. MX8MM_IOMUXC_SAI3_TXD_SAI3_TX_DATA0 0xd6
  331. MX8MM_IOMUXC_SAI3_RXD_SAI3_RX_DATA0 0xd6
  332. >;
  333. };
  334. pinctrl_uart2: uart2grp {
  335. fsl,pins = <
  336. MX8MM_IOMUXC_UART2_RXD_UART2_DCE_RX 0x140
  337. MX8MM_IOMUXC_UART2_TXD_UART2_DCE_TX 0x140
  338. >;
  339. };
  340. pinctrl_uart3: uart3grp {
  341. fsl,pins = <
  342. MX8MM_IOMUXC_ECSPI1_SCLK_UART3_DCE_RX 0x40
  343. MX8MM_IOMUXC_ECSPI1_MOSI_UART3_DCE_TX 0x40
  344. MX8MM_IOMUXC_ECSPI1_MISO_UART3_DCE_CTS_B 0x40
  345. MX8MM_IOMUXC_ECSPI1_SS0_UART3_DCE_RTS_B 0x40
  346. >;
  347. };
  348. pinctrl_usdhc2_gpio: usdhc2gpiogrp {
  349. fsl,pins = <
  350. MX8MM_IOMUXC_SD2_CD_B_USDHC2_CD_B 0x41
  351. MX8MM_IOMUXC_SD2_RESET_B_GPIO2_IO19 0x41
  352. >;
  353. };
  354. pinctrl_usdhc2: usdhc2grp {
  355. fsl,pins = <
  356. MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x190
  357. MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d0
  358. MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d0
  359. MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d0
  360. MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d0
  361. MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d0
  362. MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0
  363. >;
  364. };
  365. pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
  366. fsl,pins = <
  367. MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x194
  368. MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d4
  369. MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d4
  370. MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d4
  371. MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d4
  372. MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d4
  373. MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0
  374. >;
  375. };
  376. pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp {
  377. fsl,pins = <
  378. MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x196
  379. MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d6
  380. MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d6
  381. MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d6
  382. MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d6
  383. MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d6
  384. MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0
  385. >;
  386. };
  387. };