Creating custom .dts files

I’d like to start this thread on making more complex overlay files for custom capes that use more than one device. For example a one wire temperature sensor, CAN bus on CAN1, SPI to an LCD display, SPI to a keypad mux etc. The EEROM on the cape would point to this .dtbo file which reserves all the I/O.

In the past (4.19…) I’ve compiled dts files and also programmed the EEROM on the development board. I’m now into 5.10… Trying to compile the dts file results in it not finding the <dt-bindings…

A quick find shows:

debian@ebb:/$ sudo find / -name dt-bindings
/opt/source/dtb-4.14-ti/include/dt-bindings
/opt/source/dtb-4.4-ti/include/dt-bindings
/opt/source/bb.org-overlays/include/dt-bindings
/usr/src/linux-headers-4.19.94-ti-r68/scripts/dtc/include-prefixes/dt-bindings
/usr/src/linux-headers-4.19.94-ti-r68/include/dt-bindings
/home/debian/bb.org-overlays/include/dt-bindings

I’ve got the source code in:
debian@ebb:/opt/source/bb.org-overlays/src/arm$

However compiling creates an error.
Question 1: Which <dt-bindings/… is used or how do I tell it which one to use?

debian@ebb:/opt/source/bb.org-overlays/src/arm$ sudo dtc -O dtb -o BB-W1-P8.11-00A0.dtbo BB-W1-P8.11-00A0.dts
Error: BB-W1-P8.11-00A0.dts:15.1-9 syntax error
FATAL ERROR: Unable to parse input tree

All I’ve changed in the dts file is the fragment@0 to add the helper to show loaded overlays. I’d like to be able to verify that the dts referenced in the EEROM is actually loaded.

Here’s the dts:

/*
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
* 
* Modified  by Russell Senior from the weather cape's DTS file.
* Minor formatting by C W Rose.
* Modified by John Dammeyer with changes from Robert Nelson for newer OS.
*/
/dts-v1/;
/plugin/;
 
#include <dt-bindings/board/am335x-bbw-bbb-base.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/am33xx.h>

/ {
    compatible = "ti,beaglebone", "ti,beaglebone-black";
    part-number = "BB-W1-P8.11";
    version = "00A0";
 
    exclusive-use = "P8.11";
	
	/*
	 * Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
	 */
	fragment@0 {
		target-path="/";
		__overlay__ {

			chosen {
				overlays {
					BB-W1-P8-11 = __TIMESTAMP__;
				};
			};
		};
	};
 
    fragment@1 {
        target = <&am33xx_pinmux>;
        __overlay__ {
             bb_w1_pins: pinmux_bb_w1_pins {
                 pinctrl-single,pins =  <BONE_P8_11 0x37 /* gpmc_ad13.gpio1_13, OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE7 - w1-gpio */ >;
             };
        };
    };
 
    fragment@2 {
        target = <&ocp>;
        __overlay__ {
            onewire@0 {
                status          = "okay";
                compatible      = "w1-gpio";
                pinctrl-names   = "default";
                pinctrl-0       = <&bb_w1_pins>;
 
                gpios = <&gpio1 13 GPIO_OPEN_DRAIN>;
            };
        };
    };
};

The other question is about the EEROM. It doesn’t show the -00A0 in the file name. Should I compile a BB-W1-P8.11,dts or BB-W1-P8.11-00A0.dts?

That project has a Makefile that takes care of all the #include files…

make

or

make src/arm/BB-W1-P8.11-00A0.dtbo

Regards,

Thanks Robert,

Which file does the system use when the “BB-W1-P8.11” is read from the cape EEROM?

/opt/source/bb.org-overlays/src/arm/BB-W1-P8.11-00A0.dtbo
/lib/firmware/BB-W1-P8.11-00A0.dtbo
/home/debian/bb.org-overlays/src/arm/BB-W1-P8.11-00A0.dtbo

Or should the DTS file be named and compiled without the -00A0?
ie:

debian@beaglebone:~$ sudo cat /sys/bus/i2c/devices/2-0057/eeprom | hexdump -C
00000000  aa 55 33 ee 41 30 4f 6e  65 57 69 72 65 20 70 6c  |.U3.A0OneWire pl|
00000010  75 73 20 43 41 4e 62 75  73 00 00 00 00 00 00 00  |us CANbus.......|
00000020  00 00 00 00 00 00 30 30  41 30 41 75 74 6f 41 72  |......00A0AutoAr|
00000030  74 69 73 61 6e 73 20 49  6e 63 42 42 2d 57 31 2d  |tisans IncBB-W1-|
00000040  50 38 2e 31 31 00 00 00  00 00 00 00 00 00 00 00  |P8.11...........|

1: /boot/dtbs/<uname -r>/overlays/
2: /lib/firmware/

If your playing with eeprom’s… Our version of u-boot has a lot of eeprom debugging… Just show us your serial log from J1…

Regards,

Hi Robert,
I have no idea what “serial log from J1…” means but here is some of the serial boot log. The BB-CAN1-00A0 is listed in the uEnv.txt file as is the BB-SPI-DEV0-00A0.

debug: [enable_uboot_overlays=1] ...
debug: [enable_uboot_cape_universal=1] ...
debug: [uboot_base_dtb_univ=am335x-boneblack-uboot-univ.dtb] ...
uboot_overlays: [uboot_base_dtb=am335x-boneblack-uboot-univ.dtb] ...
uboot_overlays: Switching too: dtb=am335x-boneblack-uboot-univ.dtb ...
loading /boot/dtbs/5.10.106-bone62/am335x-boneblack-uboot-univ.dtb ...
215682 bytes read in 57 ms (3.6 MiB/s)
uboot_overlays: [fdt_buffer=0x60000] ...
uboot_overlays: loading /lib/firmware/BB-W1-P8.11-00A0.dtbo ...
1116 bytes read in 1176 ms (0 Bytes/s)
uboot_overlays: loading /lib/firmware/BB-SPIDEV0-00A0.dtbo ...
1495 bytes read in 546 ms (2 KiB/s)
uboot_overlays: loading /lib/firmware/BB-CAN1-00A0.dtbo ...
1013 bytes read in 605 ms (1000 Bytes/s)
uboot_overlays: loading /lib/firmware/BB-BONE-eMMC1-01-00A0.dtbo ...
1614 bytes read in 919 ms (1000 Bytes/s)
uboot_overlays: loading /lib/firmware/BB-HDMI-TDA998x-00A0.dtbo ...
5330 bytes read in 181 ms (28.3 KiB/s)
uboot_overlays: loading /lib/firmware/BB-ADC-00A0.dtbo ...
654 bytes read in 174 ms (2.9 KiB/s)
uboot_overlays: unable to find [mmc 0:1 AM335X-PRU-RPROC-4-19-TI-00A0.dtbo]...
uboot_overlays: [uboot_detected_capes=BB-W1-P8.11,] ...
loading /boot/initrd.img-5.10.106-bone62 ...
12398450 bytes read in 816 ms (14.5 MiB/s)
debug: [console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait uboot_detected_capes=BB-W1-P8.11, coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet] ...
debug: [bootz 0x82000000 0x88080000:bd2f72 88000000] ...

