0

Can't load multiple PWM DTO
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Can't load multiple PWM DTO

by Alan_H on Fri Nov 10, 2017 10:36 am

Hi,
Recently, I study and run some program on BBB ver C. But now, I met an issue to load multiple PWM DTO.
In order to explain and verify issue, I followed the tutorial on https://elinux.org/BeagleBoardUbuntu and downloaded the last image from
https://rcn-ee.com/rootfs/2017-10-12/microsd/bone-ubuntu-16.04.3-console-armhf-2017-10-12-2gb.img.xz
Yes, it's ubuntu 16.04, due to I have to run ROS on BBB.

After rebooting, I tried to load BB-PWM0 to capemgr slots, but slots doesn't exist.
I disabled uboot overlay which defined in /boot/uEnv.txt, my current /boot/uEnv.txt like this:

Code: Select all | TOGGLE FULL SIZE
uname_r=4.9.54-ti-r68
cmdline=coherent_pool=1M net.ifnames=0 quiet


Reboot system again, now I can see /sys/devices/platform/bone_capemgr/slots.
To make sure there is no default DTO loaded, the commands I used were:
Code: Select all | TOGGLE FULL SIZE
ubuntu@arm:~$ sudo cat /sys/devices/platform/bone_capemgr/slots
[sudo] password for ubuntu:
 0: PF----  -1
 1: PF----  -1
 2: PF----  -1
 3: PF----  -1


Then I tried to put PWM DTO:
Code: Select all | TOGGLE FULL SIZE
root@arm:/home/ubuntu# echo BB-PWM0 > /sys/devices/platform/bone_capemgr/slots
root@arm:/home/ubuntu# echo BB-PWM1 > /sys/devices/platform/bone_capemgr/slots
bash: echo: write error: File exists
root@arm:/home/ubuntu# echo BB-PWM2 > /sys/devices/platform/bone_capemgr/slots
bash: echo: write error: File exists
root@arm:/home/ubuntu# 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-PWM0


As above, there is just one DTO file loaded.

Here was dmesg log:
Code: Select all | TOGGLE FULL SIZE
[  630.274512] bone_capemgr bone_capemgr: slot #4: override
[  630.285132] bone_capemgr bone_capemgr: slot #4: 'Override Board Name,00A0,Override Manuf,BB-PWM0'
[  633.490760] bone_capemgr bone_capemgr: slot #5: override
[  633.501156] bone_capemgr bone_capemgr: slot #5: 'Override Board Name,00A0,Override Manuf,BB-PWM1'
[  633.527134] OF: changeset: add_property failed @/__symbols__/pinctrl_spec
[  633.536814] OF: Error applying changeset (-17)
[  633.541820] bone_capemgr bone_capemgr: slot #5: Failed to create overlay
[  639.866717] bone_capemgr bone_capemgr: slot #6: override
[  639.877236] bone_capemgr bone_capemgr: slot #6: 'Override Board Name,00A0,Override Manuf,BB-PWM2'
[  639.903965] OF: changeset: add_property failed @/__symbols__/pinctrl_spec
[  639.913684] OF: Error applying changeset (-17)
[  639.918850] bone_capemgr bone_capemgr: slot #6: Failed to create overlay


BTW, I already tried to update DTO files according to https://github.com/beagleboard/bb.org-overlays
The test result are the same as above.

How can I solve this situation?

Alan_H
 
Posts: 2
Joined: Thu Nov 09, 2017 10:35 pm

Re: Can't load multiple PWM DTO

by drewfustini on Fri Nov 10, 2017 2:57 pm

I believe the image you are running may have U-Boot Overlays enabled. Robert Nelson made this change on the BeagleBoard.org Debian image earlier this year.

The idea is that all the device tree overlays are managed in the bootloader. Linux kernel gets a complete Device Tree (dtb) from the bootloader. Therefore, Robert Nelson has disabled the cape manager driver in the default BeagleBone kernel build.

For more information:
https://elinux.org/Beagleboard:BeagleBo ... t_Overlays

I'll ask Robert Nelson to please take a look at this post and add any additional information.

drewfustini
 
Posts: 717
Joined: Sat Dec 26, 2015 1:19 pm

Re: Can't load multiple PWM DTO

by drewfustini on Fri Nov 10, 2017 3:12 pm

I have posted this question on the BeagleBoard.org mailing list:
https://groups.google.com/forum/embed/? ... coJZCLLj3E

drewfustini
 
Posts: 717
Joined: Sat Dec 26, 2015 1:19 pm

Re: Can't load multiple PWM DTO

by Alan_H on Sat Nov 11, 2017 4:32 am

I appreciate your soon reply and information, it's useful to me.
I am going to study this part and do some test on them.

Alan_H
 
Posts: 2
Joined: Thu Nov 09, 2017 10:35 pm

Please be positive and constructive with your questions and comments.