当前位置:   article > 正文

i.MX6ULL(十三) linux 设备树_imx6ull设备树

imx6ull设备树

 一 linux设备树简介 

1.1 linux设备树

Linux设备树是一种用于描述硬件设备信息的数据结构,它在Linux内核中发挥着越来越重要的作用

在系统上电后,BootLoader会将设备树传递给Linux内核,内核根据识别的树信息展开为platform_device、spi_device等设备,并且这些设备用到的内存、中断、等资源也被传递给内核,内核会将这些资源绑定到相应的设备中。

设备树 (Device Tree) ,将这个词分开就是“设备”和“树”,描述设备树的文件叫做 DTS(Device
Tree Source) ,这个 DTS 文件采用树形结构描述板级设备,也就是开发板上的设备信息,比如
CPU 数量、 内存基地址、 IIC 接口上接了哪些设备、 SPI 接口上接了哪些设备等等,如图 43.1.1
所示:

在图 43.1.1 中,树的主干就是系统总线, IIC 控制器、 GPIO 控制器、 SPI 控制器等都是接
到系统主线上的分支。
IIC 控制器有分为 IIC1 IIC2 两种,其中 IIC1 上接了 FT5206 AT24C02
这两个 IIC 设备, IIC2 上只接了 MPU6050 这个设备。 DTS 文件的主要功能就是按照图 43.1.1
所示的结构来描述板子上的设备信息,

CSn片选引脚

1.2 设备树文件格式及语法

1.21. 设备树文件

DTS(Device Tree Source)
  .dts文件是一种ASCII文本格式的Device Tree描述。在ARM Linux中,一个.dts文件对应一个ARM的machine,一般被放置在 arch/arm/boot/dts/ 目录。

DTSI(Device Tree Source Include)
  由于一个SoC基本都会对应多个machine,这样便会存在许多共同的部分,Device Tree将一些公用的部分使用.dtsi文件保存,类似于C语言的头文件。特定于machine的.dts文件一般都会引用这个.dtsi文件。

DTC(Device Tree Compiler)
  dtc是编译dts的工具,可以将dts文件转换为二进制.dtb文件。DTC的源代码位于内核的scripts/dtc目录,在Linux内核使能了Device Tree的情况下, 编译内核的时候主机工具dtc会被编译出来。

DTB(Device Tree Block)
  .dtb文件是 .dts 被 DTC 编译后的二进制格式的设备树文件,它可以被linux内核解析。

Imx6ull 内核编译dtb文件

主要源于 /arch/arm/boot/dts/imx6ul-14x14-evk.dts

1.2.2. 语法

设备树是采用树形结构来描述板子上的设备信息的文件,每个设备都是一个节点,叫做设
备节点,每个节点都通过一些属性信息来描述节点信息,属性就是键—值对
label: node-name@unit-address

