i.MX6ULL(十三) linux 设备树

 一 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
所示:

i.MX6ULL(十三) linux 设备树_第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 代码分析 语法

/*
 * Copyright (C) 2015 Freescale Semiconductor, Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

/dts-v1/;

#include 
#include "imx6ul.dtsi"

/ {
	model = "Freescale i.MX6 UltraLite 14x14 EVK Board";
	compatible = "fsl,imx6ul-14x14-evk", "fsl,imx6ul";

	chosen {
		stdout-path = &uart1;
	};

	memory {
		reg = <0x80000000 0x20000000>;
	};

	reserved-memory {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;

		linux,cma {
			compatible = "shared-dma-pool";
			reusable;
			size = <0x14000000>;
			linux,cma-default;
		};
	};

	backlight {
		compatible = "pwm-backlight";
		pwms = <&pwm1 0 5000000>;
		brightness-levels = <0 4 8 16 32 64 128 255>;
		default-brightness-level = <6>;
		status = "okay";
	};

	pxp_v4l2 {
		compatible = "fsl,imx6ul-pxp-v4l2", "fsl,imx6sx-pxp-v4l2", "fsl,imx6sl-pxp-v4l2";
		status = "okay";
	};

	regulators {
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <0>;

		reg_can_3v3: regulator@0 {
			compatible = "regulator-fixed";
			reg = <0>;
			regulator-name = "can-3v3";
			regulator-min-microvolt = <3300000>;
			regulator-max-microvolt = <3300000>;
			gpios = <&gpio_spi 3 GPIO_ACTIVE_LOW>;
		};

		reg_sd1_vmmc: regulator@1 {
			compatible = "regulator-fixed";
			regulator-name = "VSD_3V3";
			regulator-min-microvolt = <3300000>;
			regulator-max-microvolt = <3300000>;
			gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>;
			enable-active-high;
		};

		reg_gpio_dvfs: regulator-gpio {
			compatible = "regulator-gpio";
			pinctrl-names = "default";
			pinctrl-0 = <&pinctrl_dvfs>;
			regulator-min-microvolt = <1300000>;
			regulator-max-microvolt = <1400000>;
			regulator-name = "gpio_dvfs";
			regulator-type = "voltage";
			gpios = <&gpio5 3 GPIO_ACTIVE_HIGH>;
			states = <1300000 0x1 1400000 0x0>;
		};
	};

	sound {
		compatible = "fsl,imx6ul-evk-wm8960",
			   "fsl,imx-audio-wm8960";
		model = "wm8960-audio";
		cpu-dai = <&sai2>;
		audio-codec = <&codec>;
		asrc-controller = <&asrc>;
		codec-master;
		gpr = <&gpr 4 0x100000 0x100000>;
		/*
                 * hp-det = ;
		 * hp-det-pin: JD1 JD2  or JD3
		 * hp-det-polarity = 0: hp detect high for headphone
		 * hp-det-polarity = 1: hp detect high for speaker
		 */
		hp-det = <3 0>;
		hp-det-gpios = <&gpio5 4 0>;
		mic-det-gpios = <&gpio5 4 0>;
		audio-routing =
			"Headphone Jack", "HP_L",
			"Headphone Jack", "HP_R",
			"Ext Spk", "SPK_LP",
			"Ext Spk", "SPK_LN",
			"Ext Spk", "SPK_RP",
			"Ext Spk", "SPK_RN",
			"LINPUT2", "Mic Jack",
			"LINPUT3", "Mic Jack",
			"RINPUT1", "Main MIC",
			"RINPUT2", "Main MIC",
			"Mic Jack", "MICB",
			"Main MIC", "MICB",
			"CPU-Playback", "ASRC-Playback",
			"Playback", "CPU-Playback",
			"ASRC-Capture", "CPU-Capture",
			"CPU-Capture", "Capture";
	};

	spi4 {
		compatible = "spi-gpio";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_spi4>;
		pinctrl-assert-gpios = <&gpio5 8 GPIO_ACTIVE_LOW>;
		status = "okay";
		gpio-sck = <&gpio5 11 0>;
		gpio-mosi = <&gpio5 10 0>;
		cs-gpios = <&gpio5 7 0>;
		num-chipselects = <1>;
		#address-cells = <1>;
		#size-cells = <0>;

		gpio_spi: gpio_spi@0 {
			compatible = "fairchild,74hc595";
			gpio-controller;
			#gpio-cells = <2>;
			reg = <0>;
			registers-number = <1>;
			registers-default = /bits/ 8 <0x57>;
			spi-max-frequency = <100000>;
		};
	};
};

&cpu0 {
	arm-supply = <®_arm>;
	soc-supply = <®_soc>;
	dc-supply = <®_gpio_dvfs>;
};

&clks {
	assigned-clocks = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>;
	assigned-clock-rates = <786432000>;
};

&csi {
	status = "disabled";

	port {
		csi1_ep: endpoint {
			remote-endpoint = <&ov5640_ep>;
		};
	};
};

&fec1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_enet1>;
	phy-mode = "rmii";
	phy-handle = <ðphy0>;
	status = "okay";
};

&fec2 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_enet2>;
	phy-mode = "rmii";
	phy-handle = <ðphy1>;
	status = "okay";

	mdio {
		#address-cells = <1>;
		#size-cells = <0>;

		ethphy0: ethernet-phy@2 {
			compatible = "ethernet-phy-ieee802.3-c22";
			reg = <2>;
		};

		ethphy1: ethernet-phy@1 {
			compatible = "ethernet-phy-ieee802.3-c22";
			reg = <1>;
		};
	};
};

&flexcan1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_flexcan1>;
	xceiver-supply = <®_can_3v3>;
	status = "okay";
};

&flexcan2 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_flexcan2>;
	xceiver-supply = <®_can_3v3>;
	status = "okay";
};

&gpc {
	fsl,cpu_pupscr_sw2iso = <0x1>;
	fsl,cpu_pupscr_sw = <0x0>;
	fsl,cpu_pdnscr_iso2sw = <0x1>;
	fsl,cpu_pdnscr_iso = <0x1>;
	fsl,ldo-bypass = <0>; /* DCDC, ldo-enable */
};

&i2c1 {
	clock-frequency = <100000>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_i2c1>;
	status = "okay";

	mag3110@0e {
		compatible = "fsl,mag3110";
		reg = <0x0e>;
		position = <2>;
	};

	fxls8471@1e {
		compatible = "fsl,fxls8471";
		reg = <0x1e>;
		position = <0>;
		interrupt-parent = <&gpio5>;
		interrupts = <0 8>;
	};
};

&i2c2 {
	clock_frequency = <100000>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_i2c2>;
	status = "okay";

	codec: wm8960@1a {
		compatible = "wlf,wm8960";
		reg = <0x1a>;
		clocks = <&clks IMX6UL_CLK_SAI2>;
		clock-names = "mclk";
		wlf,shared-lrclk;
	};

	ov5640: ov5640@3c {
		compatible = "ovti,ov5640";
		reg = <0x3c>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_csi1>;
		clocks = <&clks IMX6UL_CLK_CSI>;
		clock-names = "csi_mclk";
		pwn-gpios = <&gpio_spi 6 1>;
		rst-gpios = <&gpio_spi 5 0>;
		csi_id = <0>;
		mclk = <24000000>;
		mclk_source = <0>;
		status = "disabled";
		port {
			ov5640_ep: endpoint {
				remote-endpoint = <&csi1_ep>;
			};
		};
	};
};