The BB-W1-P8.11-00A0.dtbo is the one I compiled that added:

	/*
	 * Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
	 */
	fragment@0 {
		target-path="/";
		__overlay__ {

			chosen {
				overlays {
					BB-W1-P8-11 = __TIMESTAMP__;
				};
			};
		};
	};

Now the command to show this information includes the BB-W1-P8.11 which it didn’t before.

debian@beaglebone:~$ ls /proc/device-tree/chosen/overlays
BB-ADC-00A0.bb.org-overlays            BB-SPIDEV0-00A0
BB-BONE-eMMC1-01-00A0.bb.org-overlays  BB-W1-P8-11
BB-CAN1-00A0                           name
BB-HDMI-TDA998x-00A0.bb.org-overlays

Next step is to include the BB-CAN1-00A0 information into this same file since the cape has both W1 and CAN.

My intention is to write an extensive document describing exactly what I’ve done since otherwise in one or two weeks I’ll have forgotten everything. Essentially to consolidate the various text files I’ve created over the years for this sort of thing. I have to remove the $SLOTS stuff and make it as current as I can for 5.10…

Oh and although it appears as if the BB-W1-P8.11 was loaded correctly it doesn’t appear to work. The DS1822 One Wire device is not found on the Debian Buster 5.10 system.

OTOH, on the 4.19 Buster it still works. Only change was different MicroSD card. I think I’ll compile the old dts without the changes to make sure I didn’t screw something up.
image

Ah. Found this:

[  100.669500] pinctrl-single 44e10800.pinmux: pin PIN13 already requested by oc                                        p:P8_11_pinmux; cannot claim for ocp:onewire@0
[  101.418014] pinctrl-single 44e10800.pinmux: pin-13 (ocp:onewire@0) status -22
[  101.752388] pinctrl-single 44e10800.pinmux: could not request pin 13 (PIN13)                                         from group pinmux_bb_w1_pins  on device pinctrl-single
[  102.023048] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[  102.056961] PM: Cannot get wkup_m3_ipc handle
[  102.162071] w1-gpio ocp:onewire@0: Error applying setting, reverse things bac                                        k
/*
 * Free up the pins used by the cape from the pinmux helpers.
 */
&ocp {
	P8_11_pinmux { status = "disabled"; };
};

Add that to your BB-W1-P8.11-00A0.dts

Regards,

This is turning into a real nightmare. Here’s the log along with the really annoying redundant could not get rproc handle.

So something already has the W1 wire claimed. It’s not in my uEnv.txt. The Makefile won’t let me make BB-W1-P8.11-00A0.dtbo. I have to rename the file to BB-W1-P8.11.dtbo for the make command to work.

But that dtbo without the 00A0 isn’t found by the uboot loader. However change the name to BB-W1-P8.11-00A0.dtbo and now it’s found but I get the complaint that the pin is already in use.

I’m going to guess that because the EEPROM contains the 00A0 as version that the uboot wants that in the file name.

loading /boot/dtbs/5.10.106-bone62/am335x-boneblack-uboot-univ.dtb ...
215682 bytes read in 48 ms (4.3 MiB/s)
uboot_overlays: [fdt_buffer=0x60000] ...
uboot_overlays: loading /lib/firmware/BB-W1-P8.11-00A0.dtbo ...
1116 bytes read in 787 ms (1000 Bytes/s)
uboot_overlays: loading /lib/firmware/BB-SPIDEV0-00A0.dtbo ...
1495 bytes read in 370 ms (3.9 KiB/s)
uboot_overlays: loading /lib/firmware/BB-CAN1-00A0.dtbo ...
1013 bytes read in 409 ms (2 KiB/s)
uboot_overlays: loading /lib/firmware/BB-BONE-eMMC1-01-00A0.dtbo ...
1614 bytes read in 617 ms (2 KiB/s)
uboot_overlays: loading /lib/firmware/BB-HDMI-TDA998x-00A0.dtbo ...
5330 bytes read in 124 ms (41 KiB/s)
uboot_overlays: loading /lib/firmware/BB-ADC-00A0.dtbo ...
654 bytes read in 119 ms (4.9 KiB/s)
uboot_overlays: unable to find [mmc 0:1 AM335X-PRU-RPROC-4-19-TI-00A0.dtbo]...
uboot_overlays: [uboot_detected_capes=BB-W1-P8.11,] ...
loading /boot/initrd.img-5.10.106-bone62 ...
12398450 bytes read in 809 ms (14.6 MiB/s)
debug: [console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait uboot_detected_capes=BB-W1-P8.11, coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet] ...
debug: [bootz 0x82000000 0x88080000:bd2f72 88000000] ...
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Ramdisk to 8f42d000, end 8fffff72 ... OK
   reserving fdt memory region: addr=88000000 size=96000
   Loading Device Tree to 8f394000, end 8f42cfff ... OK

Starting kernel ...

