5718核心板支持两路can,但默认只启一路can 现在我想把第二路can启起来 【尝试一:】 修改OK5718-SDK-V1.0/OK57xx-linux-kernel/arch/arm/boot/dts/ok5718-idk.dts设备树文件 相应配置如下:(仿照第一路can写的) &dcan1 { status = "okay"; pinctrl-names = "default", "sleep", "active"; pinctrl-0 = <&dcan1_pins_sleep>; pinctrl-1 = <&dcan1_pins_sleep>; pinctrl-2 = <&dcan1_pins_default>; }; &dcan2 { status = "okay"; pinctrl-names = "default", "sleep", "active"; pinctrl-0 = <&dcan2_pins_sleep>; pinctrl-1 = <&dcan2_pins_sleep>; pinctrl-2 = <&dcan2_pins_default>; }; dcan1_pins_default: dcan1_pins_default { pinctrl-single,pins = < DRA7XX_CORE_IOPAD(0x37d0, PIN_OUTPUT_PULLUP | MUX_MODE0) /* dcan1_tx */ DRA7XX_CORE_IOPAD(0x37d4, PIN_INPUT_PULLUP | MUX_MODE0) /* dcan1_rx */ >; }; dcan1_pins_sleep: dcan1_pins_sleep { pinctrl-single,pins = < DRA7XX_CORE_IOPAD(0x37d0, MUX_MODE15 | PULL_UP) /* dcan1_tx.off */ DRA7XX_CORE_IOPAD(0x37d4, MUX_MODE15 | PULL_UP) /* dcan1_rx.off */ >; }; dcan2_pins_default: dcan2_pins_default { pinctrl-single,pins = < DRA7XX_CORE_IOPAD(0x3688, PIN_OUTPUT_PULLUP | MUX_MODE2) /* dcan2_tx */ DRA7XX_CORE_IOPAD(0x368c, PIN_INPUT_PULLUP | MUX_MODE2) /* dcan2_rx */ >; }; dcan2_pins_sleep: dcan2_pins_sleep { pinctrl-single,pins = < DRA7XX_CORE_IOPAD(0x3688, MUX_MODE15 | PULL_UP) /* dcan2_tx.off */ DRA7XX_CORE_IOPAD(0x368c, MUX_MODE15 | PULL_UP) /* dcan2_rx.off */ >; }; 改完上述文件相应位置,回到OK5718-SDK-V1.0目录下重新编译设备树,将编译好的设备树文件放在5718板子上,输入 ifconfig -a 没有出来第二路can设备节点 【尝试二:】 TI官网上: 参考资料(这个和我修改的内容是一样的,但是文件位置不一样,这是dra7.dtsi文件) https://e2e.ti.com/support/processors/f/791/t/846885?AM5728-DCAN-issue&keyMatch=AM57XX%20DCAN&tisearch=Search-EN-everything 下面这个是TI官网上启动第二路can 的实例,不过不是57xx系列的,是335x系列的 http://processors.wiki.ti.com/index.php/AM335X_DCAN_Driver_Guide#Support_for_second_D_CAN_instance_.28AM335x.29 |
|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )
GMT+8, 2024-11-22 04:51
Powered by Discuz! X3.4
© 2001-2013 Comsenz Inc.