以下从 imx6ul-14x14-evk.dts 代码分析 语法

  1. /*
  2. * Copyright (C) 2015 Freescale Semiconductor, Inc.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. /dts-v1/;
  9. #include <dt-bindings/input/input.h>
  10. #include "imx6ul.dtsi"
  11. / {
  12. model = "Freescale i.MX6 UltraLite 14x14 EVK Board";
  13. compatible = "fsl,imx6ul-14x14-evk", "fsl,imx6ul";
  14. chosen {
  15. stdout-path = &uart1;
  16. };
  17. memory {
  18. reg = <0x80000000 0x20000000>;
  19. };
  20. reserved-memory {
  21. #address-cells = <1>;
  22. #size-cells = <1>;
  23. ranges;
  24. linux,cma {
  25. compatible = "shared-dma-pool";
  26. reusable;
  27. size = <0x14000000>;
  28. linux,cma-default;
  29. };
  30. };
  31. backlight {
  32. compatible = "pwm-backlight";
  33. pwms = <&pwm1 0 5000000>;
  34. brightness-levels = <0 4 8 16 32 64 128 255>;
  35. default-brightness-level = <6>;
  36. status = "okay";
  37. };
  38. pxp_v4l2 {
  39. compatible = "fsl,imx6ul-pxp-v4l2", "fsl,imx6sx-pxp-v4l2", "fsl,imx6sl-pxp-v4l2";
  40. status = "okay";
  41. };
  42. regulators {
  43. compatible = "simple-bus";
  44. #address-cells = <1>;
  45. #size-cells = <0>;
  46. reg_can_3v3: regulator@0 {
  47. compatible = "regulator-fixed";
  48. reg = <0>;
  49. regulator-name = "can-3v3";
  50. regulator-min-microvolt = <3300000>;
  51. regulator-max-microvolt = <3300000>;
  52. gpios = <&gpio_spi 3 GPIO_ACTIVE_LOW>;
  53. };
  54. reg_sd1_vmmc: regulator@1 {
  55. compatible = "regulator-fixed";
  56. regulator-name = "VSD_3V3";
  57. regulator-min-microvolt = <3300000>;
  58. regulator-max-microvolt = <3300000>;
  59. gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>;
  60. enable-active-high;
  61. };
  62. reg_gpio_dvfs: regulator-gpio {
  63. compatible = "regulator-gpio";
  64. pinctrl-names = "default";
  65. pinctrl-0 = <&pinctrl_dvfs>;
  66. regulator-min-microvolt = <1300000>;
  67. regulator-max-microvolt = <1400000>;
  68. regulator-name = "gpio_dvfs";
  69. regulator-type = "voltage";
  70. gpios = <&gpio5 3 GPIO_ACTIVE_HIGH>;
  71. states = <1300000 0x1 1400000 0x0>;
  72. };
  73. };
  74. sound {
  75. compatible = "fsl,imx6ul-evk-wm8960",
  76. "fsl,imx-audio-wm8960";
  77. model = "wm8960-audio";
  78. cpu-dai = <&sai2>;
  79. audio-codec = <&codec>;
  80. asrc-controller = <&asrc>;
  81. codec-master;
  82. gpr = <&gpr 4 0x100000 0x100000>;
  83. /*
  84. * hp-det = <hp-det-pin hp-det-polarity>;
  85. * hp-det-pin: JD1 JD2 or JD3
  86. * hp-det-polarity = 0: hp detect high for headphone
  87. * hp-det-polarity = 1: hp detect high for speaker
  88. */
  89. hp-det = <3 0>;
  90. hp-det-gpios = <&gpio5 4 0>;
  91. mic-det-gpios = <&gpio5 4 0>;
  92. audio-routing =
  93. "Headphone Jack", "HP_L",
  94. "Headphone Jack", "HP_R",
  95. "Ext Spk", "SPK_LP",
  96. "Ext Spk", "SPK_LN",
  97. "Ext Spk", "SPK_RP",
  98. "Ext Spk", "SPK_RN",
  99. "LINPUT2", "Mic Jack",
  100. "LINPUT3", "Mic Jack",
  101. "RINPUT1", "Main MIC",
  102. "RINPUT2", "Main MIC",
  103. "Mic Jack", "MICB",
  104. "Main MIC", "MICB",
  105. "CPU-Playback", "ASRC-Playback",
  106. "Playback", "CPU-Playback",
  107. "ASRC-Capture", "CPU-Capture",
  108. "CPU-Capture", "Capture";
  109. };
  110. spi4 {
  111. compatible = "spi-gpio";
  112. pinctrl-names = "default";
  113. pinctrl-0 = <&pinctrl_spi4>;
  114. pinctrl-assert-gpios = <&gpio5 8 GPIO_ACTIVE_LOW>;
  115. status = "okay";
  116. gpio-sck = <&gpio5 11 0>;
  117. gpio-mosi = <&gpio5 10 0>;
  118. cs-gpios = <&gpio5 7 0>;
  119. num-chipselects = <1>;
  120. #address-cells = <1>;
  121. #size-cells = <0>;
  122. gpio_spi: gpio_spi@0 {
  123. compatible = "fairchild,74hc595";
  124. gpio-controller;
  125. #gpio-cells = <2>;
  126. reg = <0>;
  127. registers-number = <1>;
  128. registers-default = /bits/ 8 <0x57>;
  129. spi-max-frequency = <100000>;
  130. };
  131. };
  132. };
  133. &cpu0 {
  134. arm-supply = <&reg_arm>;
  135. soc-supply = <&reg_soc>;
  136. dc-supply = <&reg_gpio_dvfs>;
  137. };
  138. &clks {
  139. assigned-clocks = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>;
  140. assigned-clock-rates = <786432000>;
  141. };
  142. &csi {
  143. status = "disabled";
  144. port {
  145. csi1_ep: endpoint {
  146. remote-endpoint = <&ov5640_ep>;
  147. };
  148. };
  149. };
  150. &fec1 {
  151. pinctrl-names = "default";
  152. pinctrl-0 = <&pinctrl_enet1>;
  153. phy-mode = "rmii";
  154. phy-handle = <&ethphy0>;
  155. status = "okay";
  156. };
  157. &fec2 {
  158. pinctrl-names = "default";
  159. pinctrl-0 = <&pinctrl_enet2>;
  160. phy-mode = "rmii";
  161. phy-handle = <&ethphy1>;
  162. status = "okay";
  163. mdio {
  164. #address-cells = <1>;
  165. #size-cells = <0>;
  166. ethphy0: ethernet-phy@2 {
  167. compatible = "ethernet-phy-ieee802.3-c22";
  168. reg = <2>;
  169. };
  170. ethphy1: ethernet-phy@1 {
  171. compatible = "ethernet-phy-ieee802.3-c22";
  172. reg = <1>;
  173. };
  174. };
  175. };
  176. &flexcan1 {
  177. pinctrl-names = "default";
  178. pinctrl-0 = <&pinctrl_flexcan1>;
  179. xceiver-supply = <&reg_can_3v3>;
  180. status = "okay";
  181. };
  182. &flexcan2 {
  183. pinctrl-names = "default";
  184. pinctrl-0 = <&pinctrl_flexcan2>;
  185. xceiver-supply = <&reg_can_3v3>;
  186. status = "okay";
  187. };
  188. &gpc {
  189. fsl,cpu_pupscr_sw2iso = <0x1>;
  190. fsl,cpu_pupscr_sw = <0x0>;
  191. fsl,cpu_pdnscr_iso2sw = <0x1>;
  192. fsl,cpu_pdnscr_iso = <0x1>;
  193. fsl,ldo-bypass = <0>; /* DCDC, ldo-enable */
  194. };
  195. &i2c1 {
  196. clock-frequency = <100000>;
  197. pinctrl-names = "default";
  198. pinctrl-0 = <&pinctrl_i2c1>;
  199. status = "okay";
  200. mag3110@0e {
  201. compatible = "fsl,mag3110";
  202. reg = <0x0e>;
  203. position = <2>;
  204. };
  205. fxls8471@1e {
  206. compatible = "fsl,fxls8471";
  207. reg = <0x1e>;
  208. position = <0>;
  209. interrupt-parent = <&gpio5>;
  210. interrupts = <0 8>;
  211. };
  212. };
  213. &i2c2 {
  214. clock_frequency = <100000>;
  215. pinctrl-names = "default";
  216. pinctrl-0 = <&pinctrl_i2c2>;
  217. status = "okay";
  218. codec: wm8960@1a {
  219. compatible = "wlf,wm8960";
  220. reg = <0x1a>;
  221. clocks = <&clks IMX6UL_CLK_SAI2>;
  222. clock-names = "mclk";
  223. wlf,shared-lrclk;
  224. };
  225. ov5640: ov5640@3c {
  226. compatible = "ovti,ov5640";
  227. reg = <0x3c>;
  228. pinctrl-names = "default";
  229. pinctrl-0 = <&pinctrl_csi1>;
  230. clocks = <&clks IMX6UL_CLK_CSI>;
  231. clock-names = "csi_mclk";
  232. pwn-gpios = <&gpio_spi 6 1>;
  233. rst-gpios = <&gpio_spi 5 0>;
  234. csi_id = <0>;
  235. mclk = <24000000>;
  236. mclk_source = <0>;
  237. status = "disabled";
  238. port {
  239. ov5640_ep: endpoint {
  240. remote-endpoint = <&csi1_ep>;
  241. };
  242. };
  243. };
  244. };
  245. &iomuxc {
  246. pinctrl-names = "default";
  247. pinctrl-0 = <&pinctrl_hog_1>;
  248. imx6ul-evk {
  249. pinctrl_hog_1: hoggrp-1 {
  250. fsl,pins = <
  251. MX6UL_PAD_UART1_RTS_B__GPIO1_IO19 0x17059 /* SD1 CD */
  252. MX6UL_PAD_GPIO1_IO05__USDHC1_VSELECT 0x17059 /* SD1 VSELECT */
  253. MX6UL_PAD_GPIO1_IO09__GPIO1_IO09 0x17059 /* SD1 RESET */
  254. MX6UL_PAD_SNVS_TAMPER0__GPIO5_IO00 0x80000000
  255. >;
  256. };
  257. pinctrl_csi1: csi1grp {
  258. fsl,pins = <
  259. MX6UL_PAD_CSI_MCLK__CSI_MCLK 0x1b088
  260. MX6UL_PAD_CSI_PIXCLK__CSI_PIXCLK 0x1b088
  261. MX6UL_PAD_CSI_VSYNC__CSI_VSYNC 0x1b088
  262. MX6UL_PAD_CSI_HSYNC__CSI_HSYNC 0x1b088
  263. MX6UL_PAD_CSI_DATA00__CSI_DATA02 0x1b088
  264. MX6UL_PAD_CSI_DATA01__CSI_DATA03 0x1b088
  265. MX6UL_PAD_CSI_DATA02__CSI_DATA04 0x1b088
  266. MX6UL_PAD_CSI_DATA03__CSI_DATA05 0x1b088
  267. MX6UL_PAD_CSI_DATA04__CSI_DATA06 0x1b088
  268. MX6UL_PAD_CSI_DATA05__CSI_DATA07 0x1b088
  269. MX6UL_PAD_CSI_DATA06__CSI_DATA08 0x1b088
  270. MX6UL_PAD_CSI_DATA07__CSI_DATA09 0x1b088
  271. >;
  272. };
  273. pinctrl_dvfs: dvfsgrp {
  274. fsl,pins = <
  275. MX6UL_PAD_SNVS_TAMPER3__GPIO5_IO03 0x79
  276. >;
  277. };
  278. pinctrl_enet1: enet1grp {
  279. fsl,pins = <
  280. MX6UL_PAD_ENET1_RX_EN__ENET1_RX_EN 0x1b0b0
  281. MX6UL_PAD_ENET1_RX_ER__ENET1_RX_ER 0x1b0b0
  282. MX6UL_PAD_ENET1_RX_DATA0__ENET1_RDATA00 0x1b0b0
  283. MX6UL_PAD_ENET1_RX_DATA1__ENET1_RDATA01 0x1b0b0
  284. MX6UL_PAD_ENET1_TX_EN__ENET1_TX_EN 0x1b0b0
  285. MX6UL_PAD_ENET1_TX_DATA0__ENET1_TDATA00 0x1b0b0
  286. MX6UL_PAD_ENET1_TX_DATA1__ENET1_TDATA01 0x1b0b0
  287. MX6UL_PAD_ENET1_TX_CLK__ENET1_REF_CLK1 0x4001b031
  288. >;
  289. };
  290. pinctrl_enet2: enet2grp {
  291. fsl,pins = <
  292. MX6UL_PAD_GPIO1_IO07__ENET2_MDC 0x1b0b0
  293. MX6UL_PAD_GPIO1_IO06__ENET2_MDIO 0x1b0b0
  294. MX6UL_PAD_ENET2_RX_EN__ENET2_RX_EN 0x1b0b0
  295. MX6UL_PAD_ENET2_RX_ER__ENET2_RX_ER 0x1b0b0
  296. MX6UL_PAD_ENET2_RX_DATA0__ENET2_RDATA00 0x1b0b0
  297. MX6UL_PAD_ENET2_RX_DATA1__ENET2_RDATA01 0x1b0b0
  298. MX6UL_PAD_ENET2_TX_EN__ENET2_TX_EN 0x1b0b0
  299. MX6UL_PAD_ENET2_TX_DATA0__ENET2_TDATA00 0x1b0b0
  300. MX6UL_PAD_ENET2_TX_DATA1__ENET2_TDATA01 0x1b0b0
  301. MX6UL_PAD_ENET2_TX_CLK__ENET2_REF_CLK2 0x4001b031
  302. >;
  303. };
  304. pinctrl_flexcan1: flexcan1grp{
  305. fsl,pins = <
  306. MX6UL_PAD_UART3_RTS_B__FLEXCAN1_RX 0x1b020
  307. MX6UL_PAD_UART3_CTS_B__FLEXCAN1_TX 0x1b020
  308. >;
  309. };
  310. pinctrl_flexcan2: flexcan2grp{
  311. fsl,pins = <
  312. MX6UL_PAD_UART2_RTS_B__FLEXCAN2_RX 0x1b020
  313. MX6UL_PAD_UART2_CTS_B__FLEXCAN2_TX 0x1b020
  314. >;
  315. };
  316. pinctrl_i2c1: i2c1grp {
  317. fsl,pins = <
  318. MX6UL_PAD_UART4_TX_DATA__I2C1_SCL 0x4001b8b0
  319. MX6UL_PAD_UART4_RX_DATA__I2C1_SDA 0x4001b8b0
  320. >;
  321. };
  322. pinctrl_i2c2: i2c2grp {
  323. fsl,pins = <
  324. MX6UL_PAD_UART5_TX_DATA__I2C2_SCL 0x4001b8b0
  325. MX6UL_PAD_UART5_RX_DATA__I2C2_SDA 0x4001b8b0
  326. >;
  327. };
  328. pinctrl_lcdif_dat: lcdifdatgrp {
  329. fsl,pins = <
  330. MX6UL_PAD_LCD_DATA00__LCDIF_DATA00 0x79
  331. MX6UL_PAD_LCD_DATA01__LCDIF_DATA01 0x79
  332. MX6UL_PAD_LCD_DATA02__LCDIF_DATA02 0x79
  333. MX6UL_PAD_LCD_DATA03__LCDIF_DATA03 0x79
  334. MX6UL_PAD_LCD_DATA04__LCDIF_DATA04 0x79
  335. MX6UL_PAD_LCD_DATA05__LCDIF_DATA05 0x79
  336. MX6UL_PAD_LCD_DATA06__LCDIF_DATA06 0x79
  337. MX6UL_PAD_LCD_DATA07__LCDIF_DATA07 0x79
  338. MX6UL_PAD_LCD_DATA08__LCDIF_DATA08 0x79
  339. MX6UL_PAD_LCD_DATA09__LCDIF_DATA09 0x79
  340. MX6UL_PAD_LCD_DATA10__LCDIF_DATA10 0x79
  341. MX6UL_PAD_LCD_DATA11__LCDIF_DATA11 0x79
  342. MX6UL_PAD_LCD_DATA12__LCDIF_DATA12 0x79
  343. MX6UL_PAD_LCD_DATA13__LCDIF_DATA13 0x79
  344. MX6UL_PAD_LCD_DATA14__LCDIF_DATA14 0x79
  345. MX6UL_PAD_LCD_DATA15__LCDIF_DATA15 0x79
  346. MX6UL_PAD_LCD_DATA16__LCDIF_DATA16 0x79
  347. MX6UL_PAD_LCD_DATA17__LCDIF_DATA17 0x79
  348. MX6UL_PAD_LCD_DATA18__LCDIF_DATA18 0x79
  349. MX6UL_PAD_LCD_DATA19__LCDIF_DATA19 0x79
  350. MX6UL_PAD_LCD_DATA20__LCDIF_DATA20 0x79
  351. MX6UL_PAD_LCD_DATA21__LCDIF_DATA21 0x79
  352. MX6UL_PAD_LCD_DATA22__LCDIF_DATA22 0x79
  353. MX6UL_PAD_LCD_DATA23__LCDIF_DATA23 0x79
  354. >;
  355. };
  356. pinctrl_lcdif_ctrl: lcdifctrlgrp {
  357. fsl,pins = <
  358. MX6UL_PAD_LCD_CLK__LCDIF_CLK 0x79
  359. MX6UL_PAD_LCD_ENABLE__LCDIF_ENABLE 0x79
  360. MX6UL_PAD_LCD_HSYNC__LCDIF_HSYNC 0x79
  361. MX6UL_PAD_LCD_VSYNC__LCDIF_VSYNC 0x79
  362. /* used for lcd reset */
  363. MX6UL_PAD_SNVS_TAMPER9__GPIO5_IO09 0x79
  364. >;
  365. };
  366. pinctrl_pwm1: pwm1grp {
  367. fsl,pins = <
  368. MX6UL_PAD_GPIO1_IO08__PWM1_OUT 0x110b0
  369. >;
  370. };
  371. pinctrl_qspi: qspigrp {
  372. fsl,pins = <
  373. MX6UL_PAD_NAND_WP_B__QSPI_A_SCLK 0x70a1
  374. MX6UL_PAD_NAND_READY_B__QSPI_A_DATA00 0x70a1
  375. MX6UL_PAD_NAND_CE0_B__QSPI_A_DATA01 0x70a1
  376. MX6UL_PAD_NAND_CE1_B__QSPI_A_DATA02 0x70a1
  377. MX6UL_PAD_NAND_CLE__QSPI_A_DATA03 0x70a1
  378. MX6UL_PAD_NAND_DQS__QSPI_A_SS0_B 0x70a1
  379. >;
  380. };
  381. pinctrl_sai2: sai2grp {
  382. fsl,pins = <
  383. MX6UL_PAD_JTAG_TDI__SAI2_TX_BCLK 0x17088
  384. MX6UL_PAD_JTAG_TDO__SAI2_TX_SYNC 0x17088
  385. MX6UL_PAD_JTAG_TRST_B__SAI2_TX_DATA 0x11088
  386. MX6UL_PAD_JTAG_TCK__SAI2_RX_DATA 0x11088
  387. MX6UL_PAD_JTAG_TMS__SAI2_MCLK 0x17088
  388. MX6UL_PAD_SNVS_TAMPER4__GPIO5_IO04 0x17059
  389. >;
  390. };
  391. pinctrl_sim2_1: sim2grp-1 {
  392. fsl,pins = <
  393. MX6UL_PAD_CSI_DATA03__SIM2_PORT1_PD 0xb808
  394. MX6UL_PAD_CSI_DATA04__SIM2_PORT1_CLK 0x11
  395. MX6UL_PAD_CSI_DATA05__SIM2_PORT1_RST_B 0xb810
  396. MX6UL_PAD_CSI_DATA06__SIM2_PORT1_SVEN 0xb810
  397. MX6UL_PAD_CSI_DATA07__SIM2_PORT1_TRXD 0xb811
  398. MX6UL_PAD_CSI_DATA02__GPIO4_IO23 0x3008
  399. >;
  400. };
  401. pinctrl_spi4: spi4grp {
  402. fsl,pins = <
  403. MX6UL_PAD_BOOT_MODE0__GPIO5_IO10 0x70a1
  404. MX6UL_PAD_BOOT_MODE1__GPIO5_IO11 0x70a1
  405. MX6UL_PAD_SNVS_TAMPER7__GPIO5_IO07 0x70a1
  406. MX6UL_PAD_SNVS_TAMPER8__GPIO5_IO08 0x80000000
  407. >;
  408. };
  409. pinctrl_tsc: tscgrp {
  410. fsl,pins = <
  411. MX6UL_PAD_GPIO1_IO01__GPIO1_IO01 0xb0
  412. MX6UL_PAD_GPIO1_IO02__GPIO1_IO02 0xb0
  413. MX6UL_PAD_GPIO1_IO03__GPIO1_IO03 0xb0
  414. MX6UL_PAD_GPIO1_IO04__GPIO1_IO04 0xb0
  415. >;
  416. };
  417. pinctrl_uart1: uart1grp {
  418. fsl,pins = <
  419. MX6UL_PAD_UART1_TX_DATA__UART1_DCE_TX 0x1b0b1
  420. MX6UL_PAD_UART1_RX_DATA__UART1_DCE_RX 0x1b0b1
  421. >;
  422. };
  423. pinctrl_uart2: uart2grp {
  424. fsl,pins = <
  425. MX6UL_PAD_UART2_TX_DATA__UART2_DCE_TX 0x1b0b1
  426. MX6UL_PAD_UART2_RX_DATA__UART2_DCE_RX 0x1b0b1
  427. MX6UL_PAD_UART3_RX_DATA__UART2_DCE_RTS 0x1b0b1
  428. MX6UL_PAD_UART3_TX_DATA__UART2_DCE_CTS 0x1b0b1
  429. >;
  430. };
  431. pinctrl_uart2dte: uart2dtegrp {
  432. fsl,pins = <
  433. MX6UL_PAD_UART2_TX_DATA__UART2_DTE_RX 0x1b0b1
  434. MX6UL_PAD_UART2_RX_DATA__UART2_DTE_TX 0x1b0b1
  435. MX6UL_PAD_UART3_RX_DATA__UART2_DTE_CTS 0x1b0b1
  436. MX6UL_PAD_UART3_TX_DATA__UART2_DTE_RTS 0x1b0b1
  437. >;
  438. };
  439. pinctrl_usdhc1: usdhc1grp {
  440. fsl,pins = <
  441. MX6UL_PAD_SD1_CMD__USDHC1_CMD 0x17059
  442. MX6UL_PAD_SD1_CLK__USDHC1_CLK 0x10071
  443. MX6UL_PAD_SD1_DATA0__USDHC1_DATA0 0x17059
  444. MX6UL_PAD_SD1_DATA1__USDHC1_DATA1 0x17059
  445. MX6UL_PAD_SD1_DATA2__USDHC1_DATA2 0x17059
  446. MX6UL_PAD_SD1_DATA3__USDHC1_DATA3 0x17059
  447. >;
  448. };
  449. pinctrl_usdhc1_100mhz: usdhc1grp100mhz {
  450. fsl,pins = <
  451. MX6UL_PAD_SD1_CMD__USDHC1_CMD 0x170b9
  452. MX6UL_PAD_SD1_CLK__USDHC1_CLK 0x100b9
  453. MX6UL_PAD_SD1_DATA0__USDHC1_DATA0 0x170b9
  454. MX6UL_PAD_SD1_DATA1__USDHC1_DATA1 0x170b9
  455. MX6UL_PAD_SD1_DATA2__USDHC1_DATA2 0x170b9
  456. MX6UL_PAD_SD1_DATA3__USDHC1_DATA3 0x170b9
  457. >;
  458. };
  459. pinctrl_usdhc1_200mhz: usdhc1grp200mhz {
  460. fsl,pins = <
  461. MX6UL_PAD_SD1_CMD__USDHC1_CMD 0x170f9
  462. MX6UL_PAD_SD1_CLK__USDHC1_CLK 0x100f9
  463. MX6UL_PAD_SD1_DATA0__USDHC1_DATA0 0x170f9
  464. MX6UL_PAD_SD1_DATA1__USDHC1_DATA1 0x170f9
  465. MX6UL_PAD_SD1_DATA2__USDHC1_DATA2 0x170f9
  466. MX6UL_PAD_SD1_DATA3__USDHC1_DATA3 0x170f9
  467. >;
  468. };
  469. pinctrl_usdhc2: usdhc2grp {
  470. fsl,pins = <
  471. MX6UL_PAD_NAND_RE_B__USDHC2_CLK 0x10069
  472. MX6UL_PAD_NAND_WE_B__USDHC2_CMD 0x17059
  473. MX6UL_PAD_NAND_DATA00__USDHC2_DATA0 0x17059
  474. MX6UL_PAD_NAND_DATA01__USDHC2_DATA1 0x17059
  475. MX6UL_PAD_NAND_DATA02__USDHC2_DATA2 0x17059
  476. MX6UL_PAD_NAND_DATA03__USDHC2_DATA3 0x17059
  477. >;
  478. };
  479. pinctrl_usdhc2_8bit: usdhc2grp_8bit {
  480. fsl,pins = <
  481. MX6UL_PAD_NAND_RE_B__USDHC2_CLK 0x10069
  482. MX6UL_PAD_NAND_WE_B__USDHC2_CMD 0x17059
  483. MX6UL_PAD_NAND_DATA00__USDHC2_DATA0 0x17059
  484. MX6UL_PAD_NAND_DATA01__USDHC2_DATA1 0x17059
  485. MX6UL_PAD_NAND_DATA02__USDHC2_DATA2 0x17059
  486. MX6UL_PAD_NAND_DATA03__USDHC2_DATA3 0x17059
  487. MX6UL_PAD_NAND_DATA04__USDHC2_DATA4 0x17059
  488. MX6UL_PAD_NAND_DATA05__USDHC2_DATA5 0x17059
  489. MX6UL_PAD_NAND_DATA06__USDHC2_DATA6 0x17059
  490. MX6UL_PAD_NAND_DATA07__USDHC2_DATA7 0x17059
  491. >;
  492. };
  493. pinctrl_usdhc2_8bit_100mhz: usdhc2grp_8bit_100mhz {
  494. fsl,pins = <
  495. MX6UL_PAD_NAND_RE_B__USDHC2_CLK 0x100b9
  496. MX6UL_PAD_NAND_WE_B__USDHC2_CMD 0x170b9
  497. MX6UL_PAD_NAND_DATA00__USDHC2_DATA0 0x170b9
  498. MX6UL_PAD_NAND_DATA01__USDHC2_DATA1 0x170b9
  499. MX6UL_PAD_NAND_DATA02__USDHC2_DATA2 0x170b9
  500. MX6UL_PAD_NAND_DATA03__USDHC2_DATA3 0x170b9
  501. MX6UL_PAD_NAND_DATA04__USDHC2_DATA4 0x170b9
  502. MX6UL_PAD_NAND_DATA05__USDHC2_DATA5 0x170b9
  503. MX6UL_PAD_NAND_DATA06__USDHC2_DATA6 0x170b9
  504. MX6UL_PAD_NAND_DATA07__USDHC2_DATA7 0x170b9
  505. >;
  506. };
  507. pinctrl_usdhc2_8bit_200mhz: usdhc2grp_8bit_200mhz {
  508. fsl,pins = <
  509. MX6UL_PAD_NAND_RE_B__USDHC2_CLK 0x100f9
  510. MX6UL_PAD_NAND_WE_B__USDHC2_CMD 0x170f9
  511. MX6UL_PAD_NAND_DATA00__USDHC2_DATA0 0x170f9
  512. MX6UL_PAD_NAND_DATA01__USDHC2_DATA1 0x170f9
  513. MX6UL_PAD_NAND_DATA02__USDHC2_DATA2 0x170f9
  514. MX6UL_PAD_NAND_DATA03__USDHC2_DATA3 0x170f9
  515. MX6UL_PAD_NAND_DATA04__USDHC2_DATA4 0x170f9
  516. MX6UL_PAD_NAND_DATA05__USDHC2_DATA5 0x170f9
  517. MX6UL_PAD_NAND_DATA06__USDHC2_DATA6 0x170f9
  518. MX6UL_PAD_NAND_DATA07__USDHC2_DATA7 0x170f9
  519. >;
  520. };
  521. pinctrl_wdog: wdoggrp {
  522. fsl,pins = <
  523. MX6UL_PAD_LCD_RESET__WDOG1_WDOG_ANY 0x30b0
  524. >;
  525. };
  526. };
  527. };
  528. &lcdif {
  529. pinctrl-names = "default";
  530. pinctrl-0 = <&pinctrl_lcdif_dat
  531. &pinctrl_lcdif_ctrl>;
  532. display = <&display0>;
  533. status = "okay";
  534. display0: display {
  535. bits-per-pixel = <16>;
  536. bus-width = <24>;
  537. display-timings {
  538. native-mode = <&timing0>;
  539. timing0: timing0 {
  540. clock-frequency = <9200000>;
  541. hactive = <480>;
  542. vactive = <272>;
  543. hfront-porch = <8>;
  544. hback-porch = <4>;
  545. hsync-len = <41>;
  546. vback-porch = <2>;
  547. vfront-porch = <4>;
  548. vsync-len = <10>;
  549. hsync-active = <0>;
  550. vsync-active = <0>;
  551. de-active = <1>;
  552. pixelclk-active = <0>;
  553. };
  554. };
  555. };
  556. };
  557. &pwm1 {
  558. pinctrl-names = "default";
  559. pinctrl-0 = <&pinctrl_pwm1>;
  560. status = "okay";
  561. };
  562. &pxp {
  563. status = "okay";
  564. };
  565. &qspi {
  566. pinctrl-names = "default";
  567. pinctrl-0 = <&pinctrl_qspi>;
  568. status = "okay";
  569. ddrsmp=<0>;
  570. flash0: n25q256a@0 {
  571. #address-cells = <1>;
  572. #size-cells = <1>;
  573. compatible = "micron,n25q256a";
  574. spi-max-frequency = <29000000>;
  575. spi-nor,ddr-quad-read-dummy = <6>;
  576. reg = <0>;
  577. };
  578. };
  579. &sai2 {
  580. pinctrl-names = "default";
  581. pinctrl-0 = <&pinctrl_sai2>;
  582. assigned-clocks = <&clks IMX6UL_CLK_SAI2_SEL>,
  583. <&clks IMX6UL_CLK_SAI2>;
  584. assigned-clock-parents = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>;
  585. assigned-clock-rates = <0>, <12288000>;
  586. status = "okay";
  587. };
  588. &sim2 {
  589. pinctrl-names = "default";
  590. pinctrl-0 = <&pinctrl_sim2_1>;
  591. assigned-clocks = <&clks IMX6UL_CLK_SIM_SEL>;
  592. assigned-clock-parents = <&clks IMX6UL_CLK_SIM_PODF>;
  593. assigned-clock-rates = <240000000>;
  594. /* GPIO_ACTIVE_HIGH/LOW:sim card voltage control
  595. * NCN8025:Vcc = ACTIVE_HIGH?5V:3V
  596. * TDA8035:Vcc = ACTIVE_HIGH?5V:1.8V
  597. */
  598. pinctrl-assert-gpios = <&gpio4 23 GPIO_ACTIVE_HIGH>;
  599. port = <1>;
  600. sven_low_active;
  601. status = "okay";
  602. };
  603. &tsc {
  604. pinctrl-names = "default";
  605. pinctrl-0 = <&pinctrl_tsc>;
  606. xnur-gpio = <&gpio1 3 GPIO_ACTIVE_LOW>;
  607. measure-delay-time = <0xffff>;
  608. pre-charge-time = <0xfff>;
  609. status = "okay";
  610. };
  611. &uart1 {
  612. pinctrl-names = "default";
  613. pinctrl-0 = <&pinctrl_uart1>;
  614. status = "okay";
  615. };
  616. &uart2 {
  617. pinctrl-names = "default";
  618. pinctrl-0 = <&pinctrl_uart2>;
  619. fsl,uart-has-rtscts;
  620. /* for DTE mode, add below change */
  621. /* fsl,dte-mode; */
  622. /* pinctrl-0 = <&pinctrl_uart2dte>; */
  623. status = "okay";
  624. };
  625. &usbotg1 {
  626. dr_mode = "otg";
  627. srp-disable;
  628. hnp-disable;
  629. adp-disable;
  630. status = "okay";
  631. };
  632. &usbotg2 {
  633. dr_mode = "host";
  634. disable-over-current;
  635. status = "okay";
  636. };
  637. &usbphy1 {
  638. tx-d-cal = <0x5>;
  639. };
  640. &usbphy2 {
  641. tx-d-cal = <0x5>;
  642. };
  643. &usdhc1 {
  644. pinctrl-names = "default", "state_100mhz", "state_200mhz";
  645. pinctrl-0 = <&pinctrl_usdhc1>;
  646. pinctrl-1 = <&pinctrl_usdhc1_100mhz>;
  647. pinctrl-2 = <&pinctrl_usdhc1_200mhz>;
  648. cd-gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;
  649. keep-power-in-suspend;
  650. enable-sdio-wakeup;
  651. vmmc-supply = <&reg_sd1_vmmc>;
  652. status = "okay";
  653. };
  654. &usdhc2 {
  655. pinctrl-names = "default";
  656. pinctrl-0 = <&pinctrl_usdhc2>;
  657. non-removable;
  658. status = "okay";
  659. };
  660. &wdog1 {
  661. pinctrl-names = "default";
  662. pinctrl-0 = <&pinctrl_wdog>;
  663. fsl,wdog_b;
  664. };
