|
发表于 2021-7-14 08:46:33
|
显示全部楼层
2401上做的是两路can,配置如下:
&spi1 {
status = "okay";
mcp2515_1:mcp2515_1@0 {
#address-cells=<1>;
#size-cells=<1>;
compatible = "microchip,mcp2515_1";
pinctrl-names = "default";
reg=<0>;
spi-max-frequency = <2000000>;
clocks = <&mcp251x_clock>;
interrupt-parent = <&pio>;
interrupts = <22 0>;
};
};
&spi2 {
status = "okay";
mcp2515_2:mcp2515_2@0 {
#address-cells=<1>;
#size-cells=<1>;
compatible = "microchip,mcp2515_2";
pinctrl-names = "default";
reg=<0>;
spi-max-frequency = <2000000>;
clocks = <&mcp251x_clock>;
interrupt-parent = <&pio>;
interrupts = <27 0>;
};
/*
spidev_cs0:spi2_cs0@0{
#address-cells=<1>;
#size-cells=<1>;
compatible = "spidev";
spi-max-frequency = <1000000>;
reg = <0>;
mode=<0>;
};
|
|