Hi guys,
I am still stuck on this mcp2515 issue. Any help will be highly appreciated. Here is the status:
I have tried compiling the kernel and CAN module multiple times. i have few variants that have successfully compiled. The 3 variants of kernel i have are :
- SPI enabled kernel : Following this link : https://www.96boards.org/documentation/consumer/dragonboard410c/guides/enable-spi.md.html
SPI interface enabled and available for use
- SPI and MCP2515 enabled kernel : following the instructions from @gc1
SPI interface enabled and available for use. can0 interface missing
- SPI from link number 1 above and MCP2515 related changes fused into one
SPI interface enabled and available for use. can0 interface missing
All these kernels have compiled successfully, i have flashed them to the board and transfered the modules into respective directory.
i still don’t have access to can0 even though drivers are present in : ls /lib/modules/4.9.56-linaro-lt-qcom/kernel/drivers/net/can/
can-dev.ko slcan.ko spi vcan.ko
i have included mcp2515.dtsi as mentioned in article above
Here is what i have in sys/bus/spi/devices/spi0.0/
driver modalias of_node power spidev statistics subsystem uevent
net and can related interface are missing, i enabled them during compiling the kernel. here is the .config file at the time of kernel compilation :
cat .config | grep -in “can”
352:CONFIG_ARCH_VULCAN=y
1106:CONFIG_CAN=m
1107:CONFIG_CAN_RAW=m
1108:CONFIG_CAN_BCM=m
1109:CONFIG_CAN_GW=m
1112:# CAN Device Drivers
1114:CONFIG_CAN_VCAN=m
1115:CONFIG_CAN_SLCAN=m
1116:CONFIG_CAN_DEV=m
1117:CONFIG_CAN_CALC_BITTIMING=y
1118:# CONFIG_CAN_LEDS is not set
1119:# CONFIG_CAN_GRCAN is not set
1120:# CONFIG_CAN_XILINXCAN is not set
1121:# CONFIG_CAN_C_CAN is not set
1122:# CONFIG_CAN_CC770 is not set
1123:# CONFIG_CAN_IFI_CANFD is not set
1124:# CONFIG_CAN_M_CAN is not set
1125:# CONFIG_CAN_RCAR is not set
1126:# CONFIG_CAN_RCAR_CANFD is not set
1127:# CONFIG_CAN_SJA1000 is not set
1128:# CONFIG_CAN_SOFTING is not set
1131:# CAN SPI interfaces
1133:CONFIG_CAN_MCP251X=m
1136:# CAN USB interfaces
1138:# CONFIG_CAN_EMS_USB is not set
1139:# CONFIG_CAN_ESD_USB2 is not set
1140:# CONFIG_CAN_GS_USB is not set
1141:# CONFIG_CAN_KVASER_USB is not set
1142:# CONFIG_CAN_PEAK_USB is not set
1143:# CONFIG_CAN_8DEV_USB is not set
1144:# CONFIG_CAN_DEBUG_DEVICES is not set
1530:# CONFIG_SCSI_SCAN_ASYNC is not set
Here is the lsmod output on the dragonboard :
sudo lsmod
Module Size Used by
ctr 16384 4
ccm 20480 2
cmac 16384 1
bnep 24576 2
arc4 16384 2
wcn36xx 73728 0
btqcomsmd 16384 0
btqca 16384 1 btqcomsmd
mac80211 417792 1 wcn36xx
bluetooth 614400 24 btqcomsmd,btqca,bnep
cfg80211 311296 1 mac80211
joydev 20480 0
qcom_wcnss_pil 16384 0
spidev 20480 0
venus_core 61440 0
qcom_camss 81920 0
msm_rng 16384 0
rng_core 20480 1 msm_rng
mdt_loader 16384 2 qcom_wcnss_pil,venus_core
videobuf2_dma_sg 24576 1 qcom_camss
videobuf2_memops 16384 1 videobuf2_dma_sg
v4l2_mem2mem 24576 1 venus_core
videobuf2_v4l2 24576 2 qcom_camss,v4l2_mem2mem
videobuf2_core 45056 4 qcom_camss,venus_core,v4l2_mem2mem,videobuf2_v4l2
videodev 204800 5 qcom_camss,videobuf2_core,venus_core,v4l2_mem2mem,videobuf2_v4l2
media 45056 2 qcom_camss,videodev
ip_tables 24576 0
x_tables 36864 1 ip_tables
i2c_qcom_cci 16384 0
Here is the depmod output from the dragonboard :
sudo depmod -n | grep spi
kernel/drivers/spi/spidev.ko:
kernel/drivers/spi/spi-meson-spifc.ko:
kernel/drivers/net/can/spi/mcp251x.ko: kernel/drivers/net/can/can-dev.ko
alias spi:spidev spidev
alias of:NTClineartechnology,ltc2488C* spidev
alias of:NTClineartechnology,ltc2488 spidev
alias of:NTCrohm,dh2228fvC* spidev
alias of:NTCrohm,dh2228fv spidev
alias acpi*:SPT0003:* spidev
alias acpi*:SPT0002:* spidev
alias acpi*:SPT0001:* spidev
alias of:NTCamlogic,meson-gxbb-spifcC* spi_meson_spifc
alias of:NTCamlogic,meson-gxbb-spifc spi_meson_spifc
alias of:NTCamlogic,meson6-spifcC* spi_meson_spifc
alias of:NTCamlogic,meson6-spifc spi_meson_spifc
alias spi:mcp2515 mcp251x
alias spi:mcp2510 mcp251x
alias spi:at86rf212 at86rf230
alias spi:at86rf233 at86rf230
alias spi:at86rf231 at86rf230
alias spi:at86rf230 at86rf230
alias spi:mrf24j40mc mrf24j40
alias spi:mrf24j40ma mrf24j40
alias spi:mrf24j40 mrf24j40
alias spi:cc2520 cc2520
alias symbol:v4l2_spi_subdev_init v4l2_common
alias symbol:v4l2_spi_new_subdev v4l2_common
Any pointer to resolve this will be highly appreciated.
Thanks in advance.
–
R