&iomuxc {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_hog_1>;
	imx6ul-evk {
		pinctrl_hog_1: hoggrp-1 {
			fsl,pins = <
				MX6UL_PAD_UART1_RTS_B__GPIO1_IO19	0x17059 /* SD1 CD */
				MX6UL_PAD_GPIO1_IO05__USDHC1_VSELECT	0x17059 /* SD1 VSELECT */
				MX6UL_PAD_GPIO1_IO09__GPIO1_IO09        0x17059 /* SD1 RESET */
				MX6UL_PAD_SNVS_TAMPER0__GPIO5_IO00	0x80000000
			>;
		};

		pinctrl_csi1: csi1grp {
			fsl,pins = <
				MX6UL_PAD_CSI_MCLK__CSI_MCLK		0x1b088
				MX6UL_PAD_CSI_PIXCLK__CSI_PIXCLK	0x1b088
				MX6UL_PAD_CSI_VSYNC__CSI_VSYNC		0x1b088
				MX6UL_PAD_CSI_HSYNC__CSI_HSYNC		0x1b088
				MX6UL_PAD_CSI_DATA00__CSI_DATA02	0x1b088
				MX6UL_PAD_CSI_DATA01__CSI_DATA03	0x1b088
				MX6UL_PAD_CSI_DATA02__CSI_DATA04	0x1b088
				MX6UL_PAD_CSI_DATA03__CSI_DATA05	0x1b088
				MX6UL_PAD_CSI_DATA04__CSI_DATA06	0x1b088
				MX6UL_PAD_CSI_DATA05__CSI_DATA07	0x1b088
				MX6UL_PAD_CSI_DATA06__CSI_DATA08	0x1b088
				MX6UL_PAD_CSI_DATA07__CSI_DATA09	0x1b088
			>;
		};

		pinctrl_dvfs: dvfsgrp {
			fsl,pins = <
				MX6UL_PAD_SNVS_TAMPER3__GPIO5_IO03	0x79
			>;
		};

		pinctrl_enet1: enet1grp {
			fsl,pins = <
				MX6UL_PAD_ENET1_RX_EN__ENET1_RX_EN	0x1b0b0
				MX6UL_PAD_ENET1_RX_ER__ENET1_RX_ER	0x1b0b0
				MX6UL_PAD_ENET1_RX_DATA0__ENET1_RDATA00	0x1b0b0
				MX6UL_PAD_ENET1_RX_DATA1__ENET1_RDATA01	0x1b0b0
				MX6UL_PAD_ENET1_TX_EN__ENET1_TX_EN	0x1b0b0
				MX6UL_PAD_ENET1_TX_DATA0__ENET1_TDATA00	0x1b0b0
				MX6UL_PAD_ENET1_TX_DATA1__ENET1_TDATA01	0x1b0b0
				MX6UL_PAD_ENET1_TX_CLK__ENET1_REF_CLK1	0x4001b031
			>;
		};

		pinctrl_enet2: enet2grp {
			fsl,pins = <
				MX6UL_PAD_GPIO1_IO07__ENET2_MDC		0x1b0b0
				MX6UL_PAD_GPIO1_IO06__ENET2_MDIO	0x1b0b0
				MX6UL_PAD_ENET2_RX_EN__ENET2_RX_EN	0x1b0b0
				MX6UL_PAD_ENET2_RX_ER__ENET2_RX_ER	0x1b0b0
				MX6UL_PAD_ENET2_RX_DATA0__ENET2_RDATA00	0x1b0b0
				MX6UL_PAD_ENET2_RX_DATA1__ENET2_RDATA01	0x1b0b0
				MX6UL_PAD_ENET2_TX_EN__ENET2_TX_EN	0x1b0b0
				MX6UL_PAD_ENET2_TX_DATA0__ENET2_TDATA00	0x1b0b0
				MX6UL_PAD_ENET2_TX_DATA1__ENET2_TDATA01	0x1b0b0
				MX6UL_PAD_ENET2_TX_CLK__ENET2_REF_CLK2	0x4001b031
			>;
		};

		pinctrl_flexcan1: flexcan1grp{
			fsl,pins = <
				MX6UL_PAD_UART3_RTS_B__FLEXCAN1_RX	0x1b020
				MX6UL_PAD_UART3_CTS_B__FLEXCAN1_TX	0x1b020
			>;
		};

		pinctrl_flexcan2: flexcan2grp{
			fsl,pins = <
				MX6UL_PAD_UART2_RTS_B__FLEXCAN2_RX	0x1b020
				MX6UL_PAD_UART2_CTS_B__FLEXCAN2_TX	0x1b020
			>;
		};

		pinctrl_i2c1: i2c1grp {
			fsl,pins = <
				MX6UL_PAD_UART4_TX_DATA__I2C1_SCL 0x4001b8b0
				MX6UL_PAD_UART4_RX_DATA__I2C1_SDA 0x4001b8b0
			>;
		};

		pinctrl_i2c2: i2c2grp {
			fsl,pins = <
				MX6UL_PAD_UART5_TX_DATA__I2C2_SCL 0x4001b8b0
				MX6UL_PAD_UART5_RX_DATA__I2C2_SDA 0x4001b8b0
			>;
		};

		pinctrl_lcdif_dat: lcdifdatgrp {
			fsl,pins = <
				MX6UL_PAD_LCD_DATA00__LCDIF_DATA00  0x79
				MX6UL_PAD_LCD_DATA01__LCDIF_DATA01  0x79
				MX6UL_PAD_LCD_DATA02__LCDIF_DATA02  0x79
				MX6UL_PAD_LCD_DATA03__LCDIF_DATA03  0x79
				MX6UL_PAD_LCD_DATA04__LCDIF_DATA04  0x79
				MX6UL_PAD_LCD_DATA05__LCDIF_DATA05  0x79
				MX6UL_PAD_LCD_DATA06__LCDIF_DATA06  0x79
				MX6UL_PAD_LCD_DATA07__LCDIF_DATA07  0x79
				MX6UL_PAD_LCD_DATA08__LCDIF_DATA08  0x79
				MX6UL_PAD_LCD_DATA09__LCDIF_DATA09  0x79
				MX6UL_PAD_LCD_DATA10__LCDIF_DATA10  0x79
				MX6UL_PAD_LCD_DATA11__LCDIF_DATA11  0x79
				MX6UL_PAD_LCD_DATA12__LCDIF_DATA12  0x79
				MX6UL_PAD_LCD_DATA13__LCDIF_DATA13  0x79
				MX6UL_PAD_LCD_DATA14__LCDIF_DATA14  0x79
				MX6UL_PAD_LCD_DATA15__LCDIF_DATA15  0x79
				MX6UL_PAD_LCD_DATA16__LCDIF_DATA16  0x79
				MX6UL_PAD_LCD_DATA17__LCDIF_DATA17  0x79
				MX6UL_PAD_LCD_DATA18__LCDIF_DATA18  0x79
				MX6UL_PAD_LCD_DATA19__LCDIF_DATA19  0x79
				MX6UL_PAD_LCD_DATA20__LCDIF_DATA20  0x79
				MX6UL_PAD_LCD_DATA21__LCDIF_DATA21  0x79
				MX6UL_PAD_LCD_DATA22__LCDIF_DATA22  0x79
				MX6UL_PAD_LCD_DATA23__LCDIF_DATA23  0x79
			>;
		};

		pinctrl_lcdif_ctrl: lcdifctrlgrp {
			fsl,pins = <
				MX6UL_PAD_LCD_CLK__LCDIF_CLK	    0x79
				MX6UL_PAD_LCD_ENABLE__LCDIF_ENABLE  0x79
				MX6UL_PAD_LCD_HSYNC__LCDIF_HSYNC    0x79
				MX6UL_PAD_LCD_VSYNC__LCDIF_VSYNC    0x79
				/* used for lcd reset */
				MX6UL_PAD_SNVS_TAMPER9__GPIO5_IO09  0x79
			>;
		};

		pinctrl_pwm1: pwm1grp {
			fsl,pins = <
				MX6UL_PAD_GPIO1_IO08__PWM1_OUT   0x110b0
			>;
		};

		pinctrl_qspi: qspigrp {
			fsl,pins = <
				MX6UL_PAD_NAND_WP_B__QSPI_A_SCLK      0x70a1
				MX6UL_PAD_NAND_READY_B__QSPI_A_DATA00 0x70a1
				MX6UL_PAD_NAND_CE0_B__QSPI_A_DATA01   0x70a1
				MX6UL_PAD_NAND_CE1_B__QSPI_A_DATA02   0x70a1
				MX6UL_PAD_NAND_CLE__QSPI_A_DATA03     0x70a1
				MX6UL_PAD_NAND_DQS__QSPI_A_SS0_B      0x70a1
			>;
		};

		pinctrl_sai2: sai2grp {
			fsl,pins = <
				MX6UL_PAD_JTAG_TDI__SAI2_TX_BCLK	0x17088
				MX6UL_PAD_JTAG_TDO__SAI2_TX_SYNC	0x17088
				MX6UL_PAD_JTAG_TRST_B__SAI2_TX_DATA	0x11088
				MX6UL_PAD_JTAG_TCK__SAI2_RX_DATA	0x11088
				MX6UL_PAD_JTAG_TMS__SAI2_MCLK		0x17088
				MX6UL_PAD_SNVS_TAMPER4__GPIO5_IO04	0x17059
			>;
		};

		pinctrl_sim2_1: sim2grp-1 {
			fsl,pins = <
				MX6UL_PAD_CSI_DATA03__SIM2_PORT1_PD		0xb808
				MX6UL_PAD_CSI_DATA04__SIM2_PORT1_CLK		0x11
				MX6UL_PAD_CSI_DATA05__SIM2_PORT1_RST_B		0xb810
				MX6UL_PAD_CSI_DATA06__SIM2_PORT1_SVEN		0xb810
				MX6UL_PAD_CSI_DATA07__SIM2_PORT1_TRXD		0xb811
				MX6UL_PAD_CSI_DATA02__GPIO4_IO23		0x3008
			>;
		};

		pinctrl_spi4: spi4grp {
			fsl,pins = <
				MX6UL_PAD_BOOT_MODE0__GPIO5_IO10	0x70a1
				MX6UL_PAD_BOOT_MODE1__GPIO5_IO11	0x70a1
				MX6UL_PAD_SNVS_TAMPER7__GPIO5_IO07	0x70a1
				MX6UL_PAD_SNVS_TAMPER8__GPIO5_IO08	0x80000000
			>;
		};

		pinctrl_tsc: tscgrp {
			fsl,pins = <
				MX6UL_PAD_GPIO1_IO01__GPIO1_IO01	0xb0
				MX6UL_PAD_GPIO1_IO02__GPIO1_IO02	0xb0
				MX6UL_PAD_GPIO1_IO03__GPIO1_IO03	0xb0
				MX6UL_PAD_GPIO1_IO04__GPIO1_IO04	0xb0
			>;
		};

		pinctrl_uart1: uart1grp {
			fsl,pins = <
				MX6UL_PAD_UART1_TX_DATA__UART1_DCE_TX 0x1b0b1
				MX6UL_PAD_UART1_RX_DATA__UART1_DCE_RX 0x1b0b1
			>;
		};

		pinctrl_uart2: uart2grp {
			fsl,pins = <
				MX6UL_PAD_UART2_TX_DATA__UART2_DCE_TX	0x1b0b1
				MX6UL_PAD_UART2_RX_DATA__UART2_DCE_RX	0x1b0b1
				MX6UL_PAD_UART3_RX_DATA__UART2_DCE_RTS	0x1b0b1
				MX6UL_PAD_UART3_TX_DATA__UART2_DCE_CTS	0x1b0b1
			>;
		};

		pinctrl_uart2dte: uart2dtegrp {
			fsl,pins = <
				MX6UL_PAD_UART2_TX_DATA__UART2_DTE_RX	0x1b0b1
				MX6UL_PAD_UART2_RX_DATA__UART2_DTE_TX	0x1b0b1
				MX6UL_PAD_UART3_RX_DATA__UART2_DTE_CTS	0x1b0b1
				MX6UL_PAD_UART3_TX_DATA__UART2_DTE_RTS	0x1b0b1
			>;
		};

		pinctrl_usdhc1: usdhc1grp {
			fsl,pins = <
				MX6UL_PAD_SD1_CMD__USDHC1_CMD     0x17059
				MX6UL_PAD_SD1_CLK__USDHC1_CLK     0x10071
				MX6UL_PAD_SD1_DATA0__USDHC1_DATA0 0x17059
				MX6UL_PAD_SD1_DATA1__USDHC1_DATA1 0x17059
				MX6UL_PAD_SD1_DATA2__USDHC1_DATA2 0x17059
				MX6UL_PAD_SD1_DATA3__USDHC1_DATA3 0x17059
			>;
		};

		pinctrl_usdhc1_100mhz: usdhc1grp100mhz {
			fsl,pins = <
				MX6UL_PAD_SD1_CMD__USDHC1_CMD     0x170b9
				MX6UL_PAD_SD1_CLK__USDHC1_CLK     0x100b9
				MX6UL_PAD_SD1_DATA0__USDHC1_DATA0 0x170b9
				MX6UL_PAD_SD1_DATA1__USDHC1_DATA1 0x170b9
				MX6UL_PAD_SD1_DATA2__USDHC1_DATA2 0x170b9
				MX6UL_PAD_SD1_DATA3__USDHC1_DATA3 0x170b9
			>;
		};

		pinctrl_usdhc1_200mhz: usdhc1grp200mhz {
			fsl,pins = <
				MX6UL_PAD_SD1_CMD__USDHC1_CMD     0x170f9
				MX6UL_PAD_SD1_CLK__USDHC1_CLK     0x100f9
				MX6UL_PAD_SD1_DATA0__USDHC1_DATA0 0x170f9
				MX6UL_PAD_SD1_DATA1__USDHC1_DATA1 0x170f9
				MX6UL_PAD_SD1_DATA2__USDHC1_DATA2 0x170f9
				MX6UL_PAD_SD1_DATA3__USDHC1_DATA3 0x170f9
			>;
		};

		pinctrl_usdhc2: usdhc2grp {
			fsl,pins = <
				MX6UL_PAD_NAND_RE_B__USDHC2_CLK     0x10069
				MX6UL_PAD_NAND_WE_B__USDHC2_CMD     0x17059
				MX6UL_PAD_NAND_DATA00__USDHC2_DATA0 0x17059
				MX6UL_PAD_NAND_DATA01__USDHC2_DATA1 0x17059
				MX6UL_PAD_NAND_DATA02__USDHC2_DATA2 0x17059
				MX6UL_PAD_NAND_DATA03__USDHC2_DATA3 0x17059
			>;
		};

		pinctrl_usdhc2_8bit: usdhc2grp_8bit {
			fsl,pins = <
				MX6UL_PAD_NAND_RE_B__USDHC2_CLK     0x10069
				MX6UL_PAD_NAND_WE_B__USDHC2_CMD     0x17059
				MX6UL_PAD_NAND_DATA00__USDHC2_DATA0 0x17059
				MX6UL_PAD_NAND_DATA01__USDHC2_DATA1 0x17059
				MX6UL_PAD_NAND_DATA02__USDHC2_DATA2 0x17059
				MX6UL_PAD_NAND_DATA03__USDHC2_DATA3 0x17059
				MX6UL_PAD_NAND_DATA04__USDHC2_DATA4 0x17059
				MX6UL_PAD_NAND_DATA05__USDHC2_DATA5 0x17059
				MX6UL_PAD_NAND_DATA06__USDHC2_DATA6 0x17059
				MX6UL_PAD_NAND_DATA07__USDHC2_DATA7 0x17059
			>;
		};

		pinctrl_usdhc2_8bit_100mhz: usdhc2grp_8bit_100mhz {
			fsl,pins = <
				MX6UL_PAD_NAND_RE_B__USDHC2_CLK     0x100b9
				MX6UL_PAD_NAND_WE_B__USDHC2_CMD     0x170b9
				MX6UL_PAD_NAND_DATA00__USDHC2_DATA0 0x170b9
				MX6UL_PAD_NAND_DATA01__USDHC2_DATA1 0x170b9
				MX6UL_PAD_NAND_DATA02__USDHC2_DATA2 0x170b9
				MX6UL_PAD_NAND_DATA03__USDHC2_DATA3 0x170b9
				MX6UL_PAD_NAND_DATA04__USDHC2_DATA4 0x170b9
				MX6UL_PAD_NAND_DATA05__USDHC2_DATA5 0x170b9
				MX6UL_PAD_NAND_DATA06__USDHC2_DATA6 0x170b9
				MX6UL_PAD_NAND_DATA07__USDHC2_DATA7 0x170b9
			>;
		};

		pinctrl_usdhc2_8bit_200mhz: usdhc2grp_8bit_200mhz {
			fsl,pins = <
				MX6UL_PAD_NAND_RE_B__USDHC2_CLK     0x100f9
				MX6UL_PAD_NAND_WE_B__USDHC2_CMD     0x170f9
				MX6UL_PAD_NAND_DATA00__USDHC2_DATA0 0x170f9
				MX6UL_PAD_NAND_DATA01__USDHC2_DATA1 0x170f9
				MX6UL_PAD_NAND_DATA02__USDHC2_DATA2 0x170f9
				MX6UL_PAD_NAND_DATA03__USDHC2_DATA3 0x170f9
				MX6UL_PAD_NAND_DATA04__USDHC2_DATA4 0x170f9
				MX6UL_PAD_NAND_DATA05__USDHC2_DATA5 0x170f9
				MX6UL_PAD_NAND_DATA06__USDHC2_DATA6 0x170f9
				MX6UL_PAD_NAND_DATA07__USDHC2_DATA7 0x170f9
			>;
		};
		pinctrl_wdog: wdoggrp {
			fsl,pins = <
				MX6UL_PAD_LCD_RESET__WDOG1_WDOG_ANY    0x30b0
			>;
		};
	};
};

