Device Tree Overlay for BeagleBone-AI

Could i use overlay (Device Tree) in BeagleBone AI?
Could i know how to use overlay (DT) in BeagleBone AI?

First, I dont know to modify uEnv.txt ?
I don’t know what to edit in uEnv.txt.

Can I know which part I need to fix?

Either start with this image (unless you need xorg)

https://rcn-ee.net/rootfs/bb.org/testing/2020-09-07/buster-iot/am57xx-debian-10.5-iot-armhf-2020-09-07-4gb.img.xz

Here is the list of overlays:

https://github.com/beagleboard/BeagleBoard-DeviceTrees/tree/v4.19.x-ti-overlays/src/arm/overlays

Regards,

What is the difference between kenel overlay (device tree) and u-boot overlay?
Are they the same thing?

I have succeeded with u-boot overlay.
How do I get the kernel overlay (dtb_overlay) to load successfully?

I add my uEnv.txt for loading kernel overlay(dtb_overlay).

2020년 9월 14일 (월) 오후 6:26, 어지수 <jisu.au@gmail.com>님이 작성:

uEnv.txt (732 Bytes)

I'm sorry, v4.14.x-ti in your /boot/uEnv.txt is NOT compatible with
overlays for BBAI, this is brand new for the BBAI..

YOU much start with:

https://rcn-ee.net/rootfs/bb.org/testing/2020-09-07/buster-iot/am57xx-debian-10.5-iot-armhf-2020-09-07-4gb.img.xz

(v4.19.x-ti based kernel..)

Regards,

Use:

uboot_overlay_addr4=BBORG_SERVO-00A2.dtbo

Regards,

Hi! Thanks for this update! I’ve been playing around in the device trees for a little while in the AI, basing myself on the am5729-beagleboneai-roboticscape.dts and the v4.14 kernel iot image. I have a hardware application that requires me to use two ENC28J60 ethernet adapters and the SPI 2 pins (I need two chip selects and due to potential pin conflicts I need to use SPI2). After struggling with the v4.14 kernel/image, I decided to try upgrading to the 4.19 kernel/image provided in this discussion. I was wondering if this was possible by modifying some of the overlay files provided in:

https://github.com/beagleboard/BeagleBoard-DeviceTrees/tree/v4.19.x-ti-overlays/src/arm/overlays

Inspecting BeagleBoard-DeviceTrees/v4.19.x-ti-overlays/src/arm/bbai-bone-buses.dtsi, I could only find the bone_spi_0 and bone_spi_1 groups. Does anyone have any pointers on enabling spi2?

Thanks,

Doug

Here is the mapping:

https://github.com/beagleboard/BeagleBoard-DeviceTrees/blob/v4.19.x-ti-overlays/src/arm/bbai-bone-buses.dtsi#L413-L420

Regards,

Thanks for the reply Robert! Just a quick update, today I was able to configure some spi2 pins to interface with an ENC28J60-H development board (SPI to Ethernet) with the following dts file:

/dts-v1/;
/plugin/;

#include <dt-bindings/interrupt-controller/irq.h>
/*
* Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
*/
&{/chosen} {
overlays {
BONE-SPI2_0 = TIMESTAMP;
};
};

/*
* Update the default pinmux of the pins.
* See these files for the phandles (&P9_* & &P8_)
__
BeagleBoard-DeviceTrees/v4.19.x-ti-overlays/src/arm/am335x-bone-common-univ.dtsi__
* BeagleBoard-DeviceTrees/v4.19.x-ti-overlays/src/arm/am572x-bone-common-univ.dtsi
*/
&ocp {
P9_17_pinmux { pinctrl-0 = <&P9_17_spi_cs_pin>; }; /* CS0 /
//P9_23_pinmux { pinctrl-0 = <&P9_23_spi_cs_pin>; }; /
CS1 /
P9_21_pinmux { pinctrl-0 = <&P9_21_spi_pin>; }; /
MOSI /
P9_18_pinmux { pinctrl-0 = <&P9_18_spi_pin>; }; /
MISO /
P9_22_pinmux { pinctrl-0 = <&P9_22_spi_sclk_pin>; }; /
CLK /
P8_07_pinmux {status = “disabled”;}; __/
gpios reserved for RESET and INTERRUPT pins */__
P8_09_pinmux {status = “disabled”;};
P8_08_pinmux {status = “disabled”;};
P8_10_pinmux {status = “disabled”;};
};

/*
* See these files for the phandles (&bone_) and other bone bus nodes
__
BeagleBoard-DeviceTrees/v4.19.x-ti-overlays/src/arm/bbai-bone-buses.dtsi__
* BeagleBoard-DeviceTrees/v4.19.x-ti-overlays/src/arm/bbb-bone-buses.dtsi
*/
&bone_spi_0{
status = “okay”;
#address-cells = <1>;
#size-cells = <0>;

channel@0 {
reg = <0>;
compatible = “microchip,enc28j60”;
pinctrl-names = “default”;
pinctrl-0 = <&P8_09_default_pin>, <&P8_07_gpio_pin> ;
//reg = <0x0>; /* Use chip select 0 */
interrupt-parent = <&gpio6>; /* Interrupt on GPIO6[18] */
interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
symlink = “bone/spi/2.0”;
spi-max-frequency = <16000000>;
//spi-cpha;
};
};