[    2.183974] l3-aon-clkctrl:0000:0: failed to disable
[    2.287702] omap_voltage_late_init: Voltage driver support not added
[    2.287999] PM: Cannot get wkup_m3_ipc handle
[    2.365832] wkup_m3_rproc 44d00000.cpu: Platform data missing!
[    2.439591] gpiochip_add_data_with_key: GPIOs 0..31 (gpio-0-31) failed to register, -517
[    2.777949] wkup_m3_ipc 44e11324.wkup_m3_ipc: IPC Request for A8->M3 Channel failed! -517
[    3.739743] debugfs: Directory '49000000.dma' with parent 'dmaengine' already present!
[    3.881376] gpio-of-helper ocp:cape-universal: Failed to get gpio property of 'P8_13'
[    3.881394] gpio-of-helper ocp:cape-universal: Failed to create gpio entry
[    3.886009] PM: Cannot get wkup_m3_ipc handle
[    4.239716] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[    4.289644] PM: Cannot get wkup_m3_ipc handle
[    4.295641] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[    4.303764] PM: Cannot get wkup_m3_ipc handle
[    4.308682] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[    4.316021] PM: Cannot get wkup_m3_ipc handle
[    4.320832] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[    4.424213] PM: Cannot get wkup_m3_ipc handle
[    4.435504] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[    4.479527] PM: Cannot get wkup_m3_ipc handle
[    4.487491] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[    4.837620] PM: Cannot get wkup_m3_ipc handle
[    4.847251] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[    5.536185] PM: Cannot get wkup_m3_ipc handle
[    5.548892] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[    5.651025] PM: Cannot get wkup_m3_ipc handle
[    5.667350] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[    5.693584] PM: Cannot get wkup_m3_ipc handle
[    5.711407] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[    6.064382] PM: Cannot get wkup_m3_ipc handle
[    6.079259] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[    7.124913] PM: Cannot get wkup_m3_ipc handle
[    7.139368] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[    7.155955] PM: Cannot get wkup_m3_ipc handle
[    7.165932] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[    8.631156] PM: Cannot get wkup_m3_ipc handle
[    8.639507] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[    8.655230] PM: Cannot get wkup_m3_ipc handle
[    8.666286] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[    8.682259] PM: Cannot get wkup_m3_ipc handle
rootfs: clean, 292261/1888768 files, 2117152/7790720 blocks
[  OK  ] Started udev Kernel Device Manager.
[  OK  ] Started Journal Service.
         Starting Flush Journal to Persistent Storage...
[  OK  ] Started Flush Journal to Persistent Storage.
         Starting Create Volatile Files and Directories...
[  OK  ] Started Create Volatile Files and Directories.
[  OK  ] Started Entropy daemon using the HAVEGE algorithm.
         Starting Update UTMP about System Boot/Shutdown...
         Starting Network Time Synchronization...
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Started udev Coldplug all Devices.
         Starting Helper to synchronize boot up for ifupdown...
         Starting Show Plymouth Boot Screen...
[  OK  ] Started Helper to synchronize boot up for ifupdown.
         Starting Raise network interfaces...
