Antillanca Posted February 23, 2023 Share Posted February 23, 2023 I have tried to activate CANBUS using "armbian-config", but it does not appear in /dev/, neither with i2c 0 Quote Link to comment Share on other sites More sharing options...
Biohazard777 Posted February 25, 2023 Share Posted February 25, 2023 @Antillanca you can check out this thread: Or continue reading here, i'll explain it. You need to change a few parameters in the boot environment: sudo armbian-config -> System -> Bootenv or you can edit the /boot/armbianEnv.txt directly. Once you are there you need to change the overlay_prefix to: overlay_prefix=rockchip-rk3588-opi5 Then you need to find the names of overlays, you can get them by running the following in your terminal: ls -l /boot/dtb/rockchip/overlay Scroll down and you will see: So if you want CAN bus and i2c then your Bootenv overlays should look like this: overlay_prefix=rockchip-rk3588-opi5 overlays=can1-m1 can2-m1 i2c1-m2 i2c1-m4 i2c3-m0 i2c5-m3 Restart your OPi5 for changes to take effect. If you need wiringPI: Spoiler you can currently get it from: https://github.com/orangepi-xunlong/wiringOP/tree/next (master still doesn't have support for OPi5, next branch does hence why the link to "next") ReadME doesn't have "gpio read all" for OPi5 so here you go: I have not personally tried CAN bus but it should work, I have tested i2c-1 and it works properly. 0 Quote Link to comment Share on other sites More sharing options...
john antillanca Posted March 19, 2023 Share Posted March 19, 2023 @Biohazard777, I have not had problems in the configuration of I2C and SPI in the last version of Armbian, but CAN still does not work. If someone could try enabling it and reviewing the /dev/ directory, it would be very useful, regards. 0 Quote Link to comment Share on other sites More sharing options...
terranx Posted March 20, 2023 Share Posted March 20, 2023 (edited) I've been using CAN on mine for a while, it's pretty solid. Though I made my own overlay (I'm still running a testing image which doesn't seem to have come with the can overlays) For the can1-m1 pins: /dts-v1/; /plugin/; / { fragment@0 { target = <&can1>; __overlay__ { status = "okay"; pinctrl-0 = <&can1m1_pins>; assigned-clock-rates = <0x1dcd6500>; }; }; }; (note I increased the clockrate to 500MHz there, the default is 200MHz. Dunno if there's any harm, but I've been running like that for a few months without issue) Edited March 20, 2023 by terranx 0 Quote Link to comment Share on other sites More sharing options...
john antillanca Posted March 20, 2023 Share Posted March 20, 2023 (edited) @terranx, excuse my ignorance, but how do you make a custom overlay? 'dmesg | grep can' command returns the following error: rockchip_canfd fea60000.can can0: rockchip_canfd_get_berr_counter RX_ERR_CNT=0x00000000, TX_ERR_CNT=0x00000000 Edited March 20, 2023 by john antillanca 0 Quote Link to comment Share on other sites More sharing options...
terranx Posted March 20, 2023 Share Posted March 20, 2023 Based on your dmesg, sounds like your bus is enabled 0 Quote Link to comment Share on other sites More sharing options...
john antillanca Posted March 20, 2023 Share Posted March 20, 2023 @terranx 'ls /dev' command returns: 0 Quote Link to comment Share on other sites More sharing options...
terranx Posted March 20, 2023 Share Posted March 20, 2023 (edited) CAN won't show up in /dev. You'll need to lookup how to setup socketcan stuff. But if you're seeing those dmesg messages, the actual bus is enabled. Annoyingly it does flood dmesg with those messages Edited March 20, 2023 by terranx 0 Quote Link to comment Share on other sites More sharing options...
john antillanca Posted March 20, 2023 Share Posted March 20, 2023 @terranx , You are right, I don't know where I got the idea that the device would have to appear in the /dev directory, it helped me to see the command to show the CAN connection, I needed to have it working to start learning, thank you very much. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.