im6ull.dtsi  ,文件描述 SOC 的内部外设信息,比如 CPU 架构、主频、外设寄存器地址范围,比如 UART、IIC 等等。
  1. /*
  2. * Copyright 2014-2016 Freescale Semiconductor, Inc.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #include <dt-bindings/clock/imx6sx-clock.h>
  9. #include <dt-bindings/gpio/gpio.h>
  10. #include <dt-bindings/input/input.h>
  11. #include <dt-bindings/interrupt-controller/arm-gic.h>
  12. #include "imx6sx-pinfunc.h"
  13. #include "skeleton.dtsi"
  14. / {
  15. aliases {
  16. can0 = &flexcan1;
  17. can1 = &flexcan2;
  18. ethernet0 = &fec1;
  19. ethernet1 = &fec2;
  20. gpio0 = &gpio1;
  21. gpio1 = &gpio2;
  22. gpio2 = &gpio3;
  23. gpio3 = &gpio4;
  24. gpio4 = &gpio5;
  25. gpio5 = &gpio6;
  26. gpio6 = &gpio7;
  27. i2c0 = &i2c1;
  28. i2c1 = &i2c2;
  29. i2c2 = &i2c3;
  30. i2c3 = &i2c4;
  31. mmc0 = &usdhc1;
  32. mmc1 = &usdhc2;
  33. mmc2 = &usdhc3;
  34. mmc3 = &usdhc4;
  35. serial0 = &uart1;
  36. serial1 = &uart2;
  37. serial2 = &uart3;
  38. serial3 = &uart4;
  39. serial4 = &uart5;
  40. serial5 = &uart6;
  41. spi0 = &ecspi1;
  42. spi1 = &ecspi2;
  43. spi2 = &ecspi3;
  44. spi3 = &ecspi4;
  45. spi4 = &ecspi5;
  46. usbphy0 = &usbphy1;
  47. usbphy1 = &usbphy2;
  48. lcdif0 = &lcdif1;
  49. lcdif1 = &lcdif2;
  50. };
  51. cpus {
  52. #address-cells = <1>;
  53. #size-cells = <0>;
  54. cpu0: cpu@0 {
  55. compatible = "arm,cortex-a9";
  56. device_type = "cpu";
  57. reg = <0>;
  58. next-level-cache = <&L2>;
  59. operating-points = <
  60. /* kHz uV */
  61. 996000 1250000
  62. 792000 1175000
  63. 396000 1075000
  64. 198000 975000
  65. >;
  66. fsl,soc-operating-points = <
  67. /* ARM kHz SOC uV */
  68. 996000 1175000
  69. 792000 1175000
  70. 396000 1175000
  71. 198000 1175000
  72. >;
  73. clock-latency = <61036>; /* two CLK32 periods */
  74. clocks = <&clks IMX6SX_CLK_ARM>,
  75. <&clks IMX6SX_CLK_PLL2_PFD2>,
  76. <&clks IMX6SX_CLK_STEP>,
  77. <&clks IMX6SX_CLK_PLL1_SW>,
  78. <&clks IMX6SX_CLK_PLL1_SYS>,
  79. <&clks IMX6SX_CLK_PLL1>,
  80. <&clks IMX6SX_PLL1_BYPASS>,
  81. <&clks IMX6SX_PLL1_BYPASS_SRC>;
  82. clock-names = "arm", "pll2_pfd2_396m", "step",
  83. "pll1_sw", "pll1_sys", "pll1",
  84. "pll1_bypass", "pll1_bypass_src";
  85. arm-supply = <&reg_arm>;
  86. soc-supply = <&reg_soc>;
  87. };
  88. };
  89. reserved-memory {
  90. #address-cells = <1>;
  91. #size-cells = <1>;
  92. ranges;
  93. /* global autoconfigured region for contiguous allocations */
  94. linux,cma {
  95. compatible = "shared-dma-pool";
  96. reusable;
  97. size = <0x14000000>;
  98. linux,cma-default;
  99. };
  100. };
  101. intc: interrupt-controller@00a01000 {
  102. compatible = "arm,cortex-a9-gic";
  103. #interrupt-cells = <3>;
  104. interrupt-controller;
  105. reg = <0x00a01000 0x1000>,
  106. <0x00a00100 0x100>;
  107. interrupt-parent = <&intc>;
  108. };
  109. clocks {
  110. #address-cells = <1>;
  111. #size-cells = <0>;
  112. ckil: clock@0 {
  113. compatible = "fixed-clock";
  114. reg = <0>;
  115. #clock-cells = <0>;
  116. clock-frequency = <32768>;
  117. clock-output-names = "ckil";
  118. };
  119. osc: clock@1 {
  120. compatible = "fixed-clock";
  121. reg = <1>;
  122. #clock-cells = <0>;
  123. clock-frequency = <24000000>;
  124. clock-output-names = "osc";
  125. };
  126. ipp_di0: clock@2 {
  127. compatible = "fixed-clock";
  128. reg = <2>;
  129. #clock-cells = <0>;
  130. clock-frequency = <0>;
  131. clock-output-names = "ipp_di0";
  132. };
  133. ipp_di1: clock@3 {
  134. compatible = "fixed-clock";
  135. reg = <3>;
  136. #clock-cells = <0>;
  137. clock-frequency = <0>;
  138. clock-output-names = "ipp_di1";
  139. };
  140. };
  141. soc {
  142. #address-cells = <1>;
  143. #size-cells = <1>;
  144. compatible = "simple-bus";
  145. interrupt-parent = <&gpc>;
  146. ranges;
  147. busfreq {
  148. compatible = "fsl,imx_busfreq";
  149. clocks = <&clks IMX6SX_CLK_PLL2_BUS>, <&clks IMX6SX_CLK_PLL2_PFD2>,
  150. <&clks IMX6SX_CLK_PLL2_198M>, <&clks IMX6SX_CLK_ARM>,
  151. <&clks IMX6SX_CLK_PLL3_USB_OTG>, <&clks IMX6SX_CLK_PERIPH>,
  152. <&clks IMX6SX_CLK_PERIPH_PRE>, <&clks IMX6SX_CLK_PERIPH_CLK2>,
  153. <&clks IMX6SX_CLK_PERIPH_CLK2_SEL>, <&clks IMX6SX_CLK_OSC>,
  154. <&clks IMX6SX_CLK_PLL1_SYS>, <&clks IMX6SX_CLK_PERIPH2>,
  155. <&clks IMX6SX_CLK_AHB>, <&clks IMX6SX_CLK_OCRAM_PODF>,
  156. <&clks IMX6SX_CLK_PLL1_SW>, <&clks IMX6SX_CLK_PERIPH2_PRE>,
  157. <&clks IMX6SX_CLK_PERIPH2_CLK2_SEL>, <&clks IMX6SX_CLK_PERIPH2_CLK2>,
  158. <&clks IMX6SX_CLK_STEP>, <&clks IMX6SX_CLK_MMDC_PODF>,
  159. <&clks IMX6SX_CLK_M4>;
  160. clock-names = "pll2_bus", "pll2_pfd2_396m", "pll2_198m", "arm",
  161. "pll3_usb_otg", "periph", "periph_pre", "periph_clk2",
  162. "periph_clk2_sel", "osc", "pll1_sys", "periph2",
  163. "ahb", "ocram", "pll1_sw", "periph2_pre",
  164. "periph2_clk2_sel", "periph2_clk2", "step", "mmdc",
  165. "m4";
  166. fsl,max_ddr_freq = <400000000>;
  167. };
  168. pmu {
  169. compatible = "arm,cortex-a9-pmu";
  170. interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
  171. };
  172. ocrams: sram@008f8000 {
  173. compatible = "fsl,lpm-sram";
  174. reg = <0x008f8000 0x4000>;
  175. clocks = <&clks IMX6SX_CLK_OCRAM_S>;
  176. };
  177. ocrams_ddr: sram@00900000 {
  178. compatible = "fsl,ddr-lpm-sram";
  179. reg = <0x00900000 0x1000>;
  180. clocks = <&clks IMX6SX_CLK_OCRAM>;
  181. };
  182. ocram: sram@00901000 {
  183. compatible = "mmio-sram";
  184. reg = <0x00901000 0x1F000>;
  185. clocks = <&clks IMX6SX_CLK_OCRAM>;
  186. };
  187. ocram_mf: sram-mf@00900000 {
  188. compatible = "fsl,mega-fast-sram";
  189. reg = <0x00900000 0x20000>;
  190. clocks = <&clks IMX6SX_CLK_OCRAM>;
  191. };
  192. L2: l2-cache@00a02000 {
  193. compatible = "arm,pl310-cache";
  194. reg = <0x00a02000 0x1000>;
  195. interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>;
  196. cache-unified;
  197. cache-level = <2>;
  198. arm,tag-latency = <4 2 3>;
  199. arm,data-latency = <4 2 3>;
  200. };
  201. dma_apbh: dma-apbh@01804000 {
  202. compatible = "fsl,imx6sx-dma-apbh", "fsl,imx28-dma-apbh";
  203. reg = <0x01804000 0x2000>;
  204. interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>,
  205. <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>,
  206. <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>,
  207. <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
  208. interrupt-names = "gpmi0", "gpmi1", "gpmi2", "gpmi3";
  209. #dma-cells = <1>;
  210. dma-channels = <4>;
  211. clocks = <&clks IMX6SX_CLK_APBH_DMA>;
  212. };
  213. caam_sm: caam-sm@00100000 {
  214. compatible = "fsl,imx6q-caam-sm";
  215. reg = <0x00100000 0x3fff>;
  216. };
  217. irq_sec_vio: caam_secvio {
  218. compatible = "fsl,imx6q-caam-secvio";
  219. interrupts = <0 20 0x04>;
  220. secvio_src = <0x8000001d>;
  221. jtag-tamper = "disabled";
  222. watchdog-tamper = "enabled";
  223. internal-boot-tamper = "enabled";
  224. external-pin-tamper = "disabled";
  225. };
  226. gpu: gpu@01800000 {
  227. compatible = "fsl,imx6sx-gpu", "fsl,imx6q-gpu";
  228. reg = <0x01800000 0x4000>, <0x80000000 0x0>,
  229. <0x0 0x8000000>;
  230. reg-names = "iobase_3d", "phys_baseaddr", "contiguous_mem";
  231. interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
  232. interrupt-names = "irq_3d";
  233. clocks = <&clks IMX6SX_CLK_GPU_AXI_PODF>, <&clks IMX6SX_CLK_GPU>,
  234. <&clks 0>;
  235. clock-names = "gpu3d_axi_clk", "gpu3d_clk",
  236. "gpu3d_shader_clk";
  237. resets = <&src 0>;
  238. reset-names = "gpu3d";
  239. power-domains = <&gpc 1>;
  240. };
  241. gpmi: gpmi-nand@01806000{
  242. compatible = "fsl,imx6sx-gpmi-nand";
  243. #address-cells = <1>;
  244. #size-cells = <1>;
  245. reg = <0x01806000 0x2000>, <0x01808000 0x4000>;
  246. reg-names = "gpmi-nand", "bch";
  247. interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
  248. interrupt-names = "bch";
  249. clocks = <&clks IMX6SX_CLK_GPMI_IO>,
  250. <&clks IMX6SX_CLK_GPMI_APB>,
  251. <&clks IMX6SX_CLK_GPMI_BCH>,
  252. <&clks IMX6SX_CLK_GPMI_BCH_APB>,
  253. <&clks IMX6SX_CLK_PER1_BCH>;
  254. clock-names = "gpmi_io", "gpmi_apb", "gpmi_bch",
  255. "gpmi_bch_apb", "per1_bch";
  256. dmas = <&dma_apbh 0>;
  257. dma-names = "rx-tx";
  258. status = "disabled";
  259. };
  260. aips1: aips-bus@02000000 {
  261. compatible = "fsl,aips-bus", "simple-bus";
  262. #address-cells = <1>;
  263. #size-cells = <1>;
  264. reg = <0x02000000 0x100000>;
  265. ranges;
  266. spba-bus@02000000 {
  267. compatible = "fsl,spba-bus", "simple-bus";
  268. #address-cells = <1>;
  269. #size-cells = <1>;
  270. reg = <0x02000000 0x40000>;
  271. ranges;
  272. spdif: spdif@02004000 {
  273. compatible = "fsl,imx6sx-spdif", "fsl,imx35-spdif";
  274. reg = <0x02004000 0x4000>;
  275. interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
  276. dmas = <&sdma 14 18 0>,
  277. <&sdma 15 18 0>;
  278. dma-names = "rx", "tx";
  279. clocks = <&clks IMX6SX_CLK_SPDIF_GCLK>,
  280. <&clks IMX6SX_CLK_OSC>,
  281. <&clks IMX6SX_CLK_SPDIF>,
  282. <&clks 0>, <&clks 0>, <&clks 0>,
  283. <&clks IMX6SX_CLK_IPG>,
  284. <&clks 0>, <&clks 0>,
  285. <&clks IMX6SX_CLK_SPBA>;
  286. clock-names = "core", "rxtx0",
  287. "rxtx1", "rxtx2",
  288. "rxtx3", "rxtx4",
  289. "rxtx5", "rxtx6",
  290. "rxtx7", "dma";
  291. status = "disabled";
  292. };
  293. ecspi1: ecspi@02008000 {
  294. #address-cells = <1>;
  295. #size-cells = <0>;
  296. compatible = "fsl,imx6sx-ecspi", "fsl,imx51-ecspi";
  297. reg = <0x02008000 0x4000>;
  298. interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
  299. clocks = <&clks IMX6SX_CLK_ECSPI1>,
  300. <&clks IMX6SX_CLK_ECSPI1>;
  301. clock-names = "ipg", "per";
  302. dmas = <&sdma 3 7 1>, <&sdma 4 7 2>;
  303. dma-names = "rx", "tx";
  304. status = "disabled";
  305. };
  306. ecspi2: ecspi@0200c000 {
  307. #address-cells = <1>;
  308. #size-cells = <0>;
  309. compatible = "fsl,imx6sx-ecspi", "fsl,imx51-ecspi";
  310. reg = <0x0200c000 0x4000>;
  311. interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
  312. clocks = <&clks IMX6SX_CLK_ECSPI2>,
  313. <&clks IMX6SX_CLK_ECSPI2>;
  314. clock-names = "ipg", "per";
  315. dmas = <&sdma 5 7 1>, <&sdma 6 7 2>;
  316. dma-names = "rx", "tx";
  317. status = "disabled";
  318. };
  319. ecspi3: ecspi@02010000 {
  320. #address-cells = <1>;
  321. #size-cells = <0>;
  322. compatible = "fsl,imx6sx-ecspi", "fsl,imx51-ecspi";
  323. reg = <0x02010000 0x4000>;
  324. interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
  325. clocks = <&clks IMX6SX_CLK_ECSPI3>,
  326. <&clks IMX6SX_CLK_ECSPI3>;
  327. clock-names = "ipg", "per";
  328. dmas = <&sdma 7 7 1>, <&sdma 8 7 2>;
  329. dma-names = "rx", "tx";
  330. status = "disabled";
  331. };
  332. ecspi4: ecspi@02014000 {
  333. #address-cells = <1>;
  334. #size-cells = <0>;
  335. compatible = "fsl,imx6sx-ecspi", "fsl,imx51-ecspi";
  336. reg = <0x02014000 0x4000>;
  337. interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
  338. clocks = <&clks IMX6SX_CLK_ECSPI4>,
  339. <&clks IMX6SX_CLK_ECSPI4>;
  340. clock-names = "ipg", "per";
  341. dmas = <&sdma 9 7 1>, <&sdma 10 7 2>;
  342. dma-names = "rx", "tx";
  343. status = "disabled";
  344. };
  345. uart1: serial@02020000 {
  346. compatible = "fsl,imx6sx-uart",
  347. "fsl,imx6q-uart", "fsl,imx21-uart";
  348. reg = <0x02020000 0x4000>;
  349. interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
  350. clocks = <&clks IMX6SX_CLK_UART_IPG>,
  351. <&clks IMX6SX_CLK_UART_SERIAL>;
  352. clock-names = "ipg", "per";
  353. dmas = <&sdma 25 4 0>, <&sdma 26 4 0>;
  354. dma-names = "rx", "tx";
  355. status = "disabled";
  356. };
  357. esai: esai@02024000 {
  358. compatible = "fsl,imx35-esai";
  359. reg = <0x02024000 0x4000>;
  360. interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
  361. clocks = <&clks IMX6SX_CLK_ESAI_IPG>,
  362. <&clks IMX6SX_CLK_ESAI_MEM>,
  363. <&clks IMX6SX_CLK_ESAI_EXTAL>,
  364. <&clks IMX6SX_CLK_ESAI_IPG>,
  365. <&clks IMX6SX_CLK_SPBA>;
  366. clock-names = "core", "mem", "extal",
  367. "fsys", "dma";
  368. dmas = <&sdma 23 21 0>,
  369. <&sdma 24 21 0>;
  370. dma-names = "rx", "tx";
  371. status = "disabled";
  372. };
  373. ssi1: ssi@02028000 {
  374. #sound-dai-cells = <0>;
  375. compatible = "fsl,imx6sx-ssi", "fsl,imx51-ssi";
  376. reg = <0x02028000 0x4000>;
  377. interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
  378. clocks = <&clks IMX6SX_CLK_SSI1_IPG>,
  379. <&clks IMX6SX_CLK_SSI1>;
  380. clock-names = "ipg", "baud";
  381. dmas = <&sdma 37 22 0>, <&sdma 38 22 0>;
  382. dma-names = "rx", "tx";
  383. fsl,fifo-depth = <15>;
  384. status = "disabled";
  385. };
  386. ssi2: ssi@0202c000 {
  387. #sound-dai-cells = <0>;
  388. compatible = "fsl,imx6sx-ssi", "fsl,imx51-ssi";
  389. reg = <0x0202c000 0x4000>;
  390. interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
  391. clocks = <&clks IMX6SX_CLK_SSI2_IPG>,
  392. <&clks IMX6SX_CLK_SSI2>;
  393. clock-names = "ipg", "baud";
  394. dmas = <&sdma 41 22 0>, <&sdma 42 22 0>;
  395. dma-names = "rx", "tx";
  396. fsl,fifo-depth = <15>;
  397. status = "disabled";
  398. };
  399. ssi3: ssi@02030000 {
  400. #sound-dai-cells = <0>;
  401. compatible = "fsl,imx6sx-ssi", "fsl,imx51-ssi";
  402. reg = <0x02030000 0x4000>;
  403. interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
  404. clocks = <&clks IMX6SX_CLK_SSI3_IPG>,
  405. <&clks IMX6SX_CLK_SSI3>;
  406. clock-names = "ipg", "baud";
  407. dmas = <&sdma 45 22 0>, <&sdma 46 22 0>;
  408. dma-names = "rx", "tx";
  409. fsl,fifo-depth = <15>;
  410. status = "disabled";
  411. };
  412. asrc: asrc@02034000 {
  413. compatible = "fsl,imx53-asrc";
  414. reg = <0x02034000 0x4000>;
  415. interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
  416. clocks = <&clks IMX6SX_CLK_ASRC_IPG>,
  417. <&clks IMX6SX_CLK_ASRC_MEM>, <&clks 0>,
  418. <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>,
  419. <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>,
  420. <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>,
  421. <&clks IMX6SX_CLK_SPDIF>, <&clks 0>, <&clks 0>,
  422. <&clks IMX6SX_CLK_SPBA>;
  423. clock-names = "mem", "ipg", "asrck_0",
  424. "asrck_1", "asrck_2", "asrck_3", "asrck_4",
  425. "asrck_5", "asrck_6", "asrck_7", "asrck_8",
  426. "asrck_9", "asrck_a", "asrck_b", "asrck_c",
  427. "asrck_d", "asrck_e", "asrck_f", "dma";
  428. dmas = <&sdma 17 23 1>, <&sdma 18 23 1>, <&sdma 19 23 1>,
  429. <&sdma 20 23 1>, <&sdma 21 23 1>, <&sdma 22 23 1>;
  430. dma-names = "rxa", "rxb", "rxc",
  431. "txa", "txb", "txc";
  432. fsl,asrc-rate = <48000>;
  433. fsl,asrc-width = <16>;
  434. status = "okay";
  435. };
  436. };
  437. pwm1: pwm@02080000 {
  438. compatible = "fsl,imx6sx-pwm", "fsl,imx27-pwm";
  439. reg = <0x02080000 0x4000>;
  440. interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
  441. clocks = <&clks IMX6SX_CLK_PWM1>,
  442. <&clks IMX6SX_CLK_PWM1>;
  443. clock-names = "ipg", "per";
  444. #pwm-cells = <2>;
  445. };
  446. pwm2: pwm@02084000 {
  447. compatible = "fsl,imx6sx-pwm", "fsl,imx27-pwm";
  448. reg = <0x02084000 0x4000>;
  449. interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
  450. clocks = <&clks IMX6SX_CLK_PWM2>,
  451. <&clks IMX6SX_CLK_PWM2>;
  452. clock-names = "ipg", "per";
  453. #pwm-cells = <2>;
  454. };
  455. pwm3: pwm@02088000 {
  456. compatible = "fsl,imx6sx-pwm", "fsl,imx27-pwm";
  457. reg = <0x02088000 0x4000>;
  458. interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
  459. clocks = <&clks IMX6SX_CLK_PWM3>,
  460. <&clks IMX6SX_CLK_PWM3>;
  461. clock-names = "ipg", "per";
  462. #pwm-cells = <2>;
  463. };
  464. pwm4: pwm@0208c000 {
  465. compatible = "fsl,imx6sx-pwm", "fsl,imx27-pwm";
  466. reg = <0x0208c000 0x4000>;
  467. interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
  468. clocks = <&clks IMX6SX_CLK_PWM4>,
  469. <&clks IMX6SX_CLK_PWM4>;
  470. clock-names = "ipg", "per";
  471. #pwm-cells = <2>;
  472. };
  473. flexcan1: can@02090000 {
  474. compatible = "fsl,imx6sx-flexcan", "fsl,imx6q-flexcan";
  475. reg = <0x02090000 0x4000>;
  476. interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
  477. clocks = <&clks IMX6SX_CLK_CAN1_IPG>,
  478. <&clks IMX6SX_CLK_CAN1_SERIAL>;
  479. clock-names = "ipg", "per";
  480. stop-mode = <&gpr 0x10 1 0x10 17>;
  481. status = "disabled";
  482. };
  483. flexcan2: can@02094000 {
  484. compatible = "fsl,imx6sx-flexcan", "fsl,imx6q-flexcan";
  485. reg = <0x02094000 0x4000>;
  486. interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
  487. clocks = <&clks IMX6SX_CLK_CAN2_IPG>,
  488. <&clks IMX6SX_CLK_CAN2_SERIAL>;
  489. clock-names = "ipg", "per";
  490. stop-mode = <&gpr 0x10 2 0x10 18>;
  491. status = "disabled";
  492. };
  493. gpt: gpt@02098000 {
  494. compatible = "fsl,imx6sx-gpt", "fsl,imx31-gpt";
  495. reg = <0x02098000 0x4000>;
  496. interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
  497. clocks = <&clks IMX6SX_CLK_GPT_BUS>,
  498. <&clks IMX6SX_CLK_GPT_3M>;
  499. clock-names = "ipg", "per";
  500. };
  501. gpio1: gpio@0209c000 {
  502. compatible = "fsl,imx6sx-gpio", "fsl,imx35-gpio";
  503. reg = <0x0209c000 0x4000>;
  504. interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>,
  505. <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
  506. gpio-controller;
  507. #gpio-cells = <2>;
  508. interrupt-controller;
  509. #interrupt-cells = <2>;
  510. };
  511. gpio2: gpio@020a0000 {
  512. compatible = "fsl,imx6sx-gpio", "fsl,imx35-gpio";
  513. reg = <0x020a0000 0x4000>;
  514. interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
  515. <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
  516. gpio-controller;
  517. #gpio-cells = <2>;
  518. interrupt-controller;
  519. #interrupt-cells = <2>;
  520. };
  521. gpio3: gpio@020a4000 {
  522. compatible = "fsl,imx6sx-gpio", "fsl,imx35-gpio";
  523. reg = <0x020a4000 0x4000>;
  524. interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
  525. <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
  526. gpio-controller;
  527. #gpio-cells = <2>;
  528. interrupt-controller;
  529. #interrupt-cells = <2>;
  530. };
  531. gpio4: gpio@020a8000 {
  532. compatible = "fsl,imx6sx-gpio", "fsl,imx35-gpio";
  533. reg = <0x020a8000 0x4000>;
  534. interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>,
  535. <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
  536. gpio-controller;
  537. #gpio-cells = <2>;
  538. interrupt-controller;
  539. #interrupt-cells = <2>;
  540. };
  541. gpio5: gpio@020ac000 {
  542. compatible = "fsl,imx6sx-gpio", "fsl,imx35-gpio";
  543. reg = <0x020ac000 0x4000>;
  544. interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>,
  545. <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
  546. gpio-controller;
  547. #gpio-cells = <2>;
  548. interrupt-controller;
  549. #interrupt-cells = <2>;
  550. };
  551. gpio6: gpio@020b0000 {
  552. compatible = "fsl,imx6sx-gpio", "fsl,imx35-gpio";
  553. reg = <0x020b0000 0x4000>;
  554. interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>,
  555. <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
  556. gpio-controller;
  557. #gpio-cells = <2>;
  558. interrupt-controller;
  559. #interrupt-cells = <2>;
  560. };
  561. gpio7: gpio@020b4000 {
  562. compatible = "fsl,imx6sx-gpio", "fsl,imx35-gpio";
  563. reg = <0x020b4000 0x4000>;
  564. interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>,
  565. <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
  566. gpio-controller;
  567. #gpio-cells = <2>;
  568. interrupt-controller;
  569. #interrupt-cells = <2>;
  570. };
  571. mqs: mqs {
  572. compatible = "fsl,imx6sx-mqs";
  573. gpr = <&gpr>;
  574. status = "disabled";
  575. };
  576. kpp: kpp@020b8000 {
  577. compatible = "fsl,imx6sx-kpp", "fsl,imx21-kpp";
  578. reg = <0x020b8000 0x4000>;
  579. interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
  580. clocks = <&clks IMX6SX_CLK_DUMMY>;
  581. status = "disabled";
  582. };
  583. wdog1: wdog@020bc000 {
  584. compatible = "fsl,imx6sx-wdt", "fsl,imx21-wdt";
  585. reg = <0x020bc000 0x4000>;
  586. interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
  587. clocks = <&clks IMX6SX_CLK_DUMMY>;
  588. };
  589. wdog2: wdog@020c0000 {
  590. compatible = "fsl,imx6sx-wdt", "fsl,imx21-wdt";
  591. reg = <0x020c0000 0x4000>;
  592. interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
  593. clocks = <&clks IMX6SX_CLK_DUMMY>;
  594. status = "disabled";
  595. };
  596. clks: ccm@020c4000 {
  597. compatible = "fsl,imx6sx-ccm";
  598. reg = <0x020c4000 0x4000>;
  599. interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>,
  600. <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
  601. #clock-cells = <1>;
  602. clocks = <&ckil>, <&osc>, <&ipp_di0>, <&ipp_di1>;
  603. clock-names = "ckil", "osc", "ipp_di0", "ipp_di1";
  604. };
  605. anatop: anatop@020c8000 {
  606. compatible = "fsl,imx6sx-anatop", "fsl,imx6q-anatop",
  607. "syscon", "simple-bus";
  608. reg = <0x020c8000 0x1000>;
  609. interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>,
  610. <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>,
  611. <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
  612. regulator-1p1@110 {
  613. compatible = "fsl,anatop-regulator";
  614. regulator-name = "vdd1p1";
  615. regulator-min-microvolt = <800000>;
  616. regulator-max-microvolt = <1375000>;
  617. regulator-always-on;
  618. anatop-reg-offset = <0x110>;
  619. anatop-vol-bit-shift = <8>;
  620. anatop-vol-bit-width = <5>;
  621. anatop-min-bit-val = <4>;
  622. anatop-min-voltage = <800000>;
  623. anatop-max-voltage = <1375000>;
  624. anatop-enable-bit = <0>;
  625. };
  626. reg_3p0: regulator-3p0@120 {
  627. compatible = "fsl,anatop-regulator";
  628. regulator-name = "vdd3p0";
  629. regulator-min-microvolt = <2625000>;
  630. regulator-max-microvolt = <3400000>;
  631. anatop-reg-offset = <0x120>;
  632. anatop-vol-bit-shift = <8>;
  633. anatop-vol-bit-width = <5>;
  634. anatop-min-bit-val = <0>;
  635. anatop-min-voltage = <2625000>;
  636. anatop-max-voltage = <3400000>;
  637. anatop-enable-bit = <0>;
  638. };
  639. regulator-2p5@130 {
  640. compatible = "fsl,anatop-regulator";
  641. regulator-name = "vdd2p5";
  642. regulator-min-microvolt = <2100000>;
  643. regulator-max-microvolt = <2875000>;
  644. regulator-always-on;
  645. anatop-reg-offset = <0x130>;
  646. anatop-vol-bit-shift = <8>;
  647. anatop-vol-bit-width = <5>;
  648. anatop-min-bit-val = <0>;
  649. anatop-min-voltage = <2100000>;
  650. anatop-max-voltage = <2875000>;
  651. anatop-enable-bit = <0>;
  652. };
  653. reg_arm: regulator-vddcore@140 {
  654. compatible = "fsl,anatop-regulator";
  655. regulator-name = "vddarm";
  656. regulator-min-microvolt = <725000>;
  657. regulator-max-microvolt = <1450000>;
  658. regulator-always-on;
  659. anatop-reg-offset = <0x140>;
  660. anatop-vol-bit-shift = <0>;
  661. anatop-vol-bit-width = <5>;
  662. anatop-delay-reg-offset = <0x170>;
  663. anatop-delay-bit-shift = <24>;
  664. anatop-delay-bit-width = <2>;
  665. anatop-min-bit-val = <1>;
  666. anatop-min-voltage = <725000>;
  667. anatop-max-voltage = <1450000>;
  668. };
  669. reg_pcie_phy: regulator-vddpcie-phy@140 {
  670. compatible = "fsl,anatop-regulator";
  671. regulator-name = "vddpcie-phy";
  672. regulator-min-microvolt = <725000>;
  673. regulator-max-microvolt = <1450000>;
  674. anatop-reg-offset = <0x140>;
  675. anatop-vol-bit-shift = <9>;
  676. anatop-vol-bit-width = <5>;
  677. anatop-delay-reg-offset = <0x170>;
  678. anatop-delay-bit-shift = <26>;
  679. anatop-delay-bit-width = <2>;
  680. anatop-min-bit-val = <1>;
  681. anatop-min-voltage = <725000>;
  682. anatop-max-voltage = <1450000>;
  683. };
  684. reg_soc: regulator-vddsoc@140 {
  685. compatible = "fsl,anatop-regulator";
  686. regulator-name = "vddsoc";
  687. regulator-min-microvolt = <725000>;
  688. regulator-max-microvolt = <1450000>;
  689. regulator-always-on;
  690. anatop-reg-offset = <0x140>;
  691. anatop-vol-bit-shift = <18>;
  692. anatop-vol-bit-width = <5>;
  693. anatop-delay-reg-offset = <0x170>;
  694. anatop-delay-bit-shift = <28>;
  695. anatop-delay-bit-width = <2>;
  696. anatop-min-bit-val = <1>;
  697. anatop-min-voltage = <725000>;
  698. anatop-max-voltage = <1450000>;
  699. };
  700. };
  701. tempmon: tempmon {
  702. compatible = "fsl,imx6sx-tempmon", "fsl,imx6q-tempmon";
  703. interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
  704. fsl,tempmon = <&anatop>;
  705. fsl,tempmon-data = <&ocotp>;
  706. clocks = <&clks IMX6SX_CLK_PLL3_USB_OTG>;
  707. };
  708. usbphy1: usbphy@020c9000 {
  709. compatible = "fsl,imx6sx-usbphy", "fsl,imx23-usbphy";
  710. reg = <0x020c9000 0x1000>;
  711. interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
  712. clocks = <&clks IMX6SX_CLK_USBPHY1>;
  713. phy-3p0-supply = <&reg_3p0>;
  714. fsl,anatop = <&anatop>;
  715. };
  716. usbphy2: usbphy@020ca000 {
  717. compatible = "fsl,imx6sx-usbphy", "fsl,imx23-usbphy";
  718. reg = <0x020ca000 0x1000>;
  719. interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
  720. clocks = <&clks IMX6SX_CLK_USBPHY2>;
  721. phy-3p0-supply = <&reg_3p0>;
  722. fsl,anatop = <&anatop>;
  723. };
  724. usbphy_nop1: usbphy_nop1 {
  725. compatible = "usb-nop-xceiv";
  726. clocks = <&clks IMX6SX_CLK_USBPHY1>;
  727. clock-names = "main_clk";
  728. };
  729. caam_snvs: caam-snvs@020cc000 {
  730. compatible = "fsl,imx6q-caam-snvs";
  731. reg = <0x020cc000 0x4000>;
  732. };
  733. snvs: snvs@020cc000 {
  734. compatible = "fsl,sec-v4.0-mon", "syscon", "simple-mfd";
  735. reg = <0x020cc000 0x4000>;
  736. snvs_rtc: snvs-rtc-lp {
  737. compatible = "fsl,sec-v4.0-mon-rtc-lp";
  738. regmap = <&snvs>;
  739. offset = <0x34>;
  740. interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
  741. };
  742. snvs_poweroff: snvs-poweroff {
  743. compatible = "syscon-poweroff";
  744. regmap = <&snvs>;
  745. offset = <0x38>;
  746. mask = <0x61>;
  747. status = "disabled";
  748. };
  749. snvs_pwrkey: snvs-powerkey {
  750. compatible = "fsl,sec-v4.0-pwrkey";
  751. regmap = <&snvs>;
  752. interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
  753. linux,keycode = <KEY_POWER>;
  754. wakeup;
  755. };
  756. };
  757. epit1: epit@020d0000 {
  758. reg = <0x020d0000 0x4000>;
  759. interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
  760. };
  761. epit2: epit@020d4000 {
  762. reg = <0x020d4000 0x4000>;
  763. interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
  764. };
  765. src: src@020d8000 {
  766. compatible = "fsl,imx6sx-src", "fsl,imx51-src";
  767. reg = <0x020d8000 0x4000>;
  768. interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>,
  769. <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
  770. #reset-cells = <1>;
  771. };
  772. gpc: gpc@020dc000 {
  773. compatible = "fsl,imx6sx-gpc", "fsl,imx6q-gpc";
  774. reg = <0x020dc000 0x4000>;
  775. interrupt-controller;
  776. #interrupt-cells = <3>;
  777. interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
  778. interrupt-parent = <&intc>;
  779. fsl,mf-mix-wakeup-irq = <0x7c00000 0x3d00 0x0 0x400240>;
  780. clocks = <&clks IMX6SX_CLK_GPU>, <&clks IMX6SX_CLK_IPG>,
  781. <&clks IMX6SX_CLK_PXP_AXI>, <&clks IMX6SX_CLK_DISPLAY_AXI>,
  782. <&clks IMX6SX_CLK_LCDIF1_PIX>, <&clks IMX6SX_CLK_LCDIF_APB>,
  783. <&clks IMX6SX_CLK_LCDIF2_PIX>, <&clks IMX6SX_CLK_CSI>,
  784. <&clks IMX6SX_CLK_VADC>;
  785. clock-names = "gpu3d_core", "ipg", "pxp_axi", "disp_axi", "lcdif1_pix",
  786. "lcdif_axi", "lcdif2_pix", "csi_mclk";
  787. pcie-phy-supply = <&reg_pcie_phy>;
  788. #power-domain-cells = <1>;
  789. };
  790. iomuxc: iomuxc@020e0000 {
  791. compatible = "fsl,imx6sx-iomuxc";
  792. reg = <0x020e0000 0x4000>;
  793. };
  794. gpr: iomuxc-gpr@020e4000 {
  795. compatible = "fsl,imx6sx-iomuxc-gpr",
  796. "fsl,imx6q-iomuxc-gpr", "syscon";
  797. reg = <0x020e4000 0x4000>;
  798. };
  799. ldb: ldb@020e0014 {
  800. #address-cells = <1>;
  801. #size-cells = <0>;
  802. compatible = "fsl,imx6sx-ldb", "fsl,imx53-ldb";
  803. gpr = <&gpr>;
  804. status = "disabled";
  805. clocks = <&clks IMX6SX_CLK_LDB_DI0>,
  806. <&clks IMX6SX_CLK_LCDIF1_SEL>,
  807. <&clks IMX6SX_CLK_LCDIF2_SEL>,
  808. <&clks IMX6SX_CLK_LDB_DI0_DIV_3_5>,
  809. <&clks IMX6SX_CLK_LDB_DI0_DIV_7>,
  810. <&clks IMX6SX_CLK_LDB_DI0_DIV_SEL>;
  811. clock-names = "ldb_di0",
  812. "di0_sel",
  813. "di1_sel",
  814. "ldb_di0_div_3_5",
  815. "ldb_di0_div_7",
  816. "ldb_di0_div_sel";
  817. lvds-channel@0 {
  818. reg = <0>;
  819. status = "disabled";
  820. };
  821. };
  822. sdma: sdma@020ec000 {
  823. compatible = "fsl,imx6sx-sdma", "fsl,imx35-sdma";
  824. reg = <0x020ec000 0x4000>;
  825. interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
  826. clocks = <&clks IMX6SX_CLK_SDMA>,
  827. <&clks IMX6SX_CLK_SDMA>;
  828. clock-names = "ipg", "ahb";
  829. #dma-cells = <3>;
  830. /* imx6sx reuses imx6q sdma firmware */
  831. fsl,sdma-ram-script-name = "imx/sdma/sdma-imx6q.bin";
  832. };
  833. };
  834. aips2: aips-bus@02100000 {
  835. compatible = "fsl,aips-bus", "simple-bus";
  836. #address-cells = <1>;
  837. #size-cells = <1>;
  838. reg = <0x02100000 0x100000>;
  839. ranges;
  840. crypto: caam@2100000 {
  841. compatible = "fsl,sec-v4.0";
  842. #address-cells = <1>;
  843. #size-cells = <1>;
  844. reg = <0x2100000 0x40000>;
  845. ranges = <0 0x2100000 0x40000>;
  846. clocks = <&clks IMX6SX_CLK_CAAM_MEM>, <&clks IMX6SX_CLK_CAAM_ACLK>,
  847. <&clks IMX6SX_CLK_CAAM_IPG> ,<&clks IMX6SX_CLK_EIM_SLOW>;
  848. clock-names = "caam_mem", "caam_aclk", "caam_ipg", "caam_emi_slow";
  849. sec_jr0: jr0@1000 {
  850. compatible = "fsl,sec-v4.0-job-ring";
  851. reg = <0x1000 0x1000>;
  852. interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
  853. };
  854. sec_jr1: jr1@2000 {
  855. compatible = "fsl,sec-v4.0-job-ring";
  856. reg = <0x2000 0x1000>;
  857. interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
  858. };
  859. };
  860. usbotg1: usb@02184000 {
  861. compatible = "fsl,imx6sx-usb", "fsl,imx27-usb";
  862. reg = <0x02184000 0x200>;
  863. interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
  864. clocks = <&clks IMX6SX_CLK_USBOH3>;
  865. fsl,usbphy = <&usbphy1>;
  866. fsl,usbmisc = <&usbmisc 0>;
  867. fsl,anatop = <&anatop>;
  868. ahb-burst-config = <0x0>;
  869. tx-burst-size-dword = <0x10>;
  870. rx-burst-size-dword = <0x10>;
  871. status = "disabled";
  872. };
  873. usbotg2: usb@02184200 {
  874. compatible = "fsl,imx6sx-usb", "fsl,imx27-usb";
  875. reg = <0x02184200 0x200>;
  876. interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
  877. clocks = <&clks IMX6SX_CLK_USBOH3>;
  878. fsl,usbphy = <&usbphy2>;
  879. fsl,usbmisc = <&usbmisc 1>;
  880. ahb-burst-config = <0x0>;
  881. tx-burst-size-dword = <0x10>;
  882. rx-burst-size-dword = <0x10>;
  883. status = "disabled";
  884. };
  885. usbh: usb@02184400 {
  886. compatible = "fsl,imx6sx-usb", "fsl,imx27-usb";
  887. reg = <0x02184400 0x200>;
  888. interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
  889. clocks = <&clks IMX6SX_CLK_USBOH3>;
  890. fsl,usbmisc = <&usbmisc 2>;
  891. phy_type = "hsic";
  892. fsl,usbphy = <&usbphy_nop1>;
  893. fsl,anatop = <&anatop>;
  894. dr_mode = "host";
  895. ahb-burst-config = <0x0>;
  896. tx-burst-size-dword = <0x10>;
  897. rx-burst-size-dword = <0x10>;
  898. status = "disabled";
  899. };
  900. usbmisc: usbmisc@02184800 {
  901. #index-cells = <1>;
  902. compatible = "fsl,imx6sx-usbmisc", "fsl,imx6q-usbmisc";
  903. reg = <0x02184800 0x200>;
  904. clocks = <&clks IMX6SX_CLK_USBOH3>;
  905. };
  906. fec1: ethernet@02188000 {
  907. compatible = "fsl,imx6sx-fec", "fsl,imx6q-fec";
  908. reg = <0x02188000 0x4000>;
  909. interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
  910. <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
  911. clocks = <&clks IMX6SX_CLK_ENET>,
  912. <&clks IMX6SX_CLK_ENET_AHB>,
  913. <&clks IMX6SX_CLK_ENET_PTP>,
  914. <&clks IMX6SX_CLK_ENET_REF>,
  915. <&clks IMX6SX_CLK_ENET_PTP>;
  916. clock-names = "ipg", "ahb", "ptp",
  917. "enet_clk_ref", "enet_out";
  918. fsl,num-tx-queues=<3>;
  919. fsl,num-rx-queues=<3>;
  920. stop-mode = <&gpr 0x10 3>;
  921. fsl,wakeup_irq = <0>;
  922. status = "disabled";
  923. };
  924. mlb: mlb@0218c000 {
  925. compatible = "fsl,imx6sx-mlb50";
  926. reg = <0x0218c000 0x4000>;
  927. interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>,
  928. <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
  929. <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
  930. clocks = <&clks IMX6SX_CLK_MLB>;
  931. clock-names = "mlb";
  932. iram = <&ocram>;
  933. status = "disabled";
  934. };
  935. usdhc1: usdhc@02190000 {
  936. compatible = "fsl,imx6sx-usdhc", "fsl,imx6sl-usdhc";
  937. reg = <0x02190000 0x4000>;
  938. interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
  939. clocks = <&clks IMX6SX_CLK_USDHC1>,
  940. <&clks IMX6SX_CLK_USDHC1>,
  941. <&clks IMX6SX_CLK_USDHC1>;
  942. clock-names = "ipg", "ahb", "per";
  943. bus-width = <4>;
  944. status = "disabled";
  945. };
  946. usdhc2: usdhc@02194000 {
  947. compatible = "fsl,imx6sx-usdhc", "fsl,imx6sl-usdhc";
  948. reg = <0x02194000 0x4000>;
  949. interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
  950. clocks = <&clks IMX6SX_CLK_USDHC2>,
  951. <&clks IMX6SX_CLK_USDHC2>,
  952. <&clks IMX6SX_CLK_USDHC2>;
  953. clock-names = "ipg", "ahb", "per";
  954. bus-width = <4>;
  955. status = "disabled";
  956. };
  957. usdhc3: usdhc@02198000 {
  958. compatible = "fsl,imx6sx-usdhc", "fsl,imx6sl-usdhc";
  959. reg = <0x02198000 0x4000>;
  960. interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
  961. clocks = <&clks IMX6SX_CLK_USDHC3>,
  962. <&clks IMX6SX_CLK_USDHC3>,
  963. <&clks IMX6SX_CLK_USDHC3>;
  964. clock-names = "ipg", "ahb", "per";
  965. bus-width = <4>;
  966. status = "disabled";
  967. };
  968. usdhc4: usdhc@0219c000 {
  969. compatible = "fsl,imx6sx-usdhc", "fsl,imx6sl-usdhc";
  970. reg = <0x0219c000 0x4000>;
  971. interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
  972. clocks = <&clks IMX6SX_CLK_USDHC4>,
  973. <&clks IMX6SX_CLK_USDHC4>,
  974. <&clks IMX6SX_CLK_USDHC4>;
  975. clock-names = "ipg", "ahb", "per";
  976. bus-width = <4>;
  977. status = "disabled";
  978. };
  979. i2c1: i2c@021a0000 {
  980. #address-cells = <1>;
  981. #size-cells = <0>;
  982. compatible = "fsl,imx6sx-i2c", "fsl,imx21-i2c";
  983. reg = <0x021a0000 0x4000>;
  984. interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
  985. clocks = <&clks IMX6SX_CLK_I2C1>;
  986. status = "disabled";
  987. };
  988. i2c2: i2c@021a4000 {
  989. #address-cells = <1>;
  990. #size-cells = <0>;
  991. compatible = "fsl,imx6sx-i2c", "fsl,imx21-i2c";
  992. reg = <0x021a4000 0x4000>;
  993. interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
  994. clocks = <&clks IMX6SX_CLK_I2C2>;
  995. status = "disabled";
  996. };
  997. i2c3: i2c@021a8000 {
  998. #address-cells = <1>;
  999. #size-cells = <0>;
  1000. compatible = "fsl,imx6sx-i2c", "fsl,imx21-i2c";
  1001. reg = <0x021a8000 0x4000>;
  1002. interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
  1003. clocks = <&clks IMX6SX_CLK_I2C3>;
  1004. status = "disabled";
  1005. };
  1006. mmdc: mmdc@021b0000 {
  1007. compatible = "fsl,imx6sx-mmdc", "fsl,imx6q-mmdc";
  1008. reg = <0x021b0000 0x4000>;
  1009. };
  1010. fec2: ethernet@021b4000 {
  1011. compatible = "fsl,imx6sx-fec", "fsl,imx6q-fec";
  1012. reg = <0x021b4000 0x4000>;
  1013. interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
  1014. <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
  1015. clocks = <&clks IMX6SX_CLK_ENET>,
  1016. <&clks IMX6SX_CLK_ENET_AHB>,
  1017. <&clks IMX6SX_CLK_ENET_PTP>,
  1018. <&clks IMX6SX_CLK_ENET2_REF_125M>,
  1019. <&clks IMX6SX_CLK_ENET_PTP>;
  1020. clock-names = "ipg", "ahb", "ptp",
  1021. "enet_clk_ref", "enet_out";
  1022. fsl,num-tx-queues=<3>;
  1023. fsl,num-rx-queues=<3>;
  1024. stop-mode = <&gpr 0x10 4>;
  1025. fsl,wakeup_irq = <0>;
  1026. status = "disabled";
  1027. };
  1028. weim: weim@021b8000 {
  1029. compatible = "fsl,imx6sx-weim", "fsl,imx6q-weim";
  1030. reg = <0x021b8000 0x4000>;
  1031. interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
  1032. clocks = <&clks IMX6SX_CLK_EIM_SLOW>;
  1033. };
  1034. ocotp: ocotp@021bc000 {
  1035. compatible = "fsl,imx6sx-ocotp", "fsl,imx6q-ocotp", "syscon";
  1036. reg = <0x021bc000 0x4000>;
  1037. clocks = <&clks IMX6SX_CLK_OCOTP>;
  1038. };
  1039. romcp@021ac000 {
  1040. compatible = "fsl,imx6sx-romcp", "syscon";
  1041. reg = <0x021ac000 0x4000>;
  1042. };
  1043. sai1: sai@021d4000 {
  1044. compatible = "fsl,imx6sx-sai";
  1045. reg = <0x021d4000 0x4000>;
  1046. interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>;
  1047. clocks = <&clks IMX6SX_CLK_SAI1_IPG>,
  1048. <&clks IMX6SX_CLK_DUMMY>,
  1049. <&clks IMX6SX_CLK_SAI1>,
  1050. <&clks 0>, <&clks 0>;
  1051. clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3";
  1052. dma-names = "rx", "tx";
  1053. dmas = <&sdma 31 24 0>, <&sdma 32 24 0>;
  1054. dma-source = <&gpr 0 15 0 16>;
  1055. status = "disabled";
  1056. };
  1057. audmux: audmux@021d8000 {
  1058. compatible = "fsl,imx6sx-audmux", "fsl,imx31-audmux";
  1059. reg = <0x021d8000 0x4000>;
  1060. status = "disabled";
  1061. };
  1062. sai2: sai@021dc000 {
  1063. compatible = "fsl,imx6sx-sai";
  1064. reg = <0x021dc000 0x4000>;
  1065. interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
  1066. clocks = <&clks IMX6SX_CLK_SAI2_IPG>,
  1067. <&clks IMX6SX_CLK_DUMMY>,
  1068. <&clks IMX6SX_CLK_SAI2>,
  1069. <&clks 0>, <&clks 0>;
  1070. clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3";
  1071. dma-names = "rx", "tx";
  1072. dmas = <&sdma 33 23 0>, <&sdma 34 23 0>;
  1073. dma-source = <&gpr 0 17 0 18>;
  1074. status = "disabled";
  1075. };
  1076. qspi1: qspi@021e0000 {
  1077. #address-cells = <1>;
  1078. #size-cells = <0>;
  1079. compatible = "fsl,imx6sx-qspi";
  1080. reg = <0x021e0000 0x4000>, <0x60000000 0x10000000>;
  1081. reg-names = "QuadSPI", "QuadSPI-memory";
  1082. interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
  1083. clocks = <&clks IMX6SX_CLK_QSPI1>,
  1084. <&clks IMX6SX_CLK_QSPI1>;
  1085. clock-names = "qspi_en", "qspi";
  1086. status = "disabled";
  1087. };
  1088. qspi2: qspi@021e4000 {
  1089. #address-cells = <1>;
  1090. #size-cells = <0>;
  1091. compatible = "fsl,imx6sx-qspi";
  1092. reg = <0x021e4000 0x4000>, <0x70000000 0x10000000>;
  1093. reg-names = "QuadSPI", "QuadSPI-memory";
  1094. interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
  1095. clocks = <&clks IMX6SX_CLK_QSPI2>,
  1096. <&clks IMX6SX_CLK_QSPI2>;
  1097. clock-names = "qspi_en", "qspi";
  1098. status = "disabled";
  1099. };
  1100. qspi_m4: qspi-m4 {
  1101. compatible = "fsl,imx6sx-qspi-m4-restore";
  1102. reg = <0x021e4000 0x4000>;
  1103. status = "disabled";
  1104. };
  1105. uart2: serial@021e8000 {
  1106. compatible = "fsl,imx6sx-uart",
  1107. "fsl,imx6q-uart", "fsl,imx21-uart";
  1108. reg = <0x021e8000 0x4000>;
  1109. interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
  1110. clocks = <&clks IMX6SX_CLK_UART_IPG>,
  1111. <&clks IMX6SX_CLK_UART_SERIAL>;
  1112. clock-names = "ipg", "per";
  1113. dmas = <&sdma 27 4 0>, <&sdma 28 4 0>;
  1114. dma-names = "rx", "tx";
  1115. status = "disabled";
  1116. };
  1117. uart3: serial@021ec000 {
  1118. compatible = "fsl,imx6sx-uart",
  1119. "fsl,imx6q-uart", "fsl,imx21-uart";
  1120. reg = <0x021ec000 0x4000>;
  1121. interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
  1122. clocks = <&clks IMX6SX_CLK_UART_IPG>,
  1123. <&clks IMX6SX_CLK_UART_SERIAL>;
  1124. clock-names = "ipg", "per";
  1125. dmas = <&sdma 29 4 0>, <&sdma 30 4 0>;
  1126. dma-names = "rx", "tx";
  1127. status = "disabled";
  1128. };
  1129. uart4: serial@021f0000 {
  1130. compatible = "fsl,imx6sx-uart",
  1131. "fsl,imx6q-uart", "fsl,imx21-uart";
  1132. reg = <0x021f0000 0x4000>;
  1133. interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
  1134. clocks = <&clks IMX6SX_CLK_UART_IPG>,
  1135. <&clks IMX6SX_CLK_UART_SERIAL>;
  1136. clock-names = "ipg", "per";
  1137. dmas = <&sdma 31 4 0>, <&sdma 32 4 0>;
  1138. dma-names = "rx", "tx";
  1139. status = "disabled";
  1140. };
  1141. uart5: serial@021f4000 {
  1142. compatible = "fsl,imx6sx-uart",
  1143. "fsl,imx6q-uart", "fsl,imx21-uart";
  1144. reg = <0x021f4000 0x4000>;
  1145. interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
  1146. clocks = <&clks IMX6SX_CLK_UART_IPG>,
  1147. <&clks IMX6SX_CLK_UART_SERIAL>;
  1148. clock-names = "ipg", "per";
  1149. dmas = <&sdma 33 4 0>, <&sdma 34 4 0>;
  1150. dma-names = "rx", "tx";
  1151. status = "disabled";
  1152. };
  1153. i2c4: i2c@021f8000 {
  1154. #address-cells = <1>;
  1155. #size-cells = <0>;
  1156. compatible = "fsl,imx6sx-i2c", "fsl,imx21-i2c";
  1157. reg = <0x021f8000 0x4000>;
  1158. interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
  1159. clocks = <&clks IMX6SX_CLK_I2C4>;
  1160. status = "disabled";
  1161. };
  1162. qosc: qosc@021fc000 {
  1163. compatible = "fsl,imx6sx-qosc";
  1164. reg = <0x021fc000 0x4000>;
  1165. };
  1166. };
  1167. aips3: aips-bus@02200000 {
  1168. compatible = "fsl,aips-bus", "simple-bus";
  1169. #address-cells = <1>;
  1170. #size-cells = <1>;
  1171. reg = <0x02200000 0x100000>;
  1172. ranges;
  1173. spba-bus@02200000 {
  1174. compatible = "fsl,spba-bus", "simple-bus";
  1175. #address-cells = <1>;
  1176. #size-cells = <1>;
  1177. reg = <0x02240000 0x40000>;
  1178. ranges;
  1179. csi1: csi@02214000 {
  1180. compatible = "fsl,imx6s-csi";
  1181. reg = <0x02214000 0x4000>;
  1182. interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
  1183. clocks = <&clks IMX6SX_CLK_DISPLAY_AXI>,
  1184. <&clks IMX6SX_CLK_CSI>,
  1185. <&clks IMX6SX_CLK_DCIC1>;
  1186. clock-names = "disp-axi", "csi_mclk", "disp_dcic";
  1187. power-domains = <&gpc 2>;
  1188. status = "disabled";
  1189. };
  1190. dcic1: dcic@0220c000 {
  1191. compatible = "fsl,imx6sx-dcic";
  1192. reg = <0x0220c000 0x4000>;
  1193. interrupts = <0 124 IRQ_TYPE_LEVEL_HIGH>;
  1194. clocks = <&clks IMX6SX_CLK_DCIC1>,
  1195. <&clks IMX6SX_CLK_DISPLAY_AXI>;
  1196. clock-names = "dcic", "disp-axi";
  1197. gpr = <&gpr>;
  1198. status = "disabled";
  1199. };
  1200. dcic2: dcic@02210000 {
  1201. compatible = "fsl,imx6sx-dcic";
  1202. reg = <0x02210000 0x4000>;
  1203. interrupts = <0 125 IRQ_TYPE_LEVEL_HIGH>;
  1204. clocks = <&clks IMX6SX_CLK_DCIC2>,
  1205. <&clks IMX6SX_CLK_DISPLAY_AXI>;
  1206. clock-names = "dcic", "disp-axi";
  1207. gpr = <&gpr>;
  1208. status = "disabled";
  1209. };
  1210. pxp: pxp@02218000 {
  1211. compatible = "fsl,imx6sx-pxp-dma", "fsl,imx6sl-pxp-dma", "fsl,imx6dl-pxp-dma";
  1212. reg = <0x02218000 0x4000>;
  1213. interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
  1214. clocks = <&clks IMX6SX_CLK_PXP_AXI>,
  1215. <&clks IMX6SX_CLK_DISPLAY_AXI>;
  1216. clock-names = "pxp-axi", "disp-axi";
  1217. power-domains = <&gpc 2>;
  1218. status = "disabled";
  1219. };
  1220. csi2: csi@0221c000 {
  1221. compatible = "fsl,imx6s-csi";
  1222. reg = <0x0221c000 0x4000>;
  1223. interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
  1224. clocks = <&clks IMX6SX_CLK_DISPLAY_AXI>,
  1225. <&clks IMX6SX_CLK_CSI>,
  1226. <&clks IMX6SX_CLK_DCIC2>;
  1227. clock-names = "disp-axi", "csi_mclk", "disp_dcic";
  1228. power-domains = <&gpc 2>;
  1229. status = "disabled";
  1230. };
  1231. lcdif1: lcdif@02220000 {
  1232. compatible = "fsl,imx6sx-lcdif", "fsl,imx28-lcdif";
  1233. reg = <0x02220000 0x4000>;
  1234. interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
  1235. clocks = <&clks IMX6SX_CLK_LCDIF1_PIX>,
  1236. <&clks IMX6SX_CLK_LCDIF_APB>,
  1237. <&clks IMX6SX_CLK_DISPLAY_AXI>;
  1238. clock-names = "pix", "axi", "disp_axi";
  1239. power-domains = <&gpc 2>;
  1240. status = "disabled";
  1241. };
  1242. lcdif2: lcdif@02224000 {
  1243. compatible = "fsl,imx6sx-lcdif", "fsl,imx28-lcdif";
  1244. reg = <0x02224000 0x4000>;
  1245. interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
  1246. clocks = <&clks IMX6SX_CLK_LCDIF2_PIX>,
  1247. <&clks IMX6SX_CLK_LCDIF_APB>,
  1248. <&clks IMX6SX_CLK_DISPLAY_AXI>;
  1249. clock-names = "pix", "axi", "disp_axi";
  1250. power-domains = <&gpc 2>;
  1251. status = "disabled";
  1252. };
  1253. vadc: vadc@02228000 {
  1254. compatible = "fsl,imx6sx-vadc";
  1255. reg = <0x02228000 0x4000>, <0x0222c000 0x4000>;
  1256. reg-names = "vadc-vafe", "vadc-vdec";
  1257. clocks = <&clks IMX6SX_CLK_VADC>,
  1258. <&clks IMX6SX_CLK_CSI>;
  1259. clock-names = "vadc", "csi";
  1260. power-domains = <&gpc 2>;
  1261. gpr = <&gpr>;
  1262. status = "disabled";
  1263. };
  1264. };
  1265. adc1: adc@02280000 {
  1266. compatible = "fsl,imx6sx-adc", "fsl,vf610-adc";
  1267. reg = <0x02280000 0x4000>;
  1268. interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
  1269. clocks = <&clks IMX6SX_CLK_IPG>;
  1270. num-channels = <4>;
  1271. clock-names = "adc";
  1272. status = "disabled";
  1273. };
  1274. adc2: adc@02284000 {
  1275. compatible = "fsl,imx6sx-adc", "fsl,vf610-adc";
  1276. reg = <0x02284000 0x4000>;
  1277. interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
  1278. clocks = <&clks IMX6SX_CLK_IPG>;
  1279. num-channels = <4>;
  1280. clock-names = "adc";
  1281. status = "disabled";
  1282. };
  1283. wdog3: wdog@02288000 {
  1284. compatible = "fsl,imx6sx-wdt", "fsl,imx21-wdt";
  1285. reg = <0x02288000 0x4000>;
  1286. interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
  1287. clocks = <&clks IMX6SX_CLK_DUMMY>;
  1288. status = "disabled";
  1289. };
  1290. ecspi5: ecspi@0228c000 {
  1291. #address-cells = <1>;
  1292. #size-cells = <0>;
  1293. compatible = "fsl,imx6sx-ecspi", "fsl,imx51-ecspi";
  1294. reg = <0x0228c000 0x4000>;
  1295. interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
  1296. clocks = <&clks IMX6SX_CLK_ECSPI5>,
  1297. <&clks IMX6SX_CLK_ECSPI5>;
  1298. clock-names = "ipg", "per";
  1299. status = "disabled";
  1300. };
  1301. sema4: sema4@02290000 { /* sema4 */
  1302. compatible = "fsl,imx6sx-sema4";
  1303. reg = <0x02290000 0x4000>;
  1304. interrupts = <0 116 0x04>;
  1305. status = "okay";
  1306. };
  1307. mu: mu@02294000 { /* mu */
  1308. compatible = "fsl,imx6sx-mu";
  1309. reg = <0x02294000 0x4000>;
  1310. interrupts = <0 90 0x04>;
  1311. status = "okay";
  1312. };
  1313. rpmsg: rpmsg{
  1314. compatible = "fsl,imx6sx-rpmsg";
  1315. status = "disabled";
  1316. };
  1317. uart6: serial@022a0000 {
  1318. compatible = "fsl,imx6sx-uart",
  1319. "fsl,imx6q-uart", "fsl,imx21-uart";
  1320. reg = <0x022a0000 0x4000>;
  1321. interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
  1322. clocks = <&clks IMX6SX_CLK_UART_IPG>,
  1323. <&clks IMX6SX_CLK_UART_SERIAL>;
  1324. clock-names = "ipg", "per";
  1325. dmas = <&sdma 0 4 0>, <&sdma 47 4 0>;
  1326. dma-names = "rx", "tx";
  1327. status = "disabled";
  1328. };
  1329. pwm5: pwm@022a4000 {
  1330. compatible = "fsl,imx6sx-pwm", "fsl,imx27-pwm";
  1331. reg = <0x022a4000 0x4000>;
  1332. interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
  1333. clocks = <&clks IMX6SX_CLK_PWM5>,
  1334. <&clks IMX6SX_CLK_PWM5>;
  1335. clock-names = "ipg", "per";
  1336. #pwm-cells = <2>;
  1337. };
  1338. pwm6: pwm@022a8000 {
  1339. compatible = "fsl,imx6sx-pwm", "fsl,imx27-pwm";
  1340. reg = <0x022a8000 0x4000>;
  1341. interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
  1342. clocks = <&clks IMX6SX_CLK_PWM6>,
  1343. <&clks IMX6SX_CLK_PWM6>;
  1344. clock-names = "ipg", "per";
  1345. #pwm-cells = <2>;
  1346. };
  1347. pwm7: pwm@022ac000 {
  1348. compatible = "fsl,imx6sx-pwm", "fsl,imx27-pwm";
  1349. reg = <0x022ac000 0x4000>;
  1350. interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
  1351. clocks = <&clks IMX6SX_CLK_PWM7>,
  1352. <&clks IMX6SX_CLK_PWM7>;
  1353. clock-names = "ipg", "per";
  1354. #pwm-cells = <2>;
  1355. };
  1356. pwm8: pwm@0022b0000 {
  1357. compatible = "fsl,imx6sx-pwm", "fsl,imx27-pwm";
  1358. reg = <0x0022b0000 0x4000>;
  1359. interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
  1360. clocks = <&clks IMX6SX_CLK_PWM8>,
  1361. <&clks IMX6SX_CLK_PWM8>;
  1362. clock-names = "ipg", "per";
  1363. #pwm-cells = <2>;
  1364. };
  1365. };
  1366. pcie: pcie@0x08000000 {
  1367. compatible = "fsl,imx6sx-pcie", "snps,dw-pcie";
  1368. reg = <0x08ffc000 0x4000>, <0x08f00000 0x80000>;
  1369. reg-names = "dbi", "config";
  1370. #address-cells = <3>;
  1371. #size-cells = <2>;
  1372. device_type = "pci";
  1373. ranges = <0x81000000 0 0 0x08f80000 0 0x00010000 /* downstream I/O */
  1374. 0x82000000 0 0x08000000 0x08000000 0 0x00f00000>; /* non-prefetchable memory */
  1375. num-lanes = <1>;
  1376. interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
  1377. interrupt-names = "msi";
  1378. #interrupt-cells = <1>;
  1379. interrupt-map-mask = <0 0 0 0x7>;
  1380. interrupt-map = <0 0 0 1 &intc GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
  1381. <0 0 0 2 &intc GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
  1382. <0 0 0 3 &intc GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
  1383. <0 0 0 4 &intc GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
  1384. clocks = <&clks IMX6SX_CLK_PCIE_AXI>,
  1385. <&clks IMX6SX_CLK_LVDS1_OUT>,
  1386. <&clks IMX6SX_CLK_PCIE_REF_125M>,
  1387. <&clks IMX6SX_CLK_DISPLAY_AXI>;
  1388. clock-names = "pcie", "pcie_bus", "pcie_phy", "pcie_inbound_axi";
  1389. pcie-phy-supply = <&reg_pcie_phy>;
  1390. power-domains = <&gpc 2>;
  1391. status = "disabled";
  1392. };
  1393. };
  1394. };