[  OK  ] Started Show Plymouth Boot Screen.
[  OK  ] Reached target Local Encrypted Volumes.
[  OK  ] Reached target Paths.
[  OK  ] Started Forward Password R…s to Plymouth Directory Watch.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Reached target System Time Synchronized.
[  OK  ] Reached target System Initialization.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Started Daily rotation of log files.
[  OK  ] Listening on Cloud9 Socket.
[  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Reached target Timers.
[  OK  ] Listening on Node-RED Socket.
[  OK  ] Listening on bonescript.socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
[  OK  ] Started Bonescript autorun.
         Starting System Logging Service...
         Starting Disk Manager...
[  OK  ] Started D-Bus System Message Bus.
         Starting Connection service...
[  OK  ] Started Regular background program processing daemon.
         Starting Avahi mDNS/DNS-SD Stack...
         Starting Login Service...
         Starting LSB: Load kernel …d to enable cpufreq scaling...
         Starting WPA supplicant...
[  OK  ] Started System Logging Service.
[  OK  ] Started Raise network interfaces.
[  OK  ] Started Connection service.
[  OK  ] Started WPA supplicant.
[  OK  ] Started Avahi mDNS/DNS-SD Stack.
[  OK  ] Reached target Network.
         Starting Permit User Sessions...
         Starting OpenBSD Secure Shell server...
[  OK  ] Reached target Network is Online.
         Starting Samba NMB Daemon...
         Starting A high performanc… and a reverse proxy server...
         Starting Generic Board Startup...
[  OK  ] Started Login Service.
[  OK  ] Started Permit User Sessions.
         Starting Hold until boot process finishes up...
         Starting Light Display Manager...
         Starting Authorization Manager...
[  OK  ] Started OpenBSD Secure Shell server.
[  OK  ] Started Authorization Manager.
[  OK  ] Started LSB: Load kernel m…ded to enable cpufreq scaling.
         Starting Hostname Service...
         Starting LSB: set CPUFreq kernel parameters...
[  OK  ] Started Hold until boot process finishes up.

Debian GNU/Linux 10 beaglebone ttyS0

BeagleBoard.org Debian Buster LXQt Image 2021-04-27

Support: https://bbb.io/debian

default username:password is [debian:temppwd]

beaglebone login: [   49.681782] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[   49.716728] PM: Cannot get wkup_m3_ipc handle
[   50.169683] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[   50.199631] PM: Cannot get wkup_m3_ipc handle
[   54.464376] davinci-mcasp 48038000.mcasp: IRQ common not found
[   54.851677] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[   54.891573] PM: Cannot get wkup_m3_ipc handle
[   76.417106] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[   76.460301] PM: Cannot get wkup_m3_ipc handle
[   76.567401] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[   76.593956] PM: Cannot get wkup_m3_ipc handle
[   76.643341] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[   98.865385] pinctrl-single 44e10800.pinmux: pin PIN13 already requested by ocp:P8_11_pinmux; cannot claim for ocp:onewire@0
[   99.867448] pinctrl-single 44e10800.pinmux: pin-13 (ocp:onewire@0) status -22
[  100.230674] pinctrl-single 44e10800.pinmux: could not request pin 13 (PIN13) from group pinmux_bb_w1_pins  on device pinctrl-single
[  100.674785] w1-gpio ocp:onewire@0: Error applying setting, reverse things back
[  100.871787] PM: Cannot get wkup_m3_ipc handle
[  100.881347] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle

Yeah, rproc_m3 is annoying in v5.10.x…

Side note, there is a more “eeprom” debugging about 20 lines above this “first” line in the serial log… That’ll help the eeprom *.dtbo name problem…

[   98.865385] pinctrl-single 44e10800.pinmux: pin PIN13 already requested by ocp:P8_11_pinmux; cannot claim for ocp:onewire@0
[   99.867448] pinctrl-single 44e10800.pinmux: pin-13 (ocp:onewire@0) status -22
[  100.230674] pinctrl-single 44e10800.pinmux: could not request pin 13 (PIN13) from group pinmux_bb_w1_pins  on device pinctrl-single

What ever overlay you built before, you just need to add:

/*
 * Free up the pins used by the cape from the pinmux helpers.
 */
&ocp {
	P8_11_pinmux { status = "disabled"; };
};

That’ll fix that…

Hi Robert,
These are the lines you mean?

BeagleBone Black:
BeagleBone: cape eeprom: i2c_probe: 0x54:
BeagleBone: cape eeprom: i2c_probe: 0x55:
BeagleBone: cape eeprom: i2c_probe: 0x56:
debug: process_cape_part_number:[BB-W1-P8.11]
debug: process_cape_part_number:[42422D57312D50382E3131]
BeagleBone: cape eeprom: i2c_probe: 0x57: /lib/firmware/BB-W1-P8.11-00A0.dtbo [0x956174f]

Why won’t the make let me create BB-W1-P8.11-00A0.dtbo from BB-W1-P8.11-00A0.dts? It has to be BB-W1-P8.11.dts or there’s a can’t create temp message. Unless I was making some other mistake. I can do it again and report the exact text.

Is there a way to change this timeout? Also very annoying.

[ ***  ] A stop job is running for Session 1…f user debian (1min 1s / 1min 27s)

Seems that in the new version this line is no longer recognized?

exclusive-use = "P8.11";

I commented that out and replaced it with this which is almost like what you suggested but modeled after the CAN1 dts file.

	/*
	 * Free up the pins used by the cape from the pinmux helpers.
	 */
	fragment@1 {
		target = <&ocp>;
		__overlay__ {
			P8_11_pinmux { status = "disabled"; };
		};
	};

Anyway, now the W1 device is recognized but the path has become much more complicated with one long folder added and it’s now:

debian@beaglebone:/sys/devices/w1_bus_master1/w1_bus_master1-22-000000219f58$ cat w1_slave
55 01 4b 46 7f ff 0b 10 d0 : crc=d0 YES
55 01 4b 46 7f ff 0b 10 d0 t=21312

Compared to what the easier w1* and 22*:

 ls /sys/devices/w1*/22*/w1_slave
/sys/devices/w1_bus_master1/22-000000219f58/w1_slave

/* Get the information from the DS1822.
 cat /sys/devices/w1_bus_master1/22-000000219f58/w1_slave
5b 01 4b 46 7f ff 05 10 b5 : crc=b5 YES
5b 01 4b 46 7f ff 05 10 b5 t=21687

Lots more typing:

debian@beaglebone:~$ ls /sys/devices/w1_bus_master1/w1_bus_master1-22*/
alarms     driver  ext_power  hwmon  name   resolution  temperature  w1_slave
conv_time  eeprom  features   id     power  subsystem   uevent

But it works.
image

Hi Robert,
Here’s the issue with the make that I’m seeing.
This works.

debian@beaglebone:/opt/source/bb.org-overlays$ ls src/arm/BB-W1*
src/arm/BB-W1-P8.11-00A1.dts  src/arm/BB-W1-P9.12-00A0.dts
src/arm/BB-W1-P8.11.dts
debian@beaglebone:/opt/source/bb.org-overlays$ make src/arm/BB-W1-P8.11-00A1.dtbo
  DTC     src/arm/BB-W1-P8.11-00A1.dtbo

This doesn’t.

debian@beaglebone:/opt/source/bb.org-overlays$ ls src/arm/BB-W1*
src/arm/BB-W1-P8.11-00A0.dts   src/arm/BB-W1-P8.11.dts
src/arm/BB-W1-P8.11-00A1.dtbo  src/arm/BB-W1-P9.12-00A0.dts
src/arm/BB-W1-P8.11-00A1.dts
debian@beaglebone:/opt/source/bb.org-overlays$ make src/arm/BB-W1-P8.11-00A0.dtbo
make[1]: *** No rule to make target 'src/arm/.BB-W1-P8.11-00A0.dtbo.dts.tmp', needed by 'src/arm/BB-W1-P8.11-00A0.dtbo'.  Stop.
make: *** [Makefile:137: src/arm/BB-W1-P8.11-00A0.dtbo] Error 2

The BB-W1-P8.11-00A0.dts is a copy of BB-W1-P8.11.dts with just the -00A0 added to the file name.
This also works:

debian@beaglebone:/opt/source/bb.org-overlays$ make src/arm/BB-W1-P8.11.dtbo
  DTC     src/arm/BB-W1-P8.11.dtbo

I verified the two files with ‘diff’ just to make sure.
So why?
John

Hi Robert,

I have the issue with a pin that cannot reallocated from a group.
In my example it is:
“pin PIN107 already requested by ocp:bs_pinmode_P9_25_0x17_pinmux; cannot claim for 48038000.mcasp”
“pin-107 (48038000.mcasp) status -22”
“could not request pin 107 (PIN107) from group mcasp0_pins on device pin”

Here is my dts file (with disabling the pin first, then pinmux it and afterwards should be allocated to new group):

// SPDX-License-Identifier: GPL-2.0-only
/*
* This is an template-generated file from BoneScript which was extended afterwards
* see also the beaglebone black device tree overlay generator: https://kilobaser.com/beaglebone-black-device-tree-overlay-generator/
*
* Copyright (C) 2022 Sebastian Manko <s.manko@werner-lieb.de>
* Resulting in Lieb Cape for SPI0, CAN1 and some pinmux for DIO
*/

/dts-v1/;
/plugin/;

#include <dt-bindings/board/am335x-bbw-bbb-base.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/am33xx.h>

/ {
	compatible = "ti,beaglebone", "ti,beaglebone-black";

	/* identification */
	part_number = "LIEB-BBB-UNIVERSAL";

	/* version */
	version = "00A9";

    	exclusive-use =
        	"P9.17",
        	"spi0_cs0",
		"P9.18",
        	"spi0_d1",
		"P9.21",
        	"spi0_d0",
		"P9.22",
        	"spi0_sclk",
		"P9.24",
        	"d_can1_rx",
		"P9.26",
        	"d_can1_tx",
		"P8.27",
        	"gpio2_22",
		"P8.28",
        	"gpio2_24",
		"spi0",
		"P9.25",
		"gpio3_21";

	/*
	 * Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
	 */
	fragment@0 {
		target-path="/";
		__overlay__ {

			chosen {
				overlays {
					LIEB-BBB-UNIVERSAL-00A9 = __TIMESTAMP__;
				};
			};
		};
	};

	/*
	 * Free up the pins used by the cape from the pinmux helpers.
	 */
	fragment@1 {
		target = <&ocp>;
		__overlay__ {
			P9_17_pinmux { status = "disabled"; };	/* P9_17 (A16) spi0_cs0.spi0_cs0 */
			P9_18_pinmux { status = "disabled"; };	/* P9_18 (B16) spi0_d1.spi0_d1 */
			P9_21_pinmux { status = "disabled"; };	/* P9_21 (B17) spi0_d0.spi0_d0 */
			P9_22_pinmux { status = "disabled"; };	/* P9_22 (A17) spi0_sclk.spi0_sclk */

			P9_24_pinmux { status = "disabled"; };	/* P9_24 (D15) uart1_txd.d_can1_rx */
			P9_26_pinmux { status = "disabled"; };	/* P9_26 (D16) uart1_rxd.d_can1_tx */
			
			P9_25_pinmux { status = "disabled"; };	/* P9_25 (A14) mcasp0_ahclkx.gpio3_21 */
		};
	};

	fragment@2 {
        	target = <&am33xx_pinmux>;
        	__overlay__ {
			lieb_bbb_universal_spi0_pins: pinmux_spi0_pins {	
				pinctrl-single,pins = <	
					AM33XX_IOPAD(0x095c, PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE0)	/* spi0_cs0.spi0_cs0 */		/* general: <pin address 0xoutputpullupmode> specific: <Name: I2C1_SCL Mode:>*/
					0x158 0x10	/* PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE0 */	/* spi0_d1.spi0_d1 */		/* specific: <Name: I2C1_SDA Mode:0>*/
					0x154 0x30	/* PIN_INPUT_PULLUP | MUX_MODE0 */		/* spi0_d0.spi0_d0 */		/* specific: <Name: UART2_TXD Mode:0>*/
					0x150 0x30	/* PIN_INPUT_PULLUP | MUX_MODE0 */		/* spi0_sclk.spi0_sclk */	/* specific: <Name: UART2_RXD Mode:0>*/
				>;
            		};

			lieb_bbb_universal_can1_pins: pinmux_can1_pins {
                		pinctrl-single,pins = <
					AM33XX_IOPAD(0x0984, PIN_INPUT_PULLUP | MUX_MODE2)	/* uart1_txd.dcan1_rx */	/* PIN_INPUT_PULLUP | MUX_MODE2 */	/* general: <pin address 0xoutputpullupmode> specific: <Pin: UART1_TXD Mode:7>*/
					AM33XX_IOPAD(0x0980, PIN_OUTPUT_PULLUP | MUX_MODE2)	/* uart1_rxd.dcan1_tx */	/* PIN_OUTPUT_PULLUP | MUX_MODE2 */	/* specific: <Pin: UART1_RXD Mode:7>*/
				>;
			};

			bs_pinmode_P9_25_0x17: pinmux_bs_pinmode_P9_25_0x17 {
                		pinctrl-single,pins = <
					AM33XX_IOPAD(0x09ac, PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE7)		/* mcasp0_ahclkx.gpio3_21 */	/* P9.25 GPIO DO */
				>;
			};
		};
	};

	
	/* From source BeagleBone Black Device Tree Overlay Generator: https://kilobaser.com/beaglebone-black-device-tree-overlay-generator/ */
	fragment@3 {
        	target = <&ocp>;
        	__overlay__ {
            		bb_lieb_spi0_pinmux {
                		compatible = "bone-pinmux-helper";
                		status = "okay";
                		pinctrl-names = "default";
                		pinctrl-0 = <&lieb_bbb_universal_spi0_pins>;
            		};
        	};
	};

	fragment@4 {
        	target = <&ocp>;
        	__overlay__ {
            		bb_lieb_can1_pinmux {
                		compatible = "bone-pinmux-helper";
                		status = "okay";
                		pinctrl-names = "default";
                		pinctrl-0 = <&lieb_bbb_universal_can1_pins>;
            		};
        	};
	};

	fragment@5 {
        	target = <&ocp>;
        	__overlay__ {
            		bs_pinmode_P9_25_0x17_pinmux {
                		compatible = "bone-pinmux-helper";
                		status = "okay";
                		pinctrl-names = "gpio";
                		pinctrl-0 = <&bs_pinmode_P9_25_0x17>;
            		};
        	};
	};	
};

I’m also a bit confused by the two was of typing/syntax of dts files:

  • one way:
&ocp {
	P9_17_pinmux { status = "disabled"; };	/* P9_17 (A16) spi0_cs0.spi0_cs0 */
};
&am33xx_pinmux {
	bb_spi0_pins: pinmux_bb_spi0_pins {
		pinctrl-single,pins = <
			AM33XX_PADCONF(AM335X_PIN_SPI0_SCLK, PIN_INPUT, MUX_MODE0)	/* P9_22 (A17) spi0_sclk.spi0_sclk */
		>;
	};
};

and so on like in the file “BB-SPIDEV0-00A0.dts”

  • other way:
    with fragments, like in the file “BB-CAN1-00A0.dts”

So, which way is the actual way how to do?
And how can I solve my iissue with the error messages from “sudo /opt/scripts/tools/version.sh”?

I really hope you can help out and clear confusions. I’m sure that I’m not the only one who struggles, so a description on how to do properly that is up to date would be very welcome. I appreciate your work!

The first one is pretty old, looks like 3.8 syntax, which sometimes works today, the 2nd clip is newer stuff…

Please, let’s start with the beginning, what does the version.sh show:

Regards,

Hi Robert,

I am very happy and confident that you will help me!

In advance (also for others): Yesterday I discovered the pretty site: https://beagleboard.org/blog/. There the confusing difficulties are mentioned. Future (and centralized) guidelines for using device tree would be found there. It looks like the actual (prefered) way of how to create a custom device tree overaly from a device tree source is with &ocp.

The first one is pretty old, looks like 3.8 syntax, which sometimes works today
Which one do you mean? The one with “fragment@”?

the 2nd clip is newer stuff…
Which one do you mean? The one with “&ocp” / “&am33xx_pinmux”?

I’m using the latest official distribution (bone-eMMC-flasher-debian-10.3-iot-armhf-2020-04-06-4gb.img.xz) and Kernel 4.19 (linux-image-4.19.165-bone-rt-r59_1buster_armhf.deb). Here is my version.sh:

debian@beaglebone:~$ sudo /opt/scripts/tools/version.sh
[sudo] password for debian:
git:/opt/scripts/:[b39ec679648a6be8f25f48bd1c9784c1fc5a0c46]
eeprom:[A335BNLT00C01020BBBK2605]
model:[TI_AM335x_BeagleBone_Black]
dogtag:[BeagleBoard.org Debian Buster IoT Image 2020-04-06]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2019.04-00002-g07d5700e21]:[l                                      ocation: dd MBR]
UBOOT: Booted Device-Tree:[am335x-boneblack-uboot-univ.dts]
UBOOT: Loaded Overlay:[AM335X-PRU-RPROC-4-19-TI-00A0]
UBOOT: Loaded Overlay:[BB-ADC-00A0]
UBOOT: Loaded Overlay:[BB-BONE-eMMC1-01-00A0]
UBOOT: Loaded Overlay:[BB-HDMI-TDA998x-00A0]
kernel:[4.19.165-bone-rt-r59]
nodejs:[v10.15.2]
/boot/uEnv.txt Settings:
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-TI-                                      00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade <pkg>]
pkg:[bb-cape-overlays]:[4.14.20200403.0-0rcnee0~buster+20200403]
pkg:[bb-wl18xx-firmware]:[1.20200322.0-0rcnee0~buster+20200322]
pkg:[kmod]:[26-1]
pkg:[librobotcontrol]:[1.0.4-git20190227.1-0rcnee0~buster+20190327]
pkg:[firmware-ti-connectivity]:[20190717-2rcnee1~buster+20200305]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev us                                      ers systemd-journal bluetooth netdev i2c gpio pwm eqep remoteproc admin spi iio                                       docker tisdk weston-launch xenomai cloud9ide]
cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/m                                      mcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656                                       rng_core.default_quality=100 quiet]
dmesg | grep remote
[    1.149874] remoteproc remoteproc0: wkup_m3 is available
[    1.409008] remoteproc remoteproc0: powering up wkup_m3
[    1.409026] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf,                                       size 217168
[    1.411144] remoteproc remoteproc0: remote processor wkup_m3 is now up
dmesg | grep pru
dmesg | grep pinctrl-single
[    0.774194] pinctrl-single 44e10800.pinmux: 142 pins, size 568
dmesg | grep gpio-of-helper
[    0.785797] gpio-of-helper ocp:cape-universal: ready
lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
END

