我当前将am3358内核版本升级到了linux5.10.153,看到内核对spi slave有支持,当前我们需要此功能,下面是我的spi配置
spi0_pins_default: spi0_pins_default {
pinctrl-single,pins = <
AM33XX_IOPAD(0x950, PIN_INPUT | MUX_MODE0) /* (A17) spi0_sclk.spi0_sclk */
AM33XX_IOPAD(0x954, PIN_INPUT | MUX_MODE0) /* (B17) spi0_d0.spi0_d0 */
AM33XX_IOPAD(0x958, PIN_INPUT | MUX_MODE0) /* (B16) spi0_d1.spi0_d1 */
AM33XX_IOPAD(0x95c, PIN_INPUT | MUX_MODE0) /* (A16) spi0_cs0.spi0_cs0 */
>;
};
&spi0 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins_default>;
spi-slave;
slave@0 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "rohm,dh2228fv";
spi-max-frequency = <24000000>;
reg = <0>;
};
};
在编译过程中出现下面错误
arch/arm/boot/dts/am33xx-l4.dtsi:1210.16-1223.6: Warning (spi_bus_bridge): /ocp/interconnect@48000000/segment@0/target-module@30000/spi@0: incorrect #address-cells for SPI bus
also defined at arch/arm/boot/dts/am335x-evm.dts:389.7-402.3
arch/arm/boot/dts/am335x-evm.dtb: Warning (spi_bus_reg): Failed prerequisite 'spi_bus_bridge'
在测试过程中发现数据spidev0.0节点可以接收数据,但是接收到的数据打印出来都是0
麻烦帮忙看一下对于spi配置还有什么需要修改的地方