&lcdif {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_lcdif_dat
		     &pinctrl_lcdif_ctrl>;
	display = <&display0>;
	status = "okay";

	display0: display {
		bits-per-pixel = <16>;
		bus-width = <24>;

		display-timings {
			native-mode = <&timing0>;
			timing0: timing0 {
			clock-frequency = <9200000>;
			hactive = <480>;
			vactive = <272>;
			hfront-porch = <8>;
			hback-porch = <4>;
			hsync-len = <41>;
			vback-porch = <2>;
			vfront-porch = <4>;
			vsync-len = <10>;

			hsync-active = <0>;
			vsync-active = <0>;
			de-active = <1>;
			pixelclk-active = <0>;
			};
		};
	};
};

&pwm1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_pwm1>;
	status = "okay";
};

&pxp {
	status = "okay";
};

&qspi {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_qspi>;
	status = "okay";
	ddrsmp=<0>;

	flash0: n25q256a@0 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "micron,n25q256a";
		spi-max-frequency = <29000000>;
		spi-nor,ddr-quad-read-dummy = <6>;
		reg = <0>;
	};
};

&sai2 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_sai2>;

	assigned-clocks = <&clks IMX6UL_CLK_SAI2_SEL>,
			  <&clks IMX6UL_CLK_SAI2>;
	assigned-clock-parents = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>;
	assigned-clock-rates = <0>, <12288000>;

	status = "okay";
};

&sim2 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_sim2_1>;
	assigned-clocks = <&clks IMX6UL_CLK_SIM_SEL>;
	assigned-clock-parents = <&clks IMX6UL_CLK_SIM_PODF>;
	assigned-clock-rates = <240000000>;
	/* GPIO_ACTIVE_HIGH/LOW:sim card voltage control
	 * NCN8025:Vcc = ACTIVE_HIGH?5V:3V
	 * TDA8035:Vcc = ACTIVE_HIGH?5V:1.8V
	 */
	pinctrl-assert-gpios = <&gpio4 23 GPIO_ACTIVE_HIGH>;
	port = <1>;
	sven_low_active;
	status = "okay";
};

&tsc {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_tsc>;
	xnur-gpio = <&gpio1 3 GPIO_ACTIVE_LOW>;
	measure-delay-time = <0xffff>;
	pre-charge-time = <0xfff>;
	status = "okay";
};

&uart1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart1>;
	status = "okay";
};

&uart2 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart2>;
	fsl,uart-has-rtscts;
	/* for DTE mode, add below change */
	/* fsl,dte-mode; */
	/* pinctrl-0 = <&pinctrl_uart2dte>; */
	status = "okay";
};

&usbotg1 {
	dr_mode = "otg";
	srp-disable;
	hnp-disable;
	adp-disable;
	status = "okay";
};

&usbotg2 {
	dr_mode = "host";
	disable-over-current;
	status = "okay";
};

&usbphy1 {
	tx-d-cal = <0x5>;
};

&usbphy2 {
	tx-d-cal = <0x5>;
};

&usdhc1 {
	pinctrl-names = "default", "state_100mhz", "state_200mhz";
	pinctrl-0 = <&pinctrl_usdhc1>;
	pinctrl-1 = <&pinctrl_usdhc1_100mhz>;
	pinctrl-2 = <&pinctrl_usdhc1_200mhz>;
	cd-gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;
	keep-power-in-suspend;
	enable-sdio-wakeup;
	vmmc-supply = <®_sd1_vmmc>;
	status = "okay";
};

&usdhc2 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usdhc2>;
	non-removable;
	status = "okay";
};