My currently dts file (and then compiled with “make src/arm/LIEB-BBB-UNIVERSAL-00A0.dtbo” from the directory “/opt/source/bb.org-overlays”):

// SPDX-License-Identifier: GPL-2.0-only
/*
* Inspired by dts files from https://elinux.org/Beagleboard:BeagleBone_cape_interface_spec
* and template-generated files from BoneScript / the beaglebone black device tree overlay generator from https://kilobaser.com/beaglebone-black-device-tree-overlay-generator/
*
* Copyright (C) 2022 Sebastian Manko <s.manko@werner-lieb.de>
* Resulting in Lieb Cape for SPI0, CAN1 and some GPIO pinmux*/

/dts-v1/;
/plugin/;

#include <dt-bindings/board/am335x-bbw-bbb-base.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/am33xx.h>

/*
* Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
*/
&{/chosen} {
	overlays {
		LIEB-BBB-UNIVERSAL-00A0 = __TIMESTAMP__;
	};
};


/*
* Free up the pins used by the cape from the pinmux helpers.
*/
&ocp {
	P9_17_pinmux { status = "disabled"; };		/* P9_17 (A16) spi0_cs0.spi0_cs0 */
	P9_18_pinmux { status = "disabled"; };		/* P9_18 (B16) spi0_d1.spi0_d1 */
	P9_21_pinmux { status = "disabled"; };		/* P9_21 (B17) spi0_d0.spi0_d0 */
	P9_22_pinmux { status = "disabled"; };	/* P9_22 (A17) spi0_sclk.spi0_sclk */

	P9_24_pinmux { status = "disabled"; };		/* P9_24 (D15) uart1_txd.d_can1_rx */
	P9_26_pinmux { status = "disabled"; };	/* P9_26 (D16) uart1_rxd.d_can1_tx */
			
	P9_25_pinmux { status = "disabled"; };	/* P9_25 (A14) mcasp0_ahclkx.gpio3_21 */
};

