Device tree load in 4.1 when migrating from 3.8.x

Hi,

In the process of migrating from 3.8.x to 4.1.21 and trying to get my device tree to load manually (eventually to load on boot).

As I understand it device trees are supported in 4.1.x – yes?

I the the .dts compiles with out errors however when I go to load the device tree I get the following:

echo BB-APA-01 > slots
[ 8122.326385] bone_capemgr bone_capemgr: part_number ‘BB-APA-01’, version ‘N/A’
[ 8122.333614] bone_capemgr bone_capemgr: slot #5: override
[ 8122.339116] bone_capemgr bone_capemgr: Using override eeprom data at slot 5
[ 8122.346184] bone_capemgr bone_capemgr: slot #5: ‘Override Board Name,00A0,Override Manuf,BB-APA-01’
[ 8122.369433] __of_changeset_entry_apply: add_property failed @/ocp/serial@481aa000/pinctrl-names
[ 8122.378353] of_changeset_apply: Error applying changeset (-17)
[ 8122.384609] __of_overlay_create: of_changeset_apply() failed for tree@/
[ 8122.391429] bone_capemgr bone_capemgr: slot #5: Failed to create overlay
-bash: echo: write error: File exists

My dts file is essentially the same as I had it in 3.8.x except for changing uart numbers to index from 0 instead of 1 as I’ve read that changed.

This custom device tree uses pins reserved for HDMI so I did added teh disable option to /boot/uEnv.txt:

cape_disable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN

What else do I need to update in my .dts or do to get a custom device tree to load?

Thanks,

Hi,

In the process of migrating from 3.8.x to 4.1.21 and trying to get my
device tree to load manually (eventually to load on boot).

As I understand it device trees are supported in 4.1.x -- yes?

I the the .dts compiles with out errors however when I go to load the
device tree I get the following:

echo BB-APA-01 > slots
[ 8122.326385] bone_capemgr bone_capemgr: part_number 'BB-APA-01', version
'N/A'
[ 8122.333614] bone_capemgr bone_capemgr: slot #5: override
[ 8122.339116] bone_capemgr bone_capemgr: Using override eeprom data at
slot 5
[ 8122.346184] bone_capemgr bone_capemgr: slot #5: 'Override Board
Name,00A0,Override Manuf,BB-APA-01'
[ 8122.369433] __of_changeset_entry_apply: add_property failed
@/ocp/serial@481aa000/pinctrl-names
[ 8122.378353] of_changeset_apply: Error applying changeset (-17)
[ 8122.384609] __of_overlay_create: of_changeset_apply() failed for tree@/
[ 8122.391429] bone_capemgr bone_capemgr: slot #5: Failed to create overlay
-bash: echo: write error: File exists

This also could me you used the wrong dtc compiler..

Use the one this one builds:

https://github.com/beagleboard/bb.org-overlays/blob/master/dtc-overlay.sh

My dts file is essentially the same as I had it in 3.8.x except for
changing uart numbers to index from 0 instead of 1 as I've read that
changed.

This custom device tree uses pins reserved for HDMI so I did added teh
disable option to /boot/uEnv.txt:

cape_disable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN

this ^ doesn't do anything..

Read, section: BBB compatibility issues:

https://github.com/beagleboard/bb.org-overlays/blob/master/readme.md

Regards,

Yes I do believe I have the right version – as I followed your instructions in bb.org-overlays

here is the result of a version check:
root@arm:/lib/firmware# dtc --version
Version: DTC 1.4.1-g1e75ebc9

To compile an overlay I did
dtc -O dtb -o BB-APA-01-00A0.dtbo -b 0 -@ BB-APA-01-00A0.dts

Then I placed the output in /lib/firmware

Referring to https://github.com/beagleboard/bb.org-overlays/blob/master/readme.md
I changed my uEnv.txt to contain
dtb=am335x-boneblack-emmc-overlay.dtb

Stll getting this:
[ 229.625505] bone_capemgr bone_capemgr: part_number ‘BB-APA-01’, version ‘N/A’
[ 229.633234] bone_capemgr bone_capemgr: slot #4: override
[ 229.638620] bone_capemgr bone_capemgr: Using override eeprom data at slot 4
[ 229.655322] bone_capemgr bone_capemgr: slot #4: ‘Override Board Name,00A0,Override Manuf,BB-APA-01’
[ 229.676441] __of_changeset_entry_apply: add_property failed @/ocp/serial@481aa000/pinctrl-names
[ 229.676462] of_changeset_apply: Error applying changeset (-17)
[ 229.695456] __of_overlay_create: of_changeset_apply() failed for tree@/
[ 229.702544] bone_capemgr bone_capemgr: slot #4: Failed to create overlay
sh: echo: I/O error

Fixed this issue – was a <&uart*> number I missed changing… doh

I can now manually add the device tree :

cat /sys/devices/platform/bone_capemgr/slots
0: PF---- -1
1: PF---- -1
2: PF---- -1
3: PF---- -1
4: P-O-L- 0 Override Board Name,00A0,Override Manuf,BB-APA-00A0,Override Manuf,BB-APA-01

How do I bake this into my kernel such that it loads at boot?

sudo update-initramfs -uk `uname -r`

*.dtbo's from /lib/firmware/ get copied to the initramfs..

then add BB-APA-01 into /boot/uEnv.txt under the v4.1.x kernel section on
loading overlays..

Regards,

Got the command to go but don’t quite follow you on the

then add BB-APA-01 into /boot/uEnv.txt under the v4.1.x kernel section on loading overlays…

My uEnv.txt looks like this right now:
cat /boot/uEnv.txt
uname_r=4.1.23-ti-rt-r60
uuid=8b83ed28-d947-4fda-b607-d5c5faf3dbe5
dtb=am335x-boneblack-emmc-overlay.dtb

Am I missing something here in uEnv.txt?

Do I simply add this to /boot/uEnv.txt:

bone_capemgr.enable_partno=BB-APA-01

cape_enable=bone_capemgr.enable_partno=BB-APA-01

Regards,

As always thanks for the help Robert!

That solved it!