I still need to make use of the CS1 pin mode on P9_23. However, I see in BeagleBoard-DeviceTrees/v4.19.x-ti-overlays/src/arm/am572x-bone-common-univ.dtsi,
there is no entry for P9_23_spi_cs_pin. I tried adding the following lines to the bone-common-univ.dtsi:

P9_23_spi_cs_pin: pinmux_P9_23_spi_cs_pin { pinctrl-single,pins = <
P9_23( PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE3)>; }; /* spi2_cs1.spi2_cs1, mcasp1_axr1.off */

But even after a make clean, make all, the resulting dtbo will brick my device…

I was wondering if you had any pointers/ideas as to how I could make this work? Eventually, I would like to run both channels with different interrupt,chip select and rest pins as defined above.

Thanks again,

Doug

If anybody else stuck with a similar issue please follow the proper installation steps provided on the official site for compatibility Layer project → https://deepaklorkhatri.me/GSoC2020_BeagleBoard.org/

Some updates might not be available directly and you have to install them with these additional steps,

  1. git clone https://github.com/beagleboard/BeagleBoard-DeviceTrees.git
  2. cd BeagleBoard-DeviceTrees
  3. sudo make install

Thanks for the great project, Deepak! Made my life a lot easier.

One small issue: The compatibility layer works beautifully but I consistently (tried three times) loose the “ad hoc” WLAN network of the BBBAI upon rebooting after the bootloader update. Funny thing is I can still log in the BBAI through the usbc port and connect to a wifi network. Any idea what might be wrong or how I could restore it? I have tried through connman, with no success.

Hardware: BBAI REV A1
Image: am57xx-eMMC-debian-10.3-iot-tidl-armhf-2020-04-06-6gb.img
Kernel: Linux beaglebone 4.19.94-ti-r55 #1buster SMP PREEMPT Tue Oct 27 21:48:45 UTC 2020 armv7l GNU/Linux

sudo /opt/scripts/tools/version.sh

git:/opt/scripts/:[b39ec679648a6be8f25f48bd1c9784c1fc5a0c46]
model:[BeagleBoard.org_BeagleBone_AI]
dogtag:[BeagleBoard.org Debian Buster IoT TIDL Image 2020-04-06]
UBOOT: Booted Device-Tree:[am5729-beagleboneai.dts]
UBOOT: Loaded Overlay:[BONE-I2C3]
UBOOT: Loaded Overlay:[BONE-SPI1_0]
UBOOT: Loaded Overlay:[BONE-SPI1_1]
UBOOT: Loaded Overlay:[BONE-UART5]
kernel:[4.19.94-ti-r55]
nodejs:[v10.21.0]
/boot/uEnv.txt Settings:
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_addr0=/lib/firmware/BONE-SPI1_0.dtbo]
uboot_overlay_options:[uboot_overlay_addr1=/lib/firmware/BONE-SPI1_1.dtbo]
uboot_overlay_options:[uboot_overlay_addr2=/lib/firmware/BONE-I2C3.dtbo]
uboot_overlay_options:[uboot_overlay_addr3=/lib/firmware/BONE-UART5.dtbo]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade ]
pkg:[bb-cape-overlays]:[4.14.20201021.1-0buster+20201021]
pkg:[bb-wl18xx-firmware]:[1.20200813.1-0buster+20200813]
pkg:[kmod]:[26-1]
pkg:[librobotcontrol]:[1.0.5-git20200715.0-0buster+20200716]
pkg:[firmware-ti-connectivity]:[20190717-2rcnee1buster+20200305]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal bluetooth netdev i2c gpio pwm eqep remoteproc admin spi iio docker tisdk weston-launch xenomai cloud9ide]
cmdline:[console=ttyS0,115200n8 root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 rng_core.default_quality=100 quiet]

What should be done after step 3.

I am trying to implement the 4d CAPE overlay. Does anyone have a shell uEnv.txt file a beginner can work off of? On the Black, the necessary cape was auto loaded. That is not what I am getting with the compatibility layer installed and these github cloned.

Thanks

Hey m.xilo…,

I had the same issue as well, turns out it was a bug in the image. It has been addressed here:

https://github.com/beagleboard/Latest-Images/issues/75

Run an apt update, apt upgrade, reboot and it should come back! Thanks to Robert C Nelson for the quick response!

Regards,

Doug

Thanks a lot, Doug! And thank you Robert Nelson for addressing the issue.
Have a great weekend.

All the best,
Michele

Hey, the link apparently doesnt seem to work, can u send me the image please, I urgently needed it for my project.

Hi @Shahbaaz_Ali what link do you need, this is a 2 year old thread?

Better yet, what type of image do you need?

Regards,

I recently got my Beaglebone AI and it came with kernel 4.14 and I needed an image with kernel 4.19. I checked in Beaglebone wiki but the link doesnt seem to work. Also the link that you mentioned in one of the earlier threads also does not open. So wondering if you got the image stored in your pc and if u could give it to me

Regards,