/*
 * 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>;};		/* spi0 cs */
	P9_18_pinmux { pinctrl-0 = <&P9_18_spi_pin>;};		/* spi0 d1 */
	P9_21_pinmux { pinctrl-0 = <&P9_21_spi_pin>;};		/* spi0 d0 */
	P9_22_pinmux { pinctrl-0 = <&P9_22_spi_sclk_pin>;};	/* spi0 sclk */
	
	P9_24_pinmux { pinctrl-0 = <&P9_24_can_pin>;};  		/* can rx */
	P9_26_pinmux { pinctrl-0 = <&P9_26_can_pin>;}; 		/* can tx */

	P9_25_pinmux { pinctrl-0 = <&P9_25_gpio_pu_pin>;};	/* gpio3 21 */
};

/*
 * See these files for the phandles (&bone_*) and other bone bus nodes
 * https://github.com/lorforlinux/BeagleBoard-DeviceTrees/blob/compatibility/src/arm/bbai-bone-buses.dtsi
 * https://github.com/lorforlinux/BeagleBoard-DeviceTrees/blob/compatibility/src/arm/bbb-bone-buses.dtsi
 */
&bone_spi_0 {
    status = "okay";
};

&bone_can_1 {
    status = "okay";
};

&{/} {
	leds {
		pinctrl-names = "default";
		pinctrl-0 = <&lieb_bbb_universal_gpio_pins>;

		compatible = "gpio-leds";

		jp@1 {
			label = "relay-jp1";
			gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
			default-state = "keep";
		};
	};
};

I could list all my failed attempts, but at the end I like the idea of programming the universal way with references and would like to enable SPI0, CAN1, and some extended GPIOs that were (pre-)allocated to groups, and one dts/dtbo file (because of custom hardware cape) that is listed (with proper timestamp) in /proc/device-tree/chosen/overlays and without erros in /opt/scripts/tools/version.sh!

