NXP

DTS文件配置2

2019-07-12 13:57发布

ethernet@10100000 {
mtd-mac-address = <&factory 0x28>;//从mtd的factory分区偏移28地址处获取mac地址。
ralink,port-map = "llllw";//lan和wan口的设置
};

gpio-leds {//通过该设备node名称查找对应的驱动
compatible = "gpio-leds";

sys {
label = "xx:blue:sys";
gpios = <&gpio2 20 1>;//GPIO60对应的字母编号为J15:gpios = <&gpio2 20 1>偏移20表示gpio2的第21个管脚,1表示上拉。
};

wan {
label = "xx:blue:wan";
gpios = <&gpio2 24 1>;//偏移24表示gpio2的第25个管脚即GPIO65,对应的字母编号为G14(应该改成J4即LINK4,当前用其他GPIO口造成系统启动时wan口指示不正确),1表示上拉。
};

wireless {
label = "xx:blue:wireless";
gpios = <&gpio2 21 1>;//偏移21表示gpio2的第22个管脚即GPIO61,对应的字母编号为J14(系统启动时指示错误,应该使用G4),1表示上拉。
};
};

i2c-gpio {
compatible = "i2c-gpio";
gpios = <&gpio0 1 0 &gpio0 2 0>;
i2c-gpio,delay-us = <100>;
#address-cells = <1>;
#size-cells = <0>;

pcf8563@51 {//pcf8563为RTC芯片。
compatible = "nxp,pcf8563";
reg = <0x51>;//为RTC芯片的硬件地址(I2C总线上挂有多个设备,要访问某个设备必须知道该设备的硬件地址)。
};
};

ehci@101c0000 {
status = "okay";//在dtsi文件中usb的ehci控制器默认是禁用的,将其启用即可。
};

ohci@101c1000 {
status = "okay";//在dtsi文件中usb的ohci控制器默认是禁用的,将其启用即可。
};