linux-kernelembedded-linuxbeagleboneblacku-bootdevice-tree

dtb_overlay don't work more than one overlay


I am trying to enable all UARTs on beaglebone with adding their Device Tree overlays. I am able to do it by adding uEnv.txt like this:

uboot_overlay_addr4=/lib/firmware/BB-UART1-00A0.dtbo
uboot_overlay_addr5=/lib/firmware/BB-UART2-00A0.dtbo
uboot_overlay_addr6=/lib/firmware/BB-UART4-00A0.dtbo
uboot_overlay_addr7=/lib/firmware/BB-UART5-00A0.dtbo

But as you noticed it takes me all addresses for future addings. So I found out I can use like this:

dtb_overlay=/lib/firmware/BB-UART5-00A0.dtbo,/lib/firmware/BB-UART4-00A0.dtbo

or

dtb_overlay=/lib/firmware/BB-UART5-00A0.dtbo /lib/firmware/BB-UART4-00A0.dtbo

or

dtb_overlay=/lib/firmware/BB-UART5-00A0.dtbo
dtb_overlay=/lib/firmware/BB-UART4-00A0.dtbo

But whenever I tried first and second of them it did not work unless I use single one which is not my use case. at 3rd try it only runs last one I wrote(UART4).

After booting with comma seperated way I see the output of sudo /opt/scripts/tools/version.sh:

