设备树

device tree

解决内核源码中,存在大量对板级细节信息描述的代码。

编译过程

DTC(device tree compiler)将DTS(device tree source)/DTSI文件编译为二进制文件DTB(device tree blob)

格式

/ {
memory: memory {
	reg = <0x10000000 0x40000000>;
    };

&i2c1 {
	clock-frequency = <100000>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_i2c1>;
	status = "okay";
	
	mpu9150@68 {
		compatible = "mpu9150";
		reg = <0x68>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_i2c1_mpu9150_int>;
		interrupt-parent = <&gpio3>;
		interrupts = <31 2>;
	};
    }
}

posted @ 2020-01-10 14:59  熊云港  阅读(136)  评论(0编辑  收藏  举报