&wdog1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_wdog>;
	fsl,wdog_b;
};
im6ull.dtsi  ,文件描述 SOC 的内部外设信息,比如 CPU 架构、主频、外设寄存器地址范围,比如 UART、IIC 等等。
/*
 * Copyright 2014-2016 Freescale Semiconductor, Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#include 
#include 
#include 
#include 
#include "imx6sx-pinfunc.h"
#include "skeleton.dtsi"

/ {
	aliases {
		can0 = &flexcan1;
		can1 = &flexcan2;
		ethernet0 = &fec1;
		ethernet1 = &fec2;
		gpio0 = &gpio1;
		gpio1 = &gpio2;
		gpio2 = &gpio3;
		gpio3 = &gpio4;
		gpio4 = &gpio5;
		gpio5 = &gpio6;
		gpio6 = &gpio7;
		i2c0 = &i2c1;
		i2c1 = &i2c2;
		i2c2 = &i2c3;
		i2c3 = &i2c4;
		mmc0 = &usdhc1;
		mmc1 = &usdhc2;
		mmc2 = &usdhc3;
		mmc3 = &usdhc4;
		serial0 = &uart1;
		serial1 = &uart2;
		serial2 = &uart3;
		serial3 = &uart4;
		serial4 = &uart5;
		serial5 = &uart6;
		spi0 = &ecspi1;
		spi1 = &ecspi2;
		spi2 = &ecspi3;
		spi3 = &ecspi4;
		spi4 = &ecspi5;
		usbphy0 = &usbphy1;
		usbphy1 = &usbphy2;
		lcdif0 = &lcdif1;
		lcdif1 = &lcdif2;
	};

	cpus {
		#address-cells = <1>;
		#size-cells = <0>;

		cpu0: cpu@0 {
			compatible = "arm,cortex-a9";
			device_type = "cpu";
			reg = <0>;
			next-level-cache = <&L2>;
			operating-points = <
				/* kHz    uV */
				996000  1250000
				792000  1175000
				396000  1075000
				198000	975000
			>;
			fsl,soc-operating-points = <
				/* ARM kHz  SOC uV */
				996000      1175000
				792000      1175000
				396000      1175000
				198000	    1175000
			>;
			clock-latency = <61036>; /* two CLK32 periods */
			clocks = <&clks IMX6SX_CLK_ARM>,
				 <&clks IMX6SX_CLK_PLL2_PFD2>,
				 <&clks IMX6SX_CLK_STEP>,
				 <&clks IMX6SX_CLK_PLL1_SW>,
				 <&clks IMX6SX_CLK_PLL1_SYS>,
				 <&clks IMX6SX_CLK_PLL1>,
				 <&clks IMX6SX_PLL1_BYPASS>,
				 <&clks IMX6SX_PLL1_BYPASS_SRC>;
			clock-names = "arm", "pll2_pfd2_396m", "step",
				      "pll1_sw", "pll1_sys", "pll1",
				      "pll1_bypass", "pll1_bypass_src";
			arm-supply = <®_arm>;
			soc-supply = <®_soc>;
		};
	};

	reserved-memory {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;

		/* global autoconfigured region for contiguous allocations */
		linux,cma {
			compatible = "shared-dma-pool";
			reusable;
			size = <0x14000000>;
			linux,cma-default;
		};
	};

	intc: interrupt-controller@00a01000 {
		compatible = "arm,cortex-a9-gic";
		#interrupt-cells = <3>;
		interrupt-controller;
		reg = <0x00a01000 0x1000>,
		      <0x00a00100 0x100>;
		interrupt-parent = <&intc>;
	};

	clocks {
		#address-cells = <1>;
		#size-cells = <0>;

		ckil: clock@0 {
			compatible = "fixed-clock";
			reg = <0>;
			#clock-cells = <0>;
			clock-frequency = <32768>;
			clock-output-names = "ckil";
		};

		osc: clock@1 {
			compatible = "fixed-clock";
			reg = <1>;
			#clock-cells = <0>;
			clock-frequency = <24000000>;
			clock-output-names = "osc";
		};

		ipp_di0: clock@2 {
			compatible = "fixed-clock";
			reg = <2>;
			#clock-cells = <0>;
			clock-frequency = <0>;
			clock-output-names = "ipp_di0";
		};

		ipp_di1: clock@3 {
			compatible = "fixed-clock";
			reg = <3>;
			#clock-cells = <0>;
			clock-frequency = <0>;
			clock-output-names = "ipp_di1";
		};
	};

	soc {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "simple-bus";
		interrupt-parent = <&gpc>;
		ranges;

		busfreq {
			compatible = "fsl,imx_busfreq";
			clocks = <&clks IMX6SX_CLK_PLL2_BUS>, <&clks IMX6SX_CLK_PLL2_PFD2>,
				<&clks IMX6SX_CLK_PLL2_198M>, <&clks IMX6SX_CLK_ARM>,
				<&clks IMX6SX_CLK_PLL3_USB_OTG>, <&clks IMX6SX_CLK_PERIPH>,
				<&clks IMX6SX_CLK_PERIPH_PRE>, <&clks IMX6SX_CLK_PERIPH_CLK2>,
				<&clks IMX6SX_CLK_PERIPH_CLK2_SEL>, <&clks IMX6SX_CLK_OSC>,
				<&clks IMX6SX_CLK_PLL1_SYS>, <&clks IMX6SX_CLK_PERIPH2>,
				<&clks IMX6SX_CLK_AHB>, <&clks IMX6SX_CLK_OCRAM_PODF>,
				<&clks IMX6SX_CLK_PLL1_SW>, <&clks IMX6SX_CLK_PERIPH2_PRE>,
				<&clks IMX6SX_CLK_PERIPH2_CLK2_SEL>, <&clks IMX6SX_CLK_PERIPH2_CLK2>,
				<&clks IMX6SX_CLK_STEP>, <&clks IMX6SX_CLK_MMDC_PODF>,
				<&clks IMX6SX_CLK_M4>;
			clock-names = "pll2_bus", "pll2_pfd2_396m", "pll2_198m", "arm",
					"pll3_usb_otg", "periph", "periph_pre", "periph_clk2",
					"periph_clk2_sel", "osc", "pll1_sys", "periph2",
					"ahb", "ocram", "pll1_sw", "periph2_pre",
					"periph2_clk2_sel", "periph2_clk2", "step", "mmdc",
					"m4";
			fsl,max_ddr_freq = <400000000>;
		};

		pmu {
			compatible = "arm,cortex-a9-pmu";
			interrupts = ;
		};

		ocrams: sram@008f8000 {
			compatible = "fsl,lpm-sram";
			reg = <0x008f8000 0x4000>;
			clocks = <&clks IMX6SX_CLK_OCRAM_S>;
		};

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

		ocram: sram@00901000 {
			compatible = "mmio-sram";
			reg = <0x00901000 0x1F000>;
			clocks = <&clks IMX6SX_CLK_OCRAM>;
		};

		ocram_mf: sram-mf@00900000 {
			compatible = "fsl,mega-fast-sram";
			reg = <0x00900000 0x20000>;
			clocks = <&clks IMX6SX_CLK_OCRAM>;
		};

		L2: l2-cache@00a02000 {
			compatible = "arm,pl310-cache";
			reg = <0x00a02000 0x1000>;
			interrupts = ;
			cache-unified;
			cache-level = <2>;
			arm,tag-latency = <4 2 3>;
			arm,data-latency = <4 2 3>;
		};

		dma_apbh: dma-apbh@01804000 {
			compatible = "fsl,imx6sx-dma-apbh", "fsl,imx28-dma-apbh";
			reg = <0x01804000 0x2000>;
			interrupts = ,
				     ,
				     ,
				     ;
			interrupt-names = "gpmi0", "gpmi1", "gpmi2", "gpmi3";
			#dma-cells = <1>;
			dma-channels = <4>;
			clocks = <&clks IMX6SX_CLK_APBH_DMA>;
		};

		caam_sm: caam-sm@00100000 {
			compatible = "fsl,imx6q-caam-sm";
			reg = <0x00100000 0x3fff>;
		};

		irq_sec_vio: caam_secvio {
			compatible = "fsl,imx6q-caam-secvio";
			interrupts = <0 20 0x04>;
			secvio_src = <0x8000001d>;
			jtag-tamper = "disabled";
			watchdog-tamper = "enabled";
			internal-boot-tamper = "enabled";
			external-pin-tamper = "disabled";
		};

		gpu: gpu@01800000 {
			compatible = "fsl,imx6sx-gpu", "fsl,imx6q-gpu";
			reg = <0x01800000 0x4000>, <0x80000000 0x0>,
				<0x0 0x8000000>;
			reg-names = "iobase_3d", "phys_baseaddr", "contiguous_mem";
			interrupts = ;
			interrupt-names = "irq_3d";
			clocks = <&clks IMX6SX_CLK_GPU_AXI_PODF>, <&clks IMX6SX_CLK_GPU>,
				<&clks 0>;
			clock-names = "gpu3d_axi_clk", "gpu3d_clk",
				"gpu3d_shader_clk";
			resets = <&src 0>;
			reset-names = "gpu3d";
			power-domains = <&gpc 1>;
		};

		gpmi: gpmi-nand@01806000{
			compatible = "fsl,imx6sx-gpmi-nand";
			#address-cells = <1>;
			#size-cells = <1>;
			reg = <0x01806000 0x2000>, <0x01808000 0x4000>;
			reg-names = "gpmi-nand", "bch";
			interrupts = ;
			interrupt-names = "bch";
			clocks = <&clks IMX6SX_CLK_GPMI_IO>,
				 <&clks IMX6SX_CLK_GPMI_APB>,
				 <&clks IMX6SX_CLK_GPMI_BCH>,
				 <&clks IMX6SX_CLK_GPMI_BCH_APB>,
				 <&clks IMX6SX_CLK_PER1_BCH>;
			clock-names = "gpmi_io", "gpmi_apb", "gpmi_bch",
				      "gpmi_bch_apb", "per1_bch";
			dmas = <&dma_apbh 0>;
			dma-names = "rx-tx";
			status = "disabled";
		};

		aips1: aips-bus@02000000 {
			compatible = "fsl,aips-bus", "simple-bus";
			#address-cells = <1>;
			#size-cells = <1>;
			reg = <0x02000000 0x100000>;
			ranges;

			spba-bus@02000000 {
				compatible = "fsl,spba-bus", "simple-bus";
				#address-cells = <1>;
				#size-cells = <1>;
				reg = <0x02000000 0x40000>;
				ranges;

				spdif: spdif@02004000 {
					compatible = "fsl,imx6sx-spdif", "fsl,imx35-spdif";
					reg = <0x02004000 0x4000>;
					interrupts = ;
					dmas = <&sdma 14 18 0>,
					       <&sdma 15 18 0>;
					dma-names = "rx", "tx";
					clocks = <&clks IMX6SX_CLK_SPDIF_GCLK>,
						 <&clks IMX6SX_CLK_OSC>,
						 <&clks IMX6SX_CLK_SPDIF>,
						 <&clks 0>, <&clks 0>, <&clks 0>,
						 <&clks IMX6SX_CLK_IPG>,
						 <&clks 0>, <&clks 0>,
						 <&clks IMX6SX_CLK_SPBA>;
					clock-names = "core", "rxtx0",
						      "rxtx1", "rxtx2",
						      "rxtx3", "rxtx4",
						      "rxtx5", "rxtx6",
						      "rxtx7", "dma";
					status = "disabled";
				};

				ecspi1: ecspi@02008000 {
					#address-cells = <1>;
					#size-cells = <0>;
					compatible = "fsl,imx6sx-ecspi", "fsl,imx51-ecspi";
					reg = <0x02008000 0x4000>;
					interrupts = ;
					clocks = <&clks IMX6SX_CLK_ECSPI1>,
						 <&clks IMX6SX_CLK_ECSPI1>;
					clock-names = "ipg", "per";
					dmas = <&sdma 3 7 1>, <&sdma 4 7 2>;
					dma-names = "rx", "tx";
					status = "disabled";
				};

				ecspi2: ecspi@0200c000 {
					#address-cells = <1>;
					#size-cells = <0>;
					compatible = "fsl,imx6sx-ecspi", "fsl,imx51-ecspi";
					reg = <0x0200c000 0x4000>;
					interrupts = ;
					clocks = <&clks IMX6SX_CLK_ECSPI2>,
						 <&clks IMX6SX_CLK_ECSPI2>;
					clock-names = "ipg", "per";
					dmas = <&sdma 5 7 1>, <&sdma 6 7 2>;
					dma-names = "rx", "tx";
					status = "disabled";
				};

				ecspi3: ecspi@02010000 {
					#address-cells = <1>;
					#size-cells = <0>;
					compatible = "fsl,imx6sx-ecspi", "fsl,imx51-ecspi";
					reg = <0x02010000 0x4000>;
					interrupts = ;
					clocks = <&clks IMX6SX_CLK_ECSPI3>,
						 <&clks IMX6SX_CLK_ECSPI3>;
					clock-names = "ipg", "per";
					dmas = <&sdma 7 7 1>, <&sdma 8 7 2>;
					dma-names = "rx", "tx";
					status = "disabled";
				};

				ecspi4: ecspi@02014000 {
					#address-cells = <1>;
					#size-cells = <0>;
					compatible = "fsl,imx6sx-ecspi", "fsl,imx51-ecspi";
					reg = <0x02014000 0x4000>;
					interrupts = ;
					clocks = <&clks IMX6SX_CLK_ECSPI4>,
						 <&clks IMX6SX_CLK_ECSPI4>;
					clock-names = "ipg", "per";
					dmas = <&sdma 9 7 1>, <&sdma 10 7 2>;
					dma-names = "rx", "tx";
					status = "disabled";
				};

				uart1: serial@02020000 {
					compatible = "fsl,imx6sx-uart",
						     "fsl,imx6q-uart", "fsl,imx21-uart";
					reg = <0x02020000 0x4000>;
					interrupts = ;
					clocks = <&clks IMX6SX_CLK_UART_IPG>,
						 <&clks IMX6SX_CLK_UART_SERIAL>;
					clock-names = "ipg", "per";
					dmas = <&sdma 25 4 0>, <&sdma 26 4 0>;
					dma-names = "rx", "tx";
					status = "disabled";
				};

				esai: esai@02024000 {
					compatible = "fsl,imx35-esai";
					reg = <0x02024000 0x4000>;
					interrupts = ;
					clocks = <&clks IMX6SX_CLK_ESAI_IPG>,
						 <&clks IMX6SX_CLK_ESAI_MEM>,
						 <&clks IMX6SX_CLK_ESAI_EXTAL>,
						 <&clks IMX6SX_CLK_ESAI_IPG>,
						 <&clks IMX6SX_CLK_SPBA>;
					clock-names = "core", "mem", "extal",
						      "fsys", "dma";
					dmas = <&sdma 23 21 0>,
					       <&sdma 24 21 0>;
					dma-names = "rx", "tx";
					status = "disabled";
				};

				ssi1: ssi@02028000 {
					#sound-dai-cells = <0>;
					compatible = "fsl,imx6sx-ssi", "fsl,imx51-ssi";
					reg = <0x02028000 0x4000>;
					interrupts = ;
					clocks = <&clks IMX6SX_CLK_SSI1_IPG>,
						 <&clks IMX6SX_CLK_SSI1>;
					clock-names = "ipg", "baud";
					dmas = <&sdma 37 22 0>, <&sdma 38 22 0>;
					dma-names = "rx", "tx";
					fsl,fifo-depth = <15>;
					status = "disabled";
				};

				ssi2: ssi@0202c000 {
					#sound-dai-cells = <0>;
					compatible = "fsl,imx6sx-ssi", "fsl,imx51-ssi";
					reg = <0x0202c000 0x4000>;
					interrupts = ;
					clocks = <&clks IMX6SX_CLK_SSI2_IPG>,
						 <&clks IMX6SX_CLK_SSI2>;
					clock-names = "ipg", "baud";
					dmas = <&sdma 41 22 0>, <&sdma 42 22 0>;
					dma-names = "rx", "tx";
					fsl,fifo-depth = <15>;
					status = "disabled";
				};

				ssi3: ssi@02030000 {
					#sound-dai-cells = <0>;
					compatible = "fsl,imx6sx-ssi", "fsl,imx51-ssi";
					reg = <0x02030000 0x4000>;
					interrupts = ;
					clocks = <&clks IMX6SX_CLK_SSI3_IPG>,
						 <&clks IMX6SX_CLK_SSI3>;
					clock-names = "ipg", "baud";
					dmas = <&sdma 45 22 0>, <&sdma 46 22 0>;
					dma-names = "rx", "tx";
					fsl,fifo-depth = <15>;
					status = "disabled";
				};

				asrc: asrc@02034000 {
					compatible = "fsl,imx53-asrc";
					reg = <0x02034000 0x4000>;
					interrupts = ;
					clocks = <&clks IMX6SX_CLK_ASRC_IPG>,
						<&clks IMX6SX_CLK_ASRC_MEM>, <&clks 0>,
						<&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>,
						<&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>,
						<&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>,
						<&clks IMX6SX_CLK_SPDIF>, <&clks 0>, <&clks 0>,
						<&clks IMX6SX_CLK_SPBA>;
					clock-names = "mem", "ipg", "asrck_0",
						"asrck_1", "asrck_2", "asrck_3", "asrck_4",
						"asrck_5", "asrck_6", "asrck_7", "asrck_8",
						"asrck_9", "asrck_a", "asrck_b", "asrck_c",
						"asrck_d", "asrck_e", "asrck_f", "dma";
					dmas = <&sdma 17 23 1>, <&sdma 18 23 1>, <&sdma 19 23 1>,
						<&sdma 20 23 1>, <&sdma 21 23 1>, <&sdma 22 23 1>;
					dma-names = "rxa", "rxb", "rxc",
						    "txa", "txb", "txc";
					fsl,asrc-rate  = <48000>;
					fsl,asrc-width = <16>;
					status = "okay";
				};
			};

			pwm1: pwm@02080000 {
				compatible = "fsl,imx6sx-pwm", "fsl,imx27-pwm";
				reg = <0x02080000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_PWM1>,
					 <&clks IMX6SX_CLK_PWM1>;
				clock-names = "ipg", "per";
				#pwm-cells = <2>;
			};

			pwm2: pwm@02084000 {
				compatible = "fsl,imx6sx-pwm", "fsl,imx27-pwm";
				reg = <0x02084000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_PWM2>,
					 <&clks IMX6SX_CLK_PWM2>;
				clock-names = "ipg", "per";
				#pwm-cells = <2>;
			};

			pwm3: pwm@02088000 {
				compatible = "fsl,imx6sx-pwm", "fsl,imx27-pwm";
				reg = <0x02088000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_PWM3>,
					 <&clks IMX6SX_CLK_PWM3>;
				clock-names = "ipg", "per";
				#pwm-cells = <2>;
			};

			pwm4: pwm@0208c000 {
				compatible = "fsl,imx6sx-pwm", "fsl,imx27-pwm";
				reg = <0x0208c000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_PWM4>,
					 <&clks IMX6SX_CLK_PWM4>;
				clock-names = "ipg", "per";
				#pwm-cells = <2>;
			};

			flexcan1: can@02090000 {
				compatible = "fsl,imx6sx-flexcan", "fsl,imx6q-flexcan";
				reg = <0x02090000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_CAN1_IPG>,
					 <&clks IMX6SX_CLK_CAN1_SERIAL>;
				clock-names = "ipg", "per";
				stop-mode = <&gpr 0x10 1 0x10 17>;
				status = "disabled";
			};

			flexcan2: can@02094000 {
				compatible = "fsl,imx6sx-flexcan", "fsl,imx6q-flexcan";
				reg = <0x02094000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_CAN2_IPG>,
					 <&clks IMX6SX_CLK_CAN2_SERIAL>;
				clock-names = "ipg", "per";
				stop-mode = <&gpr 0x10 2 0x10 18>;
				status = "disabled";
			};

			gpt: gpt@02098000 {
				compatible = "fsl,imx6sx-gpt", "fsl,imx31-gpt";
				reg = <0x02098000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_GPT_BUS>,
					 <&clks IMX6SX_CLK_GPT_3M>;
				clock-names = "ipg", "per";
			};

			gpio1: gpio@0209c000 {
				compatible = "fsl,imx6sx-gpio", "fsl,imx35-gpio";
				reg = <0x0209c000 0x4000>;
				interrupts = ,
					     ;
				gpio-controller;
				#gpio-cells = <2>;
				interrupt-controller;
				#interrupt-cells = <2>;
			};

			gpio2: gpio@020a0000 {
				compatible = "fsl,imx6sx-gpio", "fsl,imx35-gpio";
				reg = <0x020a0000 0x4000>;
				interrupts = ,
					     ;
				gpio-controller;
				#gpio-cells = <2>;
				interrupt-controller;
				#interrupt-cells = <2>;
			};

			gpio3: gpio@020a4000 {
				compatible = "fsl,imx6sx-gpio", "fsl,imx35-gpio";
				reg = <0x020a4000 0x4000>;
				interrupts = ,
					     ;
				gpio-controller;
				#gpio-cells = <2>;
				interrupt-controller;
				#interrupt-cells = <2>;
			};

			gpio4: gpio@020a8000 {
				compatible = "fsl,imx6sx-gpio", "fsl,imx35-gpio";
				reg = <0x020a8000 0x4000>;
				interrupts = ,
					     ;
				gpio-controller;
				#gpio-cells = <2>;
				interrupt-controller;
				#interrupt-cells = <2>;
			};

			gpio5: gpio@020ac000 {
				compatible = "fsl,imx6sx-gpio", "fsl,imx35-gpio";
				reg = <0x020ac000 0x4000>;
				interrupts = ,
					     ;
				gpio-controller;
				#gpio-cells = <2>;
				interrupt-controller;
				#interrupt-cells = <2>;
			};

			gpio6: gpio@020b0000 {
				compatible = "fsl,imx6sx-gpio", "fsl,imx35-gpio";
				reg = <0x020b0000 0x4000>;
				interrupts = ,
					     ;
				gpio-controller;
				#gpio-cells = <2>;
				interrupt-controller;
				#interrupt-cells = <2>;
			};

			gpio7: gpio@020b4000 {
				compatible = "fsl,imx6sx-gpio", "fsl,imx35-gpio";
				reg = <0x020b4000 0x4000>;
				interrupts = ,
					     ;
				gpio-controller;
				#gpio-cells = <2>;
				interrupt-controller;
				#interrupt-cells = <2>;
			};

			mqs: mqs {
				compatible = "fsl,imx6sx-mqs";
				gpr = <&gpr>;
				status = "disabled";
			};

			kpp: kpp@020b8000 {
				compatible = "fsl,imx6sx-kpp", "fsl,imx21-kpp";
				reg = <0x020b8000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_DUMMY>;
				status = "disabled";
			};

			wdog1: wdog@020bc000 {
				compatible = "fsl,imx6sx-wdt", "fsl,imx21-wdt";
				reg = <0x020bc000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_DUMMY>;
			};

			wdog2: wdog@020c0000 {
				compatible = "fsl,imx6sx-wdt", "fsl,imx21-wdt";
				reg = <0x020c0000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_DUMMY>;
				status = "disabled";
			};

			clks: ccm@020c4000 {
				compatible = "fsl,imx6sx-ccm";
				reg = <0x020c4000 0x4000>;
				interrupts = ,
					     ;
				#clock-cells = <1>;
				clocks = <&ckil>, <&osc>, <&ipp_di0>, <&ipp_di1>;
				clock-names = "ckil", "osc", "ipp_di0", "ipp_di1";
			};

			anatop: anatop@020c8000 {
				compatible = "fsl,imx6sx-anatop", "fsl,imx6q-anatop",
					     "syscon", "simple-bus";
				reg = <0x020c8000 0x1000>;
				interrupts = ,
					     ,
					     ;

				regulator-1p1@110 {
					compatible = "fsl,anatop-regulator";
					regulator-name = "vdd1p1";
					regulator-min-microvolt = <800000>;
					regulator-max-microvolt = <1375000>;
					regulator-always-on;
					anatop-reg-offset = <0x110>;
					anatop-vol-bit-shift = <8>;
					anatop-vol-bit-width = <5>;
					anatop-min-bit-val = <4>;
					anatop-min-voltage = <800000>;
					anatop-max-voltage = <1375000>;
					anatop-enable-bit = <0>;
				};

				reg_3p0: regulator-3p0@120 {
					compatible = "fsl,anatop-regulator";
					regulator-name = "vdd3p0";
					regulator-min-microvolt = <2625000>;
					regulator-max-microvolt = <3400000>;
					anatop-reg-offset = <0x120>;
					anatop-vol-bit-shift = <8>;
					anatop-vol-bit-width = <5>;
					anatop-min-bit-val = <0>;
					anatop-min-voltage = <2625000>;
					anatop-max-voltage = <3400000>;
					anatop-enable-bit = <0>;
				};

				regulator-2p5@130 {
					compatible = "fsl,anatop-regulator";
					regulator-name = "vdd2p5";
					regulator-min-microvolt = <2100000>;
					regulator-max-microvolt = <2875000>;
					regulator-always-on;
					anatop-reg-offset = <0x130>;
					anatop-vol-bit-shift = <8>;
					anatop-vol-bit-width = <5>;
					anatop-min-bit-val = <0>;
					anatop-min-voltage = <2100000>;
					anatop-max-voltage = <2875000>;
					anatop-enable-bit = <0>;
				};

				reg_arm: regulator-vddcore@140 {
					compatible = "fsl,anatop-regulator";
					regulator-name = "vddarm";
					regulator-min-microvolt = <725000>;
					regulator-max-microvolt = <1450000>;
					regulator-always-on;
					anatop-reg-offset = <0x140>;
					anatop-vol-bit-shift = <0>;
					anatop-vol-bit-width = <5>;
					anatop-delay-reg-offset = <0x170>;
					anatop-delay-bit-shift = <24>;
					anatop-delay-bit-width = <2>;
					anatop-min-bit-val = <1>;
					anatop-min-voltage = <725000>;
					anatop-max-voltage = <1450000>;
				};

				reg_pcie_phy: regulator-vddpcie-phy@140 {
					compatible = "fsl,anatop-regulator";
					regulator-name = "vddpcie-phy";
					regulator-min-microvolt = <725000>;
					regulator-max-microvolt = <1450000>;
					anatop-reg-offset = <0x140>;
					anatop-vol-bit-shift = <9>;
					anatop-vol-bit-width = <5>;
					anatop-delay-reg-offset = <0x170>;
					anatop-delay-bit-shift = <26>;
					anatop-delay-bit-width = <2>;
					anatop-min-bit-val = <1>;
					anatop-min-voltage = <725000>;
					anatop-max-voltage = <1450000>;
				};

				reg_soc: regulator-vddsoc@140 {
					compatible = "fsl,anatop-regulator";
					regulator-name = "vddsoc";
					regulator-min-microvolt = <725000>;
					regulator-max-microvolt = <1450000>;
					regulator-always-on;
					anatop-reg-offset = <0x140>;
					anatop-vol-bit-shift = <18>;
					anatop-vol-bit-width = <5>;
					anatop-delay-reg-offset = <0x170>;
					anatop-delay-bit-shift = <28>;
					anatop-delay-bit-width = <2>;
					anatop-min-bit-val = <1>;
					anatop-min-voltage = <725000>;
					anatop-max-voltage = <1450000>;
				};
			};

			tempmon: tempmon {
				compatible = "fsl,imx6sx-tempmon", "fsl,imx6q-tempmon";
				interrupts = ;
				fsl,tempmon = <&anatop>;
				fsl,tempmon-data = <&ocotp>;
				clocks = <&clks IMX6SX_CLK_PLL3_USB_OTG>;
			};

			usbphy1: usbphy@020c9000 {
				compatible = "fsl,imx6sx-usbphy", "fsl,imx23-usbphy";
				reg = <0x020c9000 0x1000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_USBPHY1>;
				phy-3p0-supply = <®_3p0>;
				fsl,anatop = <&anatop>;
			};

			usbphy2: usbphy@020ca000 {
				compatible = "fsl,imx6sx-usbphy", "fsl,imx23-usbphy";
				reg = <0x020ca000 0x1000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_USBPHY2>;
				phy-3p0-supply = <®_3p0>;
				fsl,anatop = <&anatop>;
			};

			usbphy_nop1: usbphy_nop1 {
				compatible = "usb-nop-xceiv";
				clocks = <&clks IMX6SX_CLK_USBPHY1>;
				clock-names = "main_clk";
			};

			caam_snvs: caam-snvs@020cc000 {
				compatible = "fsl,imx6q-caam-snvs";
				reg = <0x020cc000 0x4000>;
			};

			snvs: snvs@020cc000 {
				compatible = "fsl,sec-v4.0-mon", "syscon", "simple-mfd";
				reg = <0x020cc000 0x4000>;

				snvs_rtc: snvs-rtc-lp {
					compatible = "fsl,sec-v4.0-mon-rtc-lp";
					regmap = <&snvs>;
					offset = <0x34>;
					interrupts = , ;
				};

				snvs_poweroff: snvs-poweroff {
					compatible = "syscon-poweroff";
					regmap = <&snvs>;
					offset = <0x38>;
					mask = <0x61>;
					status = "disabled";
				};

				snvs_pwrkey: snvs-powerkey {
					compatible = "fsl,sec-v4.0-pwrkey";
					regmap = <&snvs>;
					interrupts = ;
					linux,keycode = ;
					wakeup;
				};
			};

			epit1: epit@020d0000 {
				reg = <0x020d0000 0x4000>;
				interrupts = ;
			};

			epit2: epit@020d4000 {
				reg = <0x020d4000 0x4000>;
				interrupts = ;
			};

			src: src@020d8000 {
				compatible = "fsl,imx6sx-src", "fsl,imx51-src";
				reg = <0x020d8000 0x4000>;
				interrupts = ,
					     ;
				#reset-cells = <1>;
			};

			gpc: gpc@020dc000 {
				compatible = "fsl,imx6sx-gpc", "fsl,imx6q-gpc";
				reg = <0x020dc000 0x4000>;
				interrupt-controller;
				#interrupt-cells = <3>;
				interrupts = ;
				interrupt-parent = <&intc>;
				fsl,mf-mix-wakeup-irq = <0x7c00000 0x3d00 0x0 0x400240>;
				clocks = <&clks IMX6SX_CLK_GPU>, <&clks IMX6SX_CLK_IPG>,
					<&clks IMX6SX_CLK_PXP_AXI>, <&clks IMX6SX_CLK_DISPLAY_AXI>,
					<&clks IMX6SX_CLK_LCDIF1_PIX>, <&clks IMX6SX_CLK_LCDIF_APB>,
					<&clks IMX6SX_CLK_LCDIF2_PIX>, <&clks IMX6SX_CLK_CSI>,
					<&clks IMX6SX_CLK_VADC>;
				clock-names = "gpu3d_core", "ipg", "pxp_axi", "disp_axi", "lcdif1_pix",
						"lcdif_axi", "lcdif2_pix", "csi_mclk";
				pcie-phy-supply = <®_pcie_phy>;
				#power-domain-cells = <1>;
			};

			iomuxc: iomuxc@020e0000 {
				compatible = "fsl,imx6sx-iomuxc";
				reg = <0x020e0000 0x4000>;
			};

			gpr: iomuxc-gpr@020e4000 {
				compatible = "fsl,imx6sx-iomuxc-gpr",
					     "fsl,imx6q-iomuxc-gpr", "syscon";
				reg = <0x020e4000 0x4000>;
			};

			ldb: ldb@020e0014 {
				#address-cells = <1>;
				#size-cells = <0>;
				compatible = "fsl,imx6sx-ldb", "fsl,imx53-ldb";
				gpr = <&gpr>;
				status = "disabled";
				clocks = <&clks IMX6SX_CLK_LDB_DI0>,
					 <&clks IMX6SX_CLK_LCDIF1_SEL>,
					 <&clks IMX6SX_CLK_LCDIF2_SEL>,
					 <&clks IMX6SX_CLK_LDB_DI0_DIV_3_5>,
					 <&clks IMX6SX_CLK_LDB_DI0_DIV_7>,
					 <&clks IMX6SX_CLK_LDB_DI0_DIV_SEL>;
				clock-names = "ldb_di0",
					      "di0_sel",
					      "di1_sel",
					      "ldb_di0_div_3_5",
					      "ldb_di0_div_7",
					      "ldb_di0_div_sel";
				lvds-channel@0 {
					reg = <0>;
					status = "disabled";
				};
			};

			sdma: sdma@020ec000 {
				compatible = "fsl,imx6sx-sdma", "fsl,imx35-sdma";
				reg = <0x020ec000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_SDMA>,
					 <&clks IMX6SX_CLK_SDMA>;
				clock-names = "ipg", "ahb";
				#dma-cells = <3>;
				/* imx6sx reuses imx6q sdma firmware */
				fsl,sdma-ram-script-name = "imx/sdma/sdma-imx6q.bin";
			};
		};

		aips2: aips-bus@02100000 {
			compatible = "fsl,aips-bus", "simple-bus";
			#address-cells = <1>;
			#size-cells = <1>;
			reg = <0x02100000 0x100000>;
			ranges;

			crypto: caam@2100000 {
				compatible = "fsl,sec-v4.0";
				#address-cells = <1>;
				#size-cells = <1>;
				reg = <0x2100000 0x40000>;
				ranges = <0 0x2100000 0x40000>;
				clocks = <&clks IMX6SX_CLK_CAAM_MEM>, <&clks IMX6SX_CLK_CAAM_ACLK>,
				         <&clks IMX6SX_CLK_CAAM_IPG> ,<&clks IMX6SX_CLK_EIM_SLOW>;
				clock-names = "caam_mem", "caam_aclk", "caam_ipg", "caam_emi_slow";

				sec_jr0: jr0@1000 {
					compatible = "fsl,sec-v4.0-job-ring";
					reg = <0x1000 0x1000>;
					interrupts = ;
				};

				sec_jr1: jr1@2000 {
					compatible = "fsl,sec-v4.0-job-ring";
					reg = <0x2000 0x1000>;
					interrupts = ;
				};
			};

			usbotg1: usb@02184000 {
				compatible = "fsl,imx6sx-usb", "fsl,imx27-usb";
				reg = <0x02184000 0x200>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_USBOH3>;
				fsl,usbphy = <&usbphy1>;
				fsl,usbmisc = <&usbmisc 0>;
				fsl,anatop = <&anatop>;
				ahb-burst-config = <0x0>;
				tx-burst-size-dword = <0x10>;
				rx-burst-size-dword = <0x10>;
				status = "disabled";
			};

			usbotg2: usb@02184200 {
				compatible = "fsl,imx6sx-usb", "fsl,imx27-usb";
				reg = <0x02184200 0x200>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_USBOH3>;
				fsl,usbphy = <&usbphy2>;
				fsl,usbmisc = <&usbmisc 1>;
				ahb-burst-config = <0x0>;
				tx-burst-size-dword = <0x10>;
				rx-burst-size-dword = <0x10>;
				status = "disabled";
			};

			usbh: usb@02184400 {
				compatible = "fsl,imx6sx-usb", "fsl,imx27-usb";
				reg = <0x02184400 0x200>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_USBOH3>;
				fsl,usbmisc = <&usbmisc 2>;
				phy_type = "hsic";
				fsl,usbphy = <&usbphy_nop1>;
				fsl,anatop = <&anatop>;
				dr_mode = "host";
				ahb-burst-config = <0x0>;
				tx-burst-size-dword = <0x10>;
				rx-burst-size-dword = <0x10>;
				status = "disabled";
			};

			usbmisc: usbmisc@02184800 {
				#index-cells = <1>;
				compatible = "fsl,imx6sx-usbmisc", "fsl,imx6q-usbmisc";
				reg = <0x02184800 0x200>;
				clocks = <&clks IMX6SX_CLK_USBOH3>;
			};

			fec1: ethernet@02188000 {
				compatible = "fsl,imx6sx-fec", "fsl,imx6q-fec";
				reg = <0x02188000 0x4000>;
				interrupts = ,
					     ;
				clocks = <&clks IMX6SX_CLK_ENET>,
					 <&clks IMX6SX_CLK_ENET_AHB>,
					 <&clks IMX6SX_CLK_ENET_PTP>,
					 <&clks IMX6SX_CLK_ENET_REF>,
					 <&clks IMX6SX_CLK_ENET_PTP>;
				clock-names = "ipg", "ahb", "ptp",
					      "enet_clk_ref", "enet_out";
				fsl,num-tx-queues=<3>;
				fsl,num-rx-queues=<3>;
				stop-mode = <&gpr 0x10 3>;
				fsl,wakeup_irq = <0>;
				status = "disabled";
                        };

			mlb: mlb@0218c000 {
				compatible = "fsl,imx6sx-mlb50";
				reg = <0x0218c000 0x4000>;
				interrupts = ,
					     ,
					     ;
				clocks = <&clks IMX6SX_CLK_MLB>;
				clock-names = "mlb";
				iram = <&ocram>;
				status = "disabled";
			};

			usdhc1: usdhc@02190000 {
				compatible = "fsl,imx6sx-usdhc", "fsl,imx6sl-usdhc";
				reg = <0x02190000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_USDHC1>,
					 <&clks IMX6SX_CLK_USDHC1>,
					 <&clks IMX6SX_CLK_USDHC1>;
				clock-names = "ipg", "ahb", "per";
				bus-width = <4>;
				status = "disabled";
			};

			usdhc2: usdhc@02194000 {
				compatible = "fsl,imx6sx-usdhc", "fsl,imx6sl-usdhc";
				reg = <0x02194000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_USDHC2>,
					 <&clks IMX6SX_CLK_USDHC2>,
					 <&clks IMX6SX_CLK_USDHC2>;
				clock-names = "ipg", "ahb", "per";
				bus-width = <4>;
				status = "disabled";
			};

			usdhc3: usdhc@02198000 {
				compatible = "fsl,imx6sx-usdhc", "fsl,imx6sl-usdhc";
				reg = <0x02198000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_USDHC3>,
					 <&clks IMX6SX_CLK_USDHC3>,
					 <&clks IMX6SX_CLK_USDHC3>;
				clock-names = "ipg", "ahb", "per";
				bus-width = <4>;
				status = "disabled";
			};

			usdhc4: usdhc@0219c000 {
				compatible = "fsl,imx6sx-usdhc", "fsl,imx6sl-usdhc";
				reg = <0x0219c000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_USDHC4>,
					 <&clks IMX6SX_CLK_USDHC4>,
					 <&clks IMX6SX_CLK_USDHC4>;
				clock-names = "ipg", "ahb", "per";
				bus-width = <4>;
				status = "disabled";
			};

			i2c1: i2c@021a0000 {
				#address-cells = <1>;
				#size-cells = <0>;
				compatible = "fsl,imx6sx-i2c", "fsl,imx21-i2c";
				reg = <0x021a0000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_I2C1>;
				status = "disabled";
			};

			i2c2: i2c@021a4000 {
				#address-cells = <1>;
				#size-cells = <0>;
				compatible = "fsl,imx6sx-i2c", "fsl,imx21-i2c";
				reg = <0x021a4000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_I2C2>;
				status = "disabled";
			};

			i2c3: i2c@021a8000 {
				#address-cells = <1>;
				#size-cells = <0>;
				compatible = "fsl,imx6sx-i2c", "fsl,imx21-i2c";
				reg = <0x021a8000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_I2C3>;
				status = "disabled";
			};

			mmdc: mmdc@021b0000 {
				compatible = "fsl,imx6sx-mmdc", "fsl,imx6q-mmdc";
				reg = <0x021b0000 0x4000>;
			};

			fec2: ethernet@021b4000 {
				compatible = "fsl,imx6sx-fec", "fsl,imx6q-fec";
				reg = <0x021b4000 0x4000>;
				interrupts = ,
					     ;
				clocks = <&clks IMX6SX_CLK_ENET>,
					 <&clks IMX6SX_CLK_ENET_AHB>,
					 <&clks IMX6SX_CLK_ENET_PTP>,
					 <&clks IMX6SX_CLK_ENET2_REF_125M>,
					 <&clks IMX6SX_CLK_ENET_PTP>;
				clock-names = "ipg", "ahb", "ptp",
					      "enet_clk_ref", "enet_out";
				fsl,num-tx-queues=<3>;
				fsl,num-rx-queues=<3>;
				stop-mode = <&gpr 0x10 4>;
				fsl,wakeup_irq = <0>;
				status = "disabled";
			};

			weim: weim@021b8000 {
				compatible = "fsl,imx6sx-weim", "fsl,imx6q-weim";
				reg = <0x021b8000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_EIM_SLOW>;
			};

			ocotp: ocotp@021bc000 {
				compatible = "fsl,imx6sx-ocotp", "fsl,imx6q-ocotp", "syscon";
				reg = <0x021bc000 0x4000>;
				clocks = <&clks IMX6SX_CLK_OCOTP>;
			};

			romcp@021ac000 {
					compatible = "fsl,imx6sx-romcp", "syscon";
					reg = <0x021ac000 0x4000>;
			};

			sai1: sai@021d4000 {
				compatible = "fsl,imx6sx-sai";
				reg = <0x021d4000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_SAI1_IPG>,
					 <&clks IMX6SX_CLK_DUMMY>,
					 <&clks IMX6SX_CLK_SAI1>,
					 <&clks 0>, <&clks 0>;
				clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3";
				dma-names = "rx", "tx";
				dmas = <&sdma 31 24 0>, <&sdma 32 24 0>;
				dma-source = <&gpr 0 15 0 16>;
				status = "disabled";
			};

			audmux: audmux@021d8000 {
				compatible = "fsl,imx6sx-audmux", "fsl,imx31-audmux";
				reg = <0x021d8000 0x4000>;
				status = "disabled";
			};

			sai2: sai@021dc000 {
				compatible = "fsl,imx6sx-sai";
				reg = <0x021dc000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_SAI2_IPG>,
					 <&clks IMX6SX_CLK_DUMMY>,
					 <&clks IMX6SX_CLK_SAI2>,
					 <&clks 0>, <&clks 0>;
				clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3";
				dma-names = "rx", "tx";
				dmas = <&sdma 33 23 0>, <&sdma 34 23 0>;
				dma-source = <&gpr 0 17 0 18>;
				status = "disabled";
			};

			qspi1: qspi@021e0000 {
				#address-cells = <1>;
				#size-cells = <0>;
				compatible = "fsl,imx6sx-qspi";
				reg = <0x021e0000 0x4000>, <0x60000000 0x10000000>;
				reg-names = "QuadSPI", "QuadSPI-memory";
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_QSPI1>,
					 <&clks IMX6SX_CLK_QSPI1>;
				clock-names = "qspi_en", "qspi";
				status = "disabled";
			};

			qspi2: qspi@021e4000 {
				#address-cells = <1>;
				#size-cells = <0>;
				compatible = "fsl,imx6sx-qspi";
				reg = <0x021e4000 0x4000>, <0x70000000 0x10000000>;
				reg-names = "QuadSPI", "QuadSPI-memory";
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_QSPI2>,
					 <&clks IMX6SX_CLK_QSPI2>;
				clock-names = "qspi_en", "qspi";
				status = "disabled";
			};

			qspi_m4: qspi-m4 {
				compatible = "fsl,imx6sx-qspi-m4-restore";
				reg = <0x021e4000 0x4000>;
				status = "disabled";
			};

			uart2: serial@021e8000 {
				compatible = "fsl,imx6sx-uart",
					     "fsl,imx6q-uart", "fsl,imx21-uart";
				reg = <0x021e8000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_UART_IPG>,
					 <&clks IMX6SX_CLK_UART_SERIAL>;
				clock-names = "ipg", "per";
				dmas = <&sdma 27 4 0>, <&sdma 28 4 0>;
				dma-names = "rx", "tx";
				status = "disabled";
			};

			uart3: serial@021ec000 {
				compatible = "fsl,imx6sx-uart",
					     "fsl,imx6q-uart", "fsl,imx21-uart";
				reg = <0x021ec000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_UART_IPG>,
					 <&clks IMX6SX_CLK_UART_SERIAL>;
				clock-names = "ipg", "per";
				dmas = <&sdma 29 4 0>, <&sdma 30 4 0>;
				dma-names = "rx", "tx";
				status = "disabled";
			};

			uart4: serial@021f0000 {
				compatible = "fsl,imx6sx-uart",
					     "fsl,imx6q-uart", "fsl,imx21-uart";
				reg = <0x021f0000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_UART_IPG>,
					 <&clks IMX6SX_CLK_UART_SERIAL>;
				clock-names = "ipg", "per";
				dmas = <&sdma 31 4 0>, <&sdma 32 4 0>;
				dma-names = "rx", "tx";
				status = "disabled";
			};

			uart5: serial@021f4000 {
				compatible = "fsl,imx6sx-uart",
					     "fsl,imx6q-uart", "fsl,imx21-uart";
				reg = <0x021f4000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_UART_IPG>,
					 <&clks IMX6SX_CLK_UART_SERIAL>;
				clock-names = "ipg", "per";
				dmas = <&sdma 33 4 0>, <&sdma 34 4 0>;
				dma-names = "rx", "tx";
				status = "disabled";
			};

			i2c4: i2c@021f8000 {
				#address-cells = <1>;
				#size-cells = <0>;
				compatible = "fsl,imx6sx-i2c", "fsl,imx21-i2c";
				reg = <0x021f8000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_I2C4>;
				status = "disabled";
			};

			qosc: qosc@021fc000 {
				compatible = "fsl,imx6sx-qosc";
				reg = <0x021fc000 0x4000>;
			};
		};

		aips3: aips-bus@02200000 {
			compatible = "fsl,aips-bus", "simple-bus";
			#address-cells = <1>;
			#size-cells = <1>;
			reg = <0x02200000 0x100000>;
			ranges;

			spba-bus@02200000 {
				compatible = "fsl,spba-bus", "simple-bus";
				#address-cells = <1>;
				#size-cells = <1>;
				reg = <0x02240000 0x40000>;
				ranges;

				csi1: csi@02214000 {
					compatible = "fsl,imx6s-csi";
					reg = <0x02214000 0x4000>;
					interrupts = ;
					clocks = <&clks IMX6SX_CLK_DISPLAY_AXI>,
						 <&clks IMX6SX_CLK_CSI>,
						 <&clks IMX6SX_CLK_DCIC1>;
					clock-names = "disp-axi", "csi_mclk", "disp_dcic";
					power-domains = <&gpc 2>;
					status = "disabled";
				};

				dcic1: dcic@0220c000 {
					compatible = "fsl,imx6sx-dcic";
					reg = <0x0220c000 0x4000>;
					interrupts = <0 124 IRQ_TYPE_LEVEL_HIGH>;
					clocks = <&clks IMX6SX_CLK_DCIC1>,
						<&clks IMX6SX_CLK_DISPLAY_AXI>;
					clock-names = "dcic", "disp-axi";
					gpr = <&gpr>;
					status = "disabled";
				};

				dcic2: dcic@02210000 {
					compatible = "fsl,imx6sx-dcic";
					reg = <0x02210000 0x4000>;
					interrupts = <0 125 IRQ_TYPE_LEVEL_HIGH>;
					clocks = <&clks IMX6SX_CLK_DCIC2>,
						<&clks IMX6SX_CLK_DISPLAY_AXI>;
					clock-names = "dcic", "disp-axi";
					gpr = <&gpr>;
					status = "disabled";
				};

				pxp: pxp@02218000 {
					compatible = "fsl,imx6sx-pxp-dma", "fsl,imx6sl-pxp-dma", "fsl,imx6dl-pxp-dma";
					reg = <0x02218000 0x4000>;
					interrupts = ;
					clocks = <&clks IMX6SX_CLK_PXP_AXI>,
						 <&clks IMX6SX_CLK_DISPLAY_AXI>;
					clock-names = "pxp-axi", "disp-axi";
					power-domains = <&gpc 2>;
					status = "disabled";
				};

				csi2: csi@0221c000 {
					compatible = "fsl,imx6s-csi";
					reg = <0x0221c000 0x4000>;
					interrupts = ;
					clocks = <&clks IMX6SX_CLK_DISPLAY_AXI>,
						 <&clks IMX6SX_CLK_CSI>,
						 <&clks IMX6SX_CLK_DCIC2>;
					clock-names = "disp-axi", "csi_mclk", "disp_dcic";
					power-domains = <&gpc 2>;
					status = "disabled";
				};

				lcdif1: lcdif@02220000 {
					compatible = "fsl,imx6sx-lcdif", "fsl,imx28-lcdif";
					reg = <0x02220000 0x4000>;
					interrupts = ;
					clocks = <&clks IMX6SX_CLK_LCDIF1_PIX>,
						 <&clks IMX6SX_CLK_LCDIF_APB>,
						 <&clks IMX6SX_CLK_DISPLAY_AXI>;
					clock-names = "pix", "axi", "disp_axi";
					power-domains = <&gpc 2>;
					status = "disabled";
				};

				lcdif2: lcdif@02224000 {
					compatible = "fsl,imx6sx-lcdif", "fsl,imx28-lcdif";
					reg = <0x02224000 0x4000>;
					interrupts = ;
					clocks = <&clks IMX6SX_CLK_LCDIF2_PIX>,
						 <&clks IMX6SX_CLK_LCDIF_APB>,
						 <&clks IMX6SX_CLK_DISPLAY_AXI>;
					clock-names = "pix", "axi", "disp_axi";
					power-domains = <&gpc 2>;
					status = "disabled";
				};

				vadc: vadc@02228000 {
					compatible = "fsl,imx6sx-vadc";
					reg = <0x02228000 0x4000>, <0x0222c000 0x4000>;
					reg-names = "vadc-vafe", "vadc-vdec";
					clocks = <&clks IMX6SX_CLK_VADC>,
						 <&clks IMX6SX_CLK_CSI>;
					clock-names = "vadc", "csi";
					power-domains = <&gpc 2>;
					gpr = <&gpr>;
					status = "disabled";
				};
			};

			adc1: adc@02280000 {
				compatible = "fsl,imx6sx-adc", "fsl,vf610-adc";
				reg = <0x02280000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_IPG>;
				num-channels = <4>;
				clock-names = "adc";
				status = "disabled";
                        };

			adc2: adc@02284000 {
				compatible = "fsl,imx6sx-adc", "fsl,vf610-adc";
				reg = <0x02284000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_IPG>;
				num-channels = <4>;
				clock-names = "adc";
				status = "disabled";
                        };

			wdog3: wdog@02288000 {
				compatible = "fsl,imx6sx-wdt", "fsl,imx21-wdt";
				reg = <0x02288000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_DUMMY>;
				status = "disabled";
			};

			ecspi5: ecspi@0228c000 {
				#address-cells = <1>;
				#size-cells = <0>;
				compatible = "fsl,imx6sx-ecspi", "fsl,imx51-ecspi";
				reg = <0x0228c000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_ECSPI5>,
					 <&clks IMX6SX_CLK_ECSPI5>;
				clock-names = "ipg", "per";
				status = "disabled";
			};

			sema4: sema4@02290000 { /* sema4 */
				compatible = "fsl,imx6sx-sema4";
				reg = <0x02290000 0x4000>;
				interrupts = <0 116 0x04>;
				status = "okay";
			};

			mu: mu@02294000 { /* mu */
				compatible = "fsl,imx6sx-mu";
				reg = <0x02294000 0x4000>;
				interrupts = <0 90 0x04>;
				status = "okay";
			};

			rpmsg: rpmsg{
				compatible = "fsl,imx6sx-rpmsg";
				status = "disabled";
			};

			uart6: serial@022a0000 {
				compatible = "fsl,imx6sx-uart",
					     "fsl,imx6q-uart", "fsl,imx21-uart";
				reg = <0x022a0000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_UART_IPG>,
					 <&clks IMX6SX_CLK_UART_SERIAL>;
				clock-names = "ipg", "per";
				dmas = <&sdma 0 4 0>, <&sdma 47 4 0>;
				dma-names = "rx", "tx";
				status = "disabled";
			};

			pwm5: pwm@022a4000 {
				compatible = "fsl,imx6sx-pwm", "fsl,imx27-pwm";
				reg = <0x022a4000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_PWM5>,
					 <&clks IMX6SX_CLK_PWM5>;
				clock-names = "ipg", "per";
				#pwm-cells = <2>;
			};

			pwm6: pwm@022a8000 {
				compatible = "fsl,imx6sx-pwm", "fsl,imx27-pwm";
				reg = <0x022a8000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_PWM6>,
					 <&clks IMX6SX_CLK_PWM6>;
				clock-names = "ipg", "per";
				#pwm-cells = <2>;
			};

			pwm7: pwm@022ac000 {
				compatible = "fsl,imx6sx-pwm", "fsl,imx27-pwm";
				reg = <0x022ac000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_PWM7>,
					 <&clks IMX6SX_CLK_PWM7>;
				clock-names = "ipg", "per";
				#pwm-cells = <2>;
			};

			pwm8: pwm@0022b0000 {
				compatible = "fsl,imx6sx-pwm", "fsl,imx27-pwm";
				reg = <0x0022b0000 0x4000>;
				interrupts = ;
				clocks = <&clks IMX6SX_CLK_PWM8>,
					 <&clks IMX6SX_CLK_PWM8>;
				clock-names = "ipg", "per";
				#pwm-cells = <2>;
			};
		};

		pcie: pcie@0x08000000 {
			compatible = "fsl,imx6sx-pcie", "snps,dw-pcie";
			reg = <0x08ffc000 0x4000>, <0x08f00000 0x80000>;
			reg-names = "dbi", "config";
			#address-cells = <3>;
			#size-cells = <2>;
			device_type = "pci";
			ranges = <0x81000000 0 0          0x08f80000 0 0x00010000 /* downstream I/O */
				  0x82000000 0 0x08000000 0x08000000 0 0x00f00000>; /* non-prefetchable memory */
			num-lanes = <1>;
			interrupts = ;
			interrupt-names = "msi";
			#interrupt-cells = <1>;
			interrupt-map-mask = <0 0 0 0x7>;
			interrupt-map = <0 0 0 1 &intc GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
			                <0 0 0 2 &intc GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
			                <0 0 0 3 &intc GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
			                <0 0 0 4 &intc GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&clks IMX6SX_CLK_PCIE_AXI>,
				 <&clks IMX6SX_CLK_LVDS1_OUT>,
				 <&clks IMX6SX_CLK_PCIE_REF_125M>,
				 <&clks IMX6SX_CLK_DISPLAY_AXI>;
			clock-names = "pcie", "pcie_bus", "pcie_phy", "pcie_inbound_axi";
			pcie-phy-supply = <®_pcie_phy>;
			power-domains = <&gpc 2>;
			status = "disabled";
		};
	};
};