P9_25 = Audio…

https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Disable_on-board_devices

disable_uboot_overlay_audio=1

Regards,

Hi Robert,

you’re right. If using a pin that would be reallocated by a default overlay, the corresponding overlay has to be disabled in uEnv.txt. Thanks.

But that doesn’t solve all problems for the &ocp pinmux version. Still freezing during boot and resulting in static five blue LED. It seems like the bus allocation with the &bone_spi_0 command results in the freeze and couldn’t figure out why and how to fix it. But I found a temporary solution with the new “sugar syntax”, you can find below.

The (old) fragment@ version now works (for SPI0 the “channel@” with “symlink” and the corresponding “#include <dt-bindings/interrupt-controller/irq.h>” and the #address-cells = <1> and #size-cells = <0> were previously missing and are now integrated) with this cleaned up dts file:

// SPDX-License-Identifier: GPL-2.0-only
/*
* * Inspired by dts files BB-CAN1-00A0.dts, BeagleBone_Black.dts
*
* Copyright (C) 2022 Sebastian Manko <s.manko@werner-lieb.de>
* Resulting in pinmux for cape with SPI0, CAN1 and GPIO
*/

/dts-v1/;
/plugin/;

#include <dt-bindings/pinctrl/am33xx.h>
#include <dt-bindings/interrupt-controller/irq.h>

/ {
	/*
	 * Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
	 */
	fragment@0 {
		target-path="/";
		__overlay__ {

			chosen {
				overlays {
					LIEB-BBB-UNIVERSAL-00A9 = __TIMESTAMP__;
				};
			};
		};
	};

	/*
	 * Free up the pins used by the cape from the pinmux helpers.
	 */
	fragment@1 {
		target = <&ocp>;
		__overlay__ {
			P9_17_pinmux { status = "disabled"; };	/* P9_17 (A16) spi0_cs0.spi0_cs0 */
			P9_18_pinmux { status = "disabled"; };	/* P9_18 (B16) spi0_d1.spi0_d1 */
			P9_21_pinmux { status = "disabled"; };	/* P9_21 (B17) spi0_d0.spi0_d0 */
			P9_22_pinmux { status = "disabled"; };	/* P9_22 (A17) spi0_sclk.spi0_sclk */

			P9_24_pinmux { status = "disabled"; };	/* P9_24 (D15) uart1_txd.d_can1_rx */
			P9_26_pinmux { status = "disabled"; };	/* P9_26 (D16) uart1_rxd.d_can1_tx */
			
			P9_25_pinmux { status = "disabled"; };	/* P9_25 (A14) mcasp0_ahclkx.gpio3_21 */	/* additionally "disable_uboot_overlay_audio=1" in uEnv.txt is needed to prevent error message with sudo /opt/scripts/tools/version.sh, because otherwise pin is allocated to group mcasp0 */
		};
	};

	/*
 	* Update the default pinmux of the pins.
 	* See these file for the phandles (&P9_* & &P8_*)
	* https://github.com/beagleboard/bb.org-overlays/blob/master/tools/pinmux-generator/BeagleBone_Black.dts
	*/
	fragment@2 {
        	target = <&am33xx_pinmux>;
        	__overlay__ {
			spi0_pins: pinmux_spi0_pins {	
				pinctrl-single,pins = <
					AM33XX_IOPAD(0x0950, PIN_INPUT_PULLUP | MUX_MODE0)		/* P9_22 (A17) spi0_sclk.spi0_sclk */
					AM33XX_IOPAD(0x0954, PIN_INPUT_PULLUP | MUX_MODE0)		/* P9_21 (B17) spi0_d0.spi0_d0 */
					AM33XX_IOPAD(0x0958, PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE0)	/* P9_18 (B16) spi0_d1.spi0_d1 */
					AM33XX_IOPAD(0x095c, PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE0)	/* P9_17 (A16) spi0_cs0.spi0_cs0 */					
				>;
            		};

			can1_pins: pinmux_can1_pins {
                		pinctrl-single,pins = <
					AM33XX_IOPAD(0x0980, PIN_OUTPUT_PULLUP | MUX_MODE2)		/* P9_26 (D16) uart1_rxd.dcan1_tx */
					AM33XX_IOPAD(0x0984, PIN_INPUT_PULLUP | MUX_MODE2)		/* P9_24 (D15) uart1_txd.dcan1_rx */				
				>;
			};

			gpio_pins: pinmux_gpio_pins {
                		pinctrl-single,pins = <
					AM33XX_IOPAD(0x09ac, PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE7)	/* P9_25 (A14) mcasp0_ahclkx.gpio3_21 */
				>;
			};
		};
	};

	fragment@3 {
        	target = <&ocp>;
        	__overlay__ {
            		spi0_pinmux {
				#address-cells = <1>;
				#size-cells = <0>;                		

				compatible = "bone-pinmux-helper";
                		status = "okay";
                		pinctrl-names = "default";
                		pinctrl-0 = <&spi0_pins>;

				channel@0 {
					compatible = "spidev";
					symlink = "bone/spi/0.0";

					reg = <0>;
					spi-max-frequency = <16000000>;
					spi-cpha;
				};

				channel@1 {
					compatible = "spidev";
					symlink = "bone/spi/0.1";

					reg = <1>;
					spi-max-frequency = <16000000>;
				};
            		};
        	};
	};

	fragment@4 {
        	target = <&ocp>;
        	__overlay__ {
            		can1_pinmux {
                		compatible = "bone-pinmux-helper";
                		status = "okay";
                		pinctrl-names = "default";
                		pinctrl-0 = <&can1_pins>;
            		};
        	};
	};
};

From my investigation it looks like the new/prefered version is with “sugar syntax” / " &label { }; syntax" because it is the newer way, how to do, so I really was looking forward to get it work. After uncounted trials and hours, but lastly I could find a way that compiled without errors and included it in uEnv.txt without freezing during boot. The sugar syntax version that works for me now, is cleaned up and looks like this:

// SPDX-License-Identifier: GPL-2.0-only
/*
* Inspired by dts files BB-SPIDEV0-00A0.dts, BeagleBone_Black.dts
*
* Copyright (C) 2022 Sebastian Manko <s.manko@werner-lieb.de>
* Resulting in pinmux for cape with SPI0, CAN1 and GPIO
*/

/dts-v1/;
/plugin/;

#include <dt-bindings/pinctrl/am33xx.h>
#include <dt-bindings/interrupt-controller/irq.h>

/*
* Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
*/
&{/chosen} {
	overlays {
		LIEB-BBB-UNIVERSAL-00A0 = __TIMESTAMP__;
	};
};


/*
* Free up the pins used by the cape from the pinmux helpers.
*/
&ocp {
	P9_17_pinmux { status = "disabled"; };	/* P9_17 (A16) spi0_cs0.spi0_cs0 */
	P9_18_pinmux { status = "disabled"; };	/* P9_18 (B16) spi0_d1.spi0_d1 */
	P9_21_pinmux { status = "disabled"; };	/* P9_21 (B17) spi0_d0.spi0_d0 */
	P9_22_pinmux { status = "disabled"; };	/* P9_22 (A17) spi0_sclk.spi0_sclk */

	P9_24_pinmux { status = "disabled"; };	/* P9_24 (D15) uart1_txd.d_can1_rx */
	P9_26_pinmux { status = "disabled"; };	/* P9_26 (D16) uart1_rxd.d_can1_tx */
			
	P9_25_pinmux { status = "disabled"; };	/* P9_25 (A14) mcasp0_ahclkx.gpio3_21 */	/* additionally "disable_uboot_overlay_audio=1" in uEnv.txt is needed to prevent error message with sudo /opt/scripts/tools/version.sh, because otherwise pin is allocated to group mcasp0 */
};

&am33xx_pinmux {
	spi0_pins: pinmux_spi0_pins {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x0950, PIN_INPUT_PULLUP | MUX_MODE0)		/* P9_22 (A17) spi0_sclk.spi0_sclk */
			AM33XX_IOPAD(0x0954, PIN_INPUT_PULLUP | MUX_MODE0)		/* P9_21 (B17) spi0_d0.spi0_d0 */
			AM33XX_IOPAD(0x0958, PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE0)	/* P9_18 (B16) spi0_d1.spi0_d1 */
			AM33XX_IOPAD(0x095c, PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE0)	/* P9_17 (A16) spi0_cs0.spi0_cs0 */
		>;
	};

	can1_pins: pinmux_can1_pins {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x0980, PIN_OUTPUT_PULLUP | MUX_MODE2)		/* P9_26 (D16) uart1_rxd.dcan1_tx */
			AM33XX_IOPAD(0x0984, PIN_INPUT_PULLUP | MUX_MODE2)		/* P9_24 (D15) uart1_txd.dcan1_rx */			
		>;
	};

	gpio_pins: pinmux_gpio_pins {
                pinctrl-single,pins = <
			AM33XX_IOPAD(0x09ac, PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE7)	/* P9_25 (A14) mcasp0_ahclkx.gpio3_21 */
		>;
	};
};