git:/opt/scripts/:[39e66ba124a2f42838e6069e16f1f394b2bdef6c]
eeprom:[A335BNLTEIA02343SBI00170]
model:[TI_AM335x_BeagleBone_Black]
dogtag:[BeagleBoard.org Debian Bullseye IoT Image 2023-09-02]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot SPL 2022.04-ge0d31da5 (Aug 04 2023 - 18:
48:26 +0000)]:[location: dd MBR]
UBOOT: Booted Device-Tree:[am335x-boneblack-uboot-univ.dts]
UBOOT: Loaded Overlay:[BB-BONE-eMMC1-01-00A0.kernel]
kernel:[5.10.168-ti-r79]
nodejs:[v12.22.12]
/boot/uEnv.txt Settings:
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[disable_uboot_overlay_video=1]
uboot_overlay_options:[disable_uboot_overlay_audio=1]
uboot_overlay_options:[disable_uboot_overlay_wireless=1]
uboot_overlay_options:[disable_uboot_overlay_adc=1]
uboot_overlay_options:[enable_uboot_cape_universal=0]
uboot_overlay_options:[dtb_overlay=/lib/firmware/BB-UART5-00A0.dtbo,/lib/firmware/BB-UART4-
00A0.dtbo]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade <pkg>]
pkg:[bb-cape-overlays]:[4.14.20210821.0-0~bullseye+20210821]
pkg:[bb-customizations]:[1.20240119.0-0~bullseye+20240119]
pkg:[bb-usb-gadgets]:[1.20240717.0-0~bullseye+20240717]
pkg:[bb-wl18xx-firmware]:[1.20230703.0-0~bullseye+20240703]
pkg:[kmod]:[28-1]
WARNING:pkg:[librobotcontrol]:[NOT_INSTALLED]
pkg:[firmware-ti-connectivity]:[20210315-3]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd
-journal input render bluetooth netdev i2c gpio admin tisdk weston-launch cloud9ide]
cmdline:[console=ttyS0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk1p1 ro
 rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quali
ty=100 quiet]
dmesg | grep remote
[   13.023543] remoteproc remoteproc0: wkup_m3 is available
[   43.839336] remoteproc remoteproc0: powering up wkup_m3
[   43.839378] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217148
[   43.839686] remoteproc remoteproc0: remote processor wkup_m3 is now up
[   58.208251] remoteproc remoteproc1: 4a334000.pru is available
[   58.218478] remoteproc remoteproc2: 4a338000.pru is available
dmesg | grep pru
[   58.208251] remoteproc remoteproc1: 4a334000.pru is available
[   58.218478] remoteproc remoteproc2: 4a338000.pru is available
dmesg | grep pinctrl-single
[   12.400814] pinctrl-single 44e10800.pinmux: 142 pins, size 568
dmesg | grep gpio-of-helper
[   12.402576] gpio-of-helper ocp:cape-universal: Failed to get gpio property of 'P8_03'
[   12.402607] gpio-of-helper ocp:cape-universal: Failed to create gpio entry
[   13.338051] gpio-of-helper ocp:cape-universal: Allocated GPIO id=0 name='P8_03'
[   13.338315] gpio-of-helper ocp:cape-universal: Allocated GPIO id=1 name='P8_04'
[   13.338542] gpio-of-helper ocp:cape-universal: Allocated GPIO id=2 name='P8_05'
[   13.338749] gpio-of-helper ocp:cape-universal: Allocated GPIO id=3 name='P8_06'
[   13.339242] gpio-of-helper ocp:cape-universal: Allocated GPIO id=4 name='P8_07'
[   13.339471] gpio-of-helper ocp:cape-universal: Allocated GPIO id=5 name='P8_08'
[   13.339669] gpio-of-helper ocp:cape-universal: Allocated GPIO id=6 name='P8_09'
[   13.340017] gpio-of-helper ocp:cape-universal: Allocated GPIO id=7 name='P8_10'
[   13.340242] gpio-of-helper ocp:cape-universal: Allocated GPIO id=8 name='P8_11'
[   13.340452] gpio-of-helper ocp:cape-universal: Allocated GPIO id=9 name='P8_12'
[   13.340779] gpio-of-helper ocp:cape-universal: Allocated GPIO id=10 name='P8_13'
[   13.340984] gpio-of-helper ocp:cape-universal: Allocated GPIO id=11 name='P8_14'
[   13.341211] gpio-of-helper ocp:cape-universal: Allocated GPIO id=12 name='P8_15'
[   13.341413] gpio-of-helper ocp:cape-universal: Allocated GPIO id=13 name='P8_16'
[   13.341607] gpio-of-helper ocp:cape-universal: Allocated GPIO id=14 name='P8_17'
[   13.341815] gpio-of-helper ocp:cape-universal: Allocated GPIO id=15 name='P8_18'
[   13.342006] gpio-of-helper ocp:cape-universal: Allocated GPIO id=16 name='P8_19'
[   13.342209] gpio-of-helper ocp:cape-universal: Allocated GPIO id=17 name='P8_20'
[   13.342415] gpio-of-helper ocp:cape-universal: Allocated GPIO id=18 name='P8_21'
[   13.342627] gpio-of-helper ocp:cape-universal: Allocated GPIO id=19 name='P8_22'
[   13.342852] gpio-of-helper ocp:cape-universal: Allocated GPIO id=20 name='P8_23'
[   13.343080] gpio-of-helper ocp:cape-universal: Allocated GPIO id=21 name='P8_24'
[   13.343279] gpio-of-helper ocp:cape-universal: Allocated GPIO id=22 name='P8_25'
[   13.343486] gpio-of-helper ocp:cape-universal: Allocated GPIO id=23 name='P8_26'
[   13.343683] gpio-of-helper ocp:cape-universal: Allocated GPIO id=24 name='P8_27'
[   13.344010] gpio-of-helper ocp:cape-universal: Allocated GPIO id=25 name='P8_28'
[   13.344227] gpio-of-helper ocp:cape-universal: Allocated GPIO id=26 name='P8_29'
[   13.344436] gpio-of-helper ocp:cape-universal: Allocated GPIO id=27 name='P8_30'
[   13.344683] gpio-of-helper ocp:cape-universal: Allocated GPIO id=28 name='P8_31'
[   13.344881] gpio-of-helper ocp:cape-universal: Allocated GPIO id=29 name='P8_32'
[   13.345086] gpio-of-helper ocp:cape-universal: Allocated GPIO id=30 name='P8_33'
[   13.345304] gpio-of-helper ocp:cape-universal: Allocated GPIO id=31 name='P8_34'
[   13.345497] gpio-of-helper ocp:cape-universal: Allocated GPIO id=32 name='P8_35'
[   13.345703] gpio-of-helper ocp:cape-universal: Allocated GPIO id=33 name='P8_36'
[   13.345891] gpio-of-helper ocp:cape-universal: Allocated GPIO id=34 name='P8_37'
[   13.346094] gpio-of-helper ocp:cape-universal: Allocated GPIO id=35 name='P8_38'
[   13.346305] gpio-of-helper ocp:cape-universal: Allocated GPIO id=36 name='P8_39'
[   13.346514] gpio-of-helper ocp:cape-universal: Allocated GPIO id=37 name='P8_40'
[   13.346720] gpio-of-helper ocp:cape-universal: Allocated GPIO id=38 name='P8_41'
[   13.346911] gpio-of-helper ocp:cape-universal: Allocated GPIO id=39 name='P8_42'
[   13.347117] gpio-of-helper ocp:cape-universal: Allocated GPIO id=40 name='P8_43'
[   13.347325] gpio-of-helper ocp:cape-universal: Allocated GPIO id=41 name='P8_44'
[   13.347518] gpio-of-helper ocp:cape-universal: Allocated GPIO id=42 name='P8_45'
[   13.347803] gpio-of-helper ocp:cape-universal: Allocated GPIO id=43 name='P8_46'
[   13.348054] gpio-of-helper ocp:cape-universal: Allocated GPIO id=44 name='P9_11'
[   13.348263] gpio-of-helper ocp:cape-universal: Allocated GPIO id=45 name='P9_12'
[   13.348495] gpio-of-helper ocp:cape-universal: Allocated GPIO id=46 name='P9_13'
[   13.348691] gpio-of-helper ocp:cape-universal: Allocated GPIO id=47 name='P9_14'
[   13.348897] gpio-of-helper ocp:cape-universal: Allocated GPIO id=48 name='P9_15'
[   13.349098] gpio-of-helper ocp:cape-universal: Allocated GPIO id=49 name='P9_16'
[   13.349295] gpio-of-helper ocp:cape-universal: Allocated GPIO id=50 name='P9_17'
[   13.349495] gpio-of-helper ocp:cape-universal: Allocated GPIO id=51 name='P9_18'
[   13.349700] gpio-of-helper ocp:cape-universal: Allocated GPIO id=52 name='P9_19'
[   13.349922] gpio-of-helper ocp:cape-universal: Allocated GPIO id=53 name='P9_20'
[   13.350129] gpio-of-helper ocp:cape-universal: Allocated GPIO id=54 name='P9_21'
[   13.350336] gpio-of-helper ocp:cape-universal: Allocated GPIO id=55 name='P9_22'
[   13.350553] gpio-of-helper ocp:cape-universal: Allocated GPIO id=56 name='P9_23'
[   13.350749] gpio-of-helper ocp:cape-universal: Allocated GPIO id=57 name='P9_24'
[   13.351263] gpio-of-helper ocp:cape-universal: Allocated GPIO id=58 name='P9_25'
[   13.351492] gpio-of-helper ocp:cape-universal: Allocated GPIO id=59 name='P9_26'
[   13.351706] gpio-of-helper ocp:cape-universal: Allocated GPIO id=60 name='P9_27'
[   13.352031] gpio-of-helper ocp:cape-universal: Allocated GPIO id=61 name='P9_28'
[   13.352242] gpio-of-helper ocp:cape-universal: Allocated GPIO id=62 name='P9_29'
[   13.352451] gpio-of-helper ocp:cape-universal: Allocated GPIO id=63 name='P9_30'
[   13.352673] gpio-of-helper ocp:cape-universal: Allocated GPIO id=64 name='P9_31'
[   13.352873] gpio-of-helper ocp:cape-universal: Allocated GPIO id=65 name='P9_41'
[   13.353081] gpio-of-helper ocp:cape-universal: Allocated GPIO id=66 name='P9_91'
[   13.353288] gpio-of-helper ocp:cape-universal: Allocated GPIO id=67 name='P9_42'
[   13.353492] gpio-of-helper ocp:cape-universal: Allocated GPIO id=68 name='P9_92'
[   13.353506] gpio-of-helper ocp:cape-universal: ready
lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
END