虽然我们基本上不会从头到尾重写一个.dts 文件,大多时候是直接在 SOC 厂商提供的.dts
文件上进行修改。
1 compatible 属性
compatible 属性也叫做“兼容性”属性,这是非常重要的一个属性! compatible 属性的值是
一个字符串列表, compatible 属性用于将设备和驱动绑定起来。字符串列表用于选择设备所要
使用的驱动程序, compatible 属性的值格式如下所示:
compatible = "fsl,imx6ul-14x14-evk", "fsl,imx6ul";
属性值有两个,分别为“fsl,imx6ul-14x14-evk ”和“fsl,imx6ul ”,其中“fsl
表示厂商是飞思卡尔,“imx6ul-14x14-evk ”和“imx6ul ”表示驱动模块名字。sound
这个设备首先使用第一个兼容值在 Linux 内核里面查找,看看能不能找到与之匹配的驱动文件,
如果没有找到的话就使用第二个兼容值查。
一般驱动程序文件都会有一个 OF 匹配表,此 OF 匹配表保存着一些 compatible 值,如果设
备节点的 compatible 属性值和 OF 匹配表中的任何一个值相等,那么就表示设备可以使用这个
驱动。
2 model 属性
model 属性值也是一个字符串,一般 model 属性描述设备模块信息,比如名字什么的,比
    model = "Freescale i.MX6 UltraLite 14x14 EVK Board";