&spi0 {
	#address-cells = <1>;
	#size-cells = <0>;

	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&spi0_pins>;

	/*
	 * Select the D0 pin as output and D1 as
	 * input. The default is D0 as input and
	 * D1 as output.
	 */
	//ti,pindir-d0-out-d1-in;

	channel@0 {
		compatible = "spidev";
		symlink = "bone/spi/0.0";

		reg = <0>;
		spi-max-frequency = <16000000>;
		spi-cpha;
	};

	channel@1 {
		compatible = "spidev";
		symlink = "bone/spi/0.1";

		reg = <1>;
		spi-max-frequency = <16000000>;
	};
};

&dcan1 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&can1_pins>;
};

Note for “sugar syntax” version: I think for the latest version with sugar syntax the compiler/bindings components should be more up to date than the distribution Debian Buster 10.3 (bone-eMMC-flasher-debian-10.3-iot-armhf-2020-04-06-4gb.img.xz) and kernel 4.19 (linux-image-4.19.165-bone-rt-r59_1buster_armhf.deb) can deliver. Becuase of this, the bus allocation with &bone_spi_0 and &bone_can_1 can be compiled w/o erros but result in freeze at boot. If you’re willing to, we can figure out together what is missing or typed the wrong way, to get it work with latest syntax and stable distro and kernel.

Then copied the dts file to directory /opt/source/bb.org-overlays/src/arm, navigate to directory /opt/source/bb.org-overlays and compile it with make src/arm/LIEB-BBB-UNIVERSAL-00A0.dtbo.

Afterwards enable the custom cape and disabling the audio overlay, by editing the uEnv.txt in directory /boot like this:

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

uname_r=4.19.165-bone-rt-r59
#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=/lib/firmware/<file0>.dtbo
#uboot_overlay_addr1=/lib/firmware/<file1>.dtbo
#uboot_overlay_addr2=/lib/firmware/<file2>.dtbo
#uboot_overlay_addr3=/lib/firmware/<file3>.dtbo
###
###Additional custom capes
#uboot_overlay_addr4=/lib/firmware/<file4>.dtbo
uboot_overlay_addr4=/lib/firmware/LIEB-BBB-UNIVERSAL-00A0.dtbo
#uboot_overlay_addr5=/lib/firmware/<file5>.dtbo
#uboot_overlay_addr6=/lib/firmware/<file6>.dtbo
#uboot_overlay_addr7=/lib/firmware/<file7>.dtbo
###
###Custom Cape
#dtb_overlay=/lib/firmware/<file8>.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
###
###PRUSS OPTIONS
###pru_rproc (4.14.x-ti kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo
###pru_rproc (4.19.x-ti kernel)
uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo
###pru_uio (4.14.x-ti, 4.19.x-ti & mainline/bone kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo
###
###Cape Universal Enable
enable_uboot_cape_universal=1
###
###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###

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 video=HDMI-A-1:1024x768@60e

##enable Generic eMMC Flasher:
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

In my version the GPIOs are not allocated to a bus anymore, like in the LED examples from https://elinux.org/Beagleboard:BeagleBone_cape_interface_spec. Luckily my application with added CODESYS (which muxes at least the GPIOs) is OK with the code. But the sudo /opt/scripts/device/bone/show-pins.pl is sadly resulting in greyed out group/bus allocation as you can see in screenshot:
show-pins.pl
Additionally the names for CAN1 at pins P9.24 and P9.26 are missing. But for my application it is al OK.

I hope that I can bring back some benefits to help others in creating their custom .dts files with things combined with these dts template files, after soaking up so much infos.