主题中讨论的其他器件: TCAN4550、 SysConfig、 SN65HVS882
工具/软件:
您好:
我们正在对 AM5716 上的 tcan4550 进行研究:
我们有以下日志:
1.485839] tcan4x5x spi3.0: no clock found [ 1.485839] tcan4x5x spi3.0: no CAN clock source defined [ 1.485870] tcan4x5x spi3.0: setup mode 0, 8 bits/w, 10000000 Hz max --> 0 [ 1.485931] tcan4x5x spi3.0: GPIO lookup for consumer device-wake [ 1.485931] tcan4x5x spi3.0: using device tree for GPIO lookup [ 1.485931] of_get_named_gpiod_flags: can't parse 'device-wake-gpios' property of node '/ocp/interconnect@48000000/segment@0/target-module@b8000/spi@0/tcan4x5x@0[0]' [ 1.485992] of_get_named_gpiod_flags: can't parse 'device-wake-gpio' property of node '/ocp/interconnect@48000000/segment@0/target-module@b8000/spi@0/tcan4x5x@0[0]' [ 1.486022] tcan4x5x spi3.0: using lookup tables for GPIO lookup [ 1.486022] tcan4x5x spi3.0: No GPIO consumer device-wake found [ 1.486053] tcan4x5x spi3.0: GPIO lookup for consumer reset [ 1.486083] tcan4x5x spi3.0: using device tree for GPIO lookup [ 1.486083] of_get_named_gpiod_flags: parsed 'reset-gpios' property of node '/ocp/interconnect@48000000/segment@0/target-module@b8000/spi@0/tcan4x5x@0[0]' - status (0) [ 1.486175] gpio gpiochip2: Persistence not supported for GPIO 20 [ 1.487304] tcan4x5x spi3.0: GPIO lookup for consumer device-state [ 1.487304] tcan4x5x spi3.0: using device tree for GPIO lookup [ 1.487335] of_get_named_gpiod_flags: can't parse 'device-state-gpios' property of node '/ocp/interconnect@48000000/segment@0/target-module@b8000/spi@0/tcan4x5x@0[0]' [ 1.487365] of_get_named_gpiod_flags: can't parse 'device-state-gpio' property of node '/ocp/interconnect@48000000/segment@0/target-module@b8000/spi@0/tcan4x5x@0[0]' [ 1.487396] tcan4x5x spi3.0: using lookup tables for GPIO lookup [ 1.487426] tcan4x5x spi3.0: No GPIO consumer device-state found [ 1.487579] tcan4x5x spi3.0: Unsupported version number: 0 [ 1.487609] tcan4x5x: probe of spi3.0 failed with error -22
设备树
&mcspi3 { status = "okay"; ti,pindir-d0-out-d1-in; //D0: MOSI ; D1: MISO; spi-max-frequency = <10000000>; tcan4x5x: tcan4x5x@0 { compatible = "ti,tcan4x5x"; reg = <0>; #address-cells = <1>; #size-cells = <1>; spi-max-frequency = <10000000>; bosch,mram-cfg = <0x0 0 0 16 0 0 1 1>; interrupt-parent = <&gpio5>; interrupts = <6 IRQ_TYPE_LEVEL_LOW>; //device-state-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>; //device-wake-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; reset-gpios = <&gpio8 20 GPIO_ACTIVE_LOW>; }; };
逻辑分析:
SPI 可以发送数据、但只接收 0x00 0xFF
谢谢