3 status 属性
status 属性看名字就知道是和设备状态有关的, status 属性值也是字符串,字符串是设备的
状态信息,可选的状态如表 43.3.3.1 所示:
 
4 #address-cells #size-cells 属性
这两个属性的值都是无符号 32 位整形, #address-cells #size-cells 这两个属性可以用在任
何拥有子节点的设备中,用于描述子节点的地址信息。 #address-cells 属性值决定了子节点 reg
性中地址信息所占用的字长 (32 ) #size-cells 属性值决定了子节点 reg 属性中长度信息所占的
字长 (32 ) #address-cells #size-cells 表明了子节点应该如何编写 reg 属性值,一般 reg 属性
都是和地址有关的内容,和地址相关的信息有两种:起始地址和地址长度, reg 属性的格式一为:

 reg = <address1 length1 address2 length2 address3 length3……>

每个“ address length ”组合表示一个地址范围,其中 address 是起始地址, length 是地址长
度, #address-cells 表明 address 这个数据所占用的字长, #size-cells 表明 length 这个数据所占用
的字长,比如 :
片上ram 起始地址0x00900000 长度 0x1000  4k

 ocrams_ddr: sram@00900000 {
            compatible = "fsl,ddr-lpm-sram";
            reg = <0x00900000 0x1000>;
            clocks = <&clks IMX6SX_CLK_OCRAM>;
        };

