====================================================================================
/dts-v1/;
/include/ "xxe.dtsi"
/ {
compatible = "xxx0", "ralink,mt7620a-soc";
model = "xxxxx";------model属性表示my board name。
palmbus@10000000 {
gpio1: gpio@638 {
status = "okay";
};
gpio2: gpio@660 {
status = "okay";
};
spi@b00 {
status = "okay";
m25p80@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "en25q64";
reg = <0 0>;
linux,modalias = "m25p80", "w25p128";
spi-max-frequency = <10000000>;
partition@0 {----@后面为该节点寄存器的偏移地址或设备编号
label = "u-boot";
reg = <0x0 0x30000>;---reg属性表示寄存器偏移地址和长度,
还能表示flash分区的便宜地址和长度
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
factory: partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
};
partition@50000 {
label = "firmware";
reg = <0x50000 0xfb0000>;
};
};
};
};
pinctrl {
state_default: pinctrl0 {
default {
ralink,group = "i2c", "rgmii1", "rgmii2";
ralink,function = "gpio";
};
};
};
ethernet@10100000 {
mtd-mac-address = <&factory 0x28>;
ralink,port-map = "llllw";
};
gsw@10110000 {
ralink,port4 = "ephy";
};
ehci@101c0000 {
status = "okay";
};
ohci@101c1000 {
status = "okay";
};
gpio-leds {
compatible = "gpio-leds";
sys {
label = "xxx:blue:sys";
gpios = <&gpio2 20 1>;---用gpio2组的GPIO管脚,偏移地址是20即该组的第20个管脚,默认输出高电平。
};
wan {
label = "xxx:blue:wan";
gpios = <&gpio2 24 1>;
};
wireless {
label = "xxx:blue:wireless";
gpios = <&gpio2 21 1>;
};
};
gpio-keys-polled {
compatible = "gpio-keys-polled";
#address-cells = <1>;
#size-cells = <0>;
poll-interval = <20>;
zigbee {
label = "zigbee";
gpios = <&gpio2 23 1>;-------按此按键后开启zigbee模块业务?
linux,code = <0x197>;
};
reset {
label = "reset";
gpios = <&gpio2 22 1>;
linux,code = <0x198>;-------该属性的含义?
};
};
i2c-gpio {
compatible = "i2c-gpio";
gpios = <&gpio0 1 0 &gpio0 2 0>;-------i2c总线配置两个GPIO管脚
i2c-gpio,delay-us = <100>; /*10KHz */
#address-cells = <1>;
#size-cells = <0>;
pcf8563@51 {-----------------pcf8563为挂在该i2c总线的rtc芯片型号
compatible = "nxp,pcf8563";
reg = <0x51>;
};
};
};