我正在尝试在Raspberry Pi 3的SPI上添加2个TI的CC2520芯片,该芯片具有2个spi芯片选择引脚。但是,我只能在芯片选择0或1上添加一个芯片,但不能同时添加两个芯片。
在bcm2709-rpi-2-b.dts的末尾添加以下内容,我可以看到" wpan0"以太网接口" ifconfig"
&spi0 {
status="okay";
spidev@0{
status = "disabled";
};
spidev@1{
status = "disabled";
};
cc2520@0 {
compatible = "ti,cc2520";
reg = <0>;
spi-max-frequency = <4000000>;
fifo-gpio = <&gpio 24 1>;
fifop-gpio = <&gpio 17 1>;
sfd-gpio = <&gpio 4 1>;
cca-gpio = <&gpio 23 1>;
vreg-gpio = <&gpio 26 1>; /*LED*/
reset-gpio = <&gpio 25 1>; /*connected to two 2520*/
};
这个也有效
&spi0 {
status="okay";
spidev@0{
status = "disabled";
};
spidev@1{
status = "disabled";
};
cc2520@1 {
compatible = "ti,cc2520";
reg = <1>;
spi-max-frequency = <4000000>;
fifo-gpio = <&gpio 12 1>;
fifop-gpio = <&gpio 6 1>;
sfd-gpio = <&gpio 5 1>;
cca-gpio = <&gpio 16 1>;
vreg-gpio = <&gpio 19 1>; /*IO5 actually, it is input*/
reset-gpio = <&gpio 18 1>; /*just a NC pin*/
};
但是添加以下节点,我的Linux无法启动。 RPI3卡在初始彩色屏幕上
&spi0 {
status="okay";
spidev@0{
status = "disabled";
};
spidev@1{
status = "disabled";
};
cc2520@0 {
compatible = "ti,cc2520";
reg = <0>;
spi-max-frequency = <4000000>;
fifo-gpio = <&gpio 24 1>;
fifop-gpio = <&gpio 17 1>;
sfd-gpio = <&gpio 4 1>;
cca-gpio = <&gpio 23 1>;
vreg-gpio = <&gpio 26 1>; /*LED*/
reset-gpio = <&gpio 25 1>; /*connected to two 2520*/
};
cc2520@1 {
compatible = "ti,cc2520";
reg = <1>;
spi-max-frequency = <4000000>;
fifo-gpio = <&gpio 12 1>;
fifop-gpio = <&gpio 6 1>;
sfd-gpio = <&gpio 5 1>;
cca-gpio = <&gpio 16 1>;
vreg-gpio = <&gpio 19 1>; /*IO5 actually, it is input*/
reset-gpio = <&gpio 18 1>; /*just a NC pin*/
};
我已经尝试将一个CC2520节点替换为某个ATMEL芯片,尽管我还没有。但是设备树根本不允许2个芯片出现在1个spi总线上。有什么想法吗?
谢谢, 艾伦