5 reg 属性
reg 属性前面已经提到过了, reg 属性的值一般是 (address length) 对。 reg 属性一般用于描
述设备地址空间资源信息,一般都是某个外设的寄存器地址范围信息
6 ranges 属性
ranges 属性值可以为空或者按照 (child-bus-address,parent-bus-address,length) 格式编写的数字
矩阵, ranges 是一个地址映射 / 转换表, ranges 属性每个项目由子地址、父地址和地址空间长度
这三部分组成:
child-bus-address :子总线地址空间的物理地址,由父节点的 #address-cells 确定此物理地址
所占用的字长。
parent-bus-address 父总线地址空间的物理地址,同样由父节点的 #address-cells 确定此物
理地址所占用的字长。
length 子地址空间的长度,由父节点的 #size-cells 确定此地址长度所占用的字长。
如果 ranges 属性值为空值,说明子地址空间和父地址空间完全相同,不需要进行地址转换,
对于我们所使用的 I.MX6ULL 来说,子地址空间和父地址空间完全相同,因此会在 imx6ull.dtsi
中找到大量的值为空的 ranges 属性,
ranges 属性不为空
7. chosen 子节点
chosen 并不是一个真实的设备, chosen 节点主要是为了 uboot Linux 内核传递数据,重
点是 bootargs 参数。一般 .dts 文件中 chosen 节点通常为空或者内容很少

  uboot 自己在 chosen 节点里面添加了 bootargs 属性!