my uEnv.txt file is a bit messy but it exactly is:

#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0

uname_r=5.10.168-ti-r79
#uuid=
#dtb=

###U-Boot Overlays###
###Documentation: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays
###Master Enable
enable_uboot_overlays=1
###
###Overide capes with eeprom
#uboot_overlay_addr0=<file0>.dtbo
#uboot_overlay_addr1=<file1>.dtbo
#uboot_overlay_addr2=<file2>.dtbo
#uboot_overlay_addr3=<file3>.dtbo
###
###Additional custom capes
#uboot_overlay_addr4=/lib/firmware/BB-CAN0-00A0.dtbo
#uboot_overlay_addr4=/lib/firmware/BB-UART1-00A0.dtbo
#uboot_overlay_addr5=/lib/firmware/BB-UART2-00A0.dtbo
#uboot_overlay_addr6=/lib/firmware/BB-UART4-00A0.dtbo
#uboot_overlay_addr7=/lib/firmware/BB-UART5-00A0.dtbo
#uboot_overlay_addr5=<file5>.dtbo
#uboot_overlay_addr6=<file6>.dtbo
#uboot_overlay_addr7=<file7>.dtbo
###


###Custom Cape
dtb_overlay=/lib/firmware/BB-UART5-00A0.dtbo,/lib/firmware/BB-UART4-00A0.dtbo
###
###Disable auto loading of virtual capes (emmc/video/wireless/adc)
#disable_uboot_overlay_emmc=1
disable_uboot_overlay_video=1
disable_uboot_overlay_audio=1
disable_uboot_overlay_wireless=1
disable_uboot_overlay_adc=1
###
###Cape Universal Enable
enable_uboot_cape_universal=0
###
###Debug: disable uboot autoload of Cape
#disable_uboot_overlay_addr0=1
#disable_uboot_overlay_addr1=1
#disable_uboot_overlay_addr2=1
#disable_uboot_overlay_addr3=1
###
###U-Boot fdt tweaks... (60000 = 384KB)
#uboot_fdt_buffer=0x60000
###U-Boot Overlays###

console=ttyS0,115200n8
cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet

#In the event of edid real failures, uncomment this next line:
#cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet vide
o=HDMI-A-1:1024x768@60e

#Use an overlayfs on top of a read-only root filesystem:
#cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet over
layroot=tmpfs

##enable Generic eMMC Flasher:
#cmdline=init=/usr/sbin/init-beagle-flasher

I want to use as much as interface at the same time so I need help of yours. Thank you.


Solution

  • The solution to this is to create your own Device Tree Overlay in which all the interfaces you want to use are enabled and parameterised.

    In general, the device tree overlay is a description of the entire hardware platform, so individual device tree overlays cannot be chained together.