On the BeagleBone Black, I used the overlays defined in /boot/uEnv.txt to enable CAN and some UARTs and to disable several things like HDMI etc. Now I received my BBAI a few days ago where the whole overlay setup has been removed from uEnv.txt.
I then went ahead and tried to use the config-pin tool but for any pin I tried (I even tried to set some to GPIO) it errored out (I can’t look up the error right now but could tomorrow, if it matters).
My question: How do I enable peripherals like CAN and UART (with or without overlays, it doesn’t matter to me)?
Thanks, that looks like it might work. I am a bit surprised though, that after the relative ease of use of config-pin and overlays, we should now be back at having to compile DTBs ourselves. I assume (hope) this is just temporary and in the future, there will be simpler solutions again.
i need to activate the /dev/i2c-2 on the beaglebone AI. When i got that right i have to add a node in the device tree in order to activate it.
Can you tell me what i have to add there?
Don’t know if this will help you, but to get access to the eeprom on my cape I added:
To reply to myself: After looking at it again and reading through other people’s pages, I managed to get the CAN device working with this DTS (after cloning the BeagleBoard-DeviceTrees repo):
// The second name (pinmux_dcan2_pins) seems not used
&dra7_pmx_core {
dcan2_pins: pinmux_dcan2_pins {
pinctrl-single,pins = <
/* P9_24: uart1_txd.d_can2_rx /
DRA7XX_CORE_IOPAD(0x368C, PIN_INPUT_PULLUP | MUX_MODE2)
/ P9_26: uart1_rxd.d_can2_tx */
DRA7XX_CORE_IOPAD(0x3688, PIN_OUTPUT_PULLUP | MUX_MODE2)
;
};
};
// Initially defined in dra7 (which is included through multiple layers) as disabled
&dcan2 {
pinctrl-names = “default”; // Not sure what this is used for
pinctrl-0 = <&dcan2_pins>;
status = “okay”;
};
`
This muxes the 2 pins with the CAN peripheral to CAN.
After compiling this into a DTB, putting it on the beagle and setting it up in the uEnv.txt, I only need to bring up the CAN device:
sudo ip link set can0 up type can bitrate ${bitrate}
and CAN works (I use a bit rate of 125000).
Thanks for the people who took time to document their efforts and I hope this helps others.
Did you do any further changes on your BBAI to make this device tree run?
I just want to do a simple pinmux to give PRU1_0 some gpio’s, but everytime I edit my uEnv.txt, the kernel does not load after reboot. So I was looking around and found this thread.
I tried to copy your .dts, compiled it and copied it to /boot/dtbs/4.14xxxx. However, the kernel does not load. (Btw. I am using the 4.14.108-ti-xenomai-r127 kernel, didn’t test with normal ti kernel yet)
Did you do any further changes on your BBAI to make this device tree run?
Yes, this is the exact DTB I am using, everything else is stock (I
think I was using the Debian 9.10 IoT image).
I just want to do a simple pinmux to give PRU1_0 some gpio's, but everytime I edit my uEnv.txt, the kernel does not load after reboot. So I was looking around and found this thread.
I tried to copy your .dts, compiled it and copied it to /boot/dtbs/4.14xxxx. However, the kernel does not load. (Btw. I am using the 4.14.108-ti-xenomai-r127 kernel, didn't test with normal ti kernel yet)
I am using 4.19.x-ti, so this could certainly be an important difference.