虽然我们基本上不会从头到尾重写一个.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 所示:
  i.MX6ULL(十三) linux 设备树_第2张图片
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 = ……>

每个“ 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 属性不为空
i.MX6ULL(十三) linux 设备树_第3张图片
7. chosen 子节点
chosen 并不是一个真实的设备, chosen 节点主要是为了 uboot Linux 内核传递数据,重
点是 bootargs 参数。一般 .dts 文件中 chosen 节点通常为空或者内容很少

  uboot 自己在 chosen 节点里面添加了 bootargs 属性!
i.MX6ULL(十三) linux 设备树_第4张图片

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 文件,在里面输入如下所示内容:

i.MX6ULL(十三) linux 设备树_第5张图片

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

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

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

60 };
61 }
62 
63 //aips3 节点 
64 aips3: aips-bus@02200000 {
65 compatible = "fsl,aips-bus", "simple-bus";
66 #address-cells = <1>;
67 #size-cells = <1>;
68 reg = <0x02200000 0x100000>;
69 ranges;
70 
71 //rngb 节点
72 rngb: rngb@02284000 {
73 compatible = "fsl,imx6sl-rng", "fsl,imx-rng", "imxrng";
74 reg = <0x02284000 0x4000>;
75 };
76 }
77 }
78 }

二 内核与设备树

2.1 解析DTB 

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

2.2 绑定信息文档

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

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

你可能感兴趣的:(重学嵌入式,linux,单片机,imx6ull)