1.3 创建小型模板设备树

我们就以 I.MX6ULL 这个 SOC 为例,我们需要
在设备树里面描述的内容如下:
①、 I.MX6ULL 这个 Cortex-A7 架构的 32 CPU
②、 I.MX6ULL 内部 ocram ,起始地址 0x00900000 ,大小为 128KB(0x20000)
③、 I.MX6ULL 内部 aips1 域下的 ecspi1 外设控制器,寄存器起始地址为 0x02008000 ,大
小为 0x4000
④、 I.MX6ULL 内部 aips2 域下的 usbotg1 外设控制器,寄存器起始地址为 0x02184000 ,大
小为 0x4000
⑤、 I.MX6ULL 内部 aips3 域下的 rngb 外设控制器,寄存器起始地址为 0x02284000 ,大小
0x4000
为了简单起见,我们就在设备树里面就实现这些内容即可,首先,搭建一个仅含有根节点
/ ”的基础的框架,新建一个名为 myfirst.dts 文件,在里面输入如下所示内容:

设备树框架很简单,就一个根节点“ / ”,根节点里面只有一个 compatible 属性。我们就在这
个基础框架上面将上面列出的内容一点点添加进来。
1 、添加 cpus 节点
首先添加 CPU 节点, I.MX6ULL 采用 Cortex-A7 架构,而且只有一个 CPU ,因此只有一个
cpu0 节点,完成以后如下所示:

4~14 行, cpus 节点,此节点用于描述 SOC 内部的所有 CPU ,因为 I.MX6ULL 只有一个
CPU ,因此只有一个 cpu0 子节点。
2 、添加 soc 节点
uart iic 控制器等等这些都属于 SOC 内部外设,因此一般会创建一个叫做 soc 的父节点
来管理这些 SOC 内部外设的子节点,添加 soc 节点以后的 myfirst.dts 文件内容如下所示:

3 、添加 ocram 节点
根据第②点的要求,添加 ocram 节点, ocram I.MX6ULL 内部 RAM ,因此 ocram 节点应
该是 soc 节点的子节点。 ocram 起始地址为 0x00900000 ,大小为 128KB(0x20000) ,添加 ocram
节点以后 myfirst.dts 文件内容如下所示:
4 、添加 aips1 aips2 aips3 这三个子节点 
5 、添加 ecspi1 usbotg1 rngb 这三个外设控制器节点
最后我们在 myfirst.dts 文件中加入 ecspi1 usbotg1 rngb 这三个外设控制器对应的节点,
其中 ecspi1 属于 aips1 的子节点, usbotg1 属于 aips2 的子节点, rngb 属于 aips3 的子节点。最终
myfirst.dts 文件内容如下:
  1. 1 / {
  2. 2 compatible = "fsl,imx6ull-alientek-evk", "fsl,imx6ull";
  3. 3
  4. 4 cpus {
  5. 5 #address-cells = <1>;
  6. 6 #size-cells = <0>;
  7. 7
  8. 8 //CPU0 节点
  9. 9 cpu0: cpu@0 {
  10. 10 compatible = "arm,cortex-a7";
  11. 11 device_type = "cpu";
  12. 12 reg = <0>;
  13. 13 };
  14. 14 };
  15. 15
  16. 16 //soc 节点
  17. 17 soc {
  18. 18 #address-cells = <1>;
  19. 19 #size-cells = <1>;
  20. 20 compatible = "simple-bus";
  21. 21 ranges;
  22. 22
  23. 23 //ocram 节点
  24. 24 ocram: sram@00900000 {
  25. 25 compatible = "fsl,lpm-sram";
  26. 26 reg = <0x00900000 0x20000>;
  27. 27 };
  28. 28
  29. 29 //aips1 节点
  30. 30 aips1: aips-bus@02000000 {
  31. 31 compatible = "fsl,aips-bus", "simple-bus";
  32. 32 #address-cells = <1>;
  33. 33 #size-cells = <1>;
  34. 34 reg = <0x02000000 0x100000>;
  35. 35 ranges;
  36. 36
  37. 37 //ecspi1 节点
  38. 38 ecspi1: ecspi@02008000 {
  39. 39 #address-cells = <1>;
  40. 40 #size-cells = <0>;
  41. 41 compatible = "fsl,imx6ul-ecspi", "fsl,imx51-ecspi";
  42. 42 reg = <0x02008000 0x4000>;
  43. 43 status = "disabled";
  44. 44 };
  45. 45 }
  46. 46
  47. 47 //aips2 节点
  48. 48 aips2: aips-bus@02100000 {
  49. 49 compatible = "fsl,aips-bus", "simple-bus";
  50. 50 #address-cells = <1>;
  51. 51 #size-cells = <1>;
  52. 52 reg = <0x02100000 0x100000>;
  53. 53 ranges;
  54. 54
  55. 55 //usbotg1 节点
  56. 56 usbotg1: usb@02184000 {
  57. 57 compatible = "fsl,imx6ul-usb", "fsl,imx27-usb";
  58. 58 reg = <0x02184000 0x4000>;
  59. 59 status = "disabled";
  60. 60 };
  61. 61 }
  62. 62
  63. 63 //aips3 节点
  64. 64 aips3: aips-bus@02200000 {
  65. 65 compatible = "fsl,aips-bus", "simple-bus";
  66. 66 #address-cells = <1>;
  67. 67 #size-cells = <1>;
  68. 68 reg = <0x02200000 0x100000>;
  69. 69 ranges;
  70. 70
  71. 71 //rngb 节点
  72. 72 rngb: rngb@02284000 {
  73. 73 compatible = "fsl,imx6sl-rng", "fsl,imx-rng", "imxrng";
  74. 74 reg = <0x02284000 0x4000>;
  75. 75 };
  76. 76 }
  77. 77 }
  78. 78 }

二 内核与设备树

2.1 解析DTB 

Linux 内核在启动的时候会解析 DTB 文件,然后在 /proc/device-tree 目录下生成相应的设备
树节点文件。接下来我们简单分析一下 Linux 内核是如何解析 DTB 文件的,流程如图 43.7.1
示:

2.2 绑定信息文档

设备树是用来描述板子上的设备信息的,不同的设备其信息不同,反映到设备树中就是属
性不同。那么我们在设备树中添加一个硬件对应的节点的时候从哪里查阅相关的说明呢?在
Linux 内核源码中有详细的 .txt 文档描述了如何添加节点,这些 .txt 文档叫做绑定文档,路径为:
Linux 源码目录 /Documentation/devicetree/bindings ,如图 43.8.1 所示:

有时候使用的一些芯片在 Documentation/devicetree/bindings 目录下找不到对应的文档,这
个时候就要咨询芯片的提供商,让他们给你提供参考的设备树文件。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/菜鸟追梦旅行/article/detail/688795
推荐阅读
相关标签
  

闽ICP备14008679号