My overlay can't find clk_mcasp0

457 views
Skip to first unread message

Rick Mann

unread,
Apr 4, 2016, 5:48:01 AM4/4/16
to Beagle Board
I'm trying to get my audio cape to work (which is nearly identical to the cape that was available for sale). I've had it working to some level of success with past kernels (3.1.18), but now I'm on 4.4.6. My existing DTS didn't work, so I'm looking at how the BB-BONE-AUDI-02 DTS is written.

One of the differences is that it doesn't explicitly call out the McASP clock frequency like the older one did. Instead, it seems to refer to clk_mcasp0. But when I copy the same code into my DTS, I get:

[ 103.180866] of_resolve_phandles: Could not find symbol 'clk_mcasp0'
[ 103.187269] bone_capemgr bone_capemgr: slot #4: Failed to resolve tree

I found it defined by grepping /boot/dtbs. It's in /boot/dtbs/4.4.6-bone-rt-r6/am335x-abbbi.dtb. Where can I find the source files for these DTBs?

Is this dtb part of what's loaded by default in 4.4.6-bone-rt-r6? If not, can I copy the definition into my

FWIW, here's my DTS and some output from dmesg: http://pastebin.com/niDkWdWV

Thanks,


--
Rick Mann
rm...@latencyzero.com


Robert Nelson

unread,
Apr 4, 2016, 9:42:21 AM4/4/16
to Beagle Board
You need to add this to your base *.dtb:


(that section can not be loaded as overlay, it must be in your base dtb)

Regards,

--
Robert Nelson
https://rcn-ee.com/

Robert Nelson

unread,
Apr 4, 2016, 9:58:37 AM4/4/16
to Beagle Board
btw, the one thing i haven't tried, have everything in the clk defined except for the gpio and load that as part of the audio overlay..

side note, we just got audio (cape audio rev b) working a few weeks back, so this is relatively new

Regards,

Rick Mann

unread,
Apr 4, 2016, 4:17:53 PM4/4/16
to beagl...@googlegroups.com
Thanks, Robert. I'll give that a shot. I'm not immediately sure what my current base *.dtb is, nor how to build a new one and specify that be used. But maybe I can piggyback off the one you show there.

Out of curiosity, why can't this be done as an overlay (to help me understand the Device Tree better)?

Thanks!


--
Rick Mann
rm...@latencyzero.com


Robert Nelson

unread,
Apr 4, 2016, 4:36:58 PM4/4/16
to Beagle Board

Switch to r7, just pushed it out this morning.

dtb=am335x-boneblack-audio.dtb

>
> Out of curiosity, why can't this be done as an overlay (to help me understand the Device Tree better)?
>

Just a bug in the clock driver, the dynamic overlay changes is still very fragile. In most cases moving the driver as a module vs built-in, fixes it right up.. Except this is the clock driver, it needs to be built in..

Regards,

Rick Mann

unread,
Apr 4, 2016, 6:38:38 PM4/4/16
to beagl...@googlegroups.com

> On Apr 4, 2016, at 13:36 , Robert Nelson <robert...@gmail.com> wrote:
>
> > > You need to add this to your base *.dtb:
> > >
> > > https://github.com/RobertCNelson/dtb-rebuilder/blob/4.1-ti/src/arm/am335x-boneblack-audio.dts#L17-L28
> > >
> > > btw, the one thing i haven't tried, have everything in the clk defined except for the gpio and load that as part of the audio overlay..
> > >
> > > side note, we just got audio (cape audio rev b) working a few weeks back, so this is relatively new
> >
> > Thanks, Robert. I'll give that a shot. I'm not immediately sure what my current base *.dtb is, nor how to build a new one and specify that be used. But maybe I can piggyback off the one you show there.
>
> Switch to r7, just pushed it out this morning.

Should that be available in apt, or do I need to git pull and build it myself? I tried "apt-get update && apt-get install -y linux-image-4.4.6-bone-rt-r7" but no luck. Maybe it just takes a while to show up?

Thanks!

>
> dtb=am335x-boneblack-audio.dtb
>
> >
> > Out of curiosity, why can't this be done as an overlay (to help me understand the Device Tree better)?
> >
>
> Just a bug in the clock driver, the dynamic overlay changes is still very fragile. In most cases moving the driver as a module vs built-in, fixes it right up.. Except this is the clock driver, it needs to be built in..
>
> Regards,
>
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


--
Rick



Robert Nelson

unread,
Apr 4, 2016, 10:15:31 PM4/4/16
to Beagle Board
> Should that be available in apt, or do I need to git pull and build it myself? I tried "apt-get update && apt-get install -y linux-image-4.4.6-bone-rt-r7" but no luck. Maybe it just takes a while to show up?

It should be out now.. The builders where still a little behind from
v4.6-rc2 build's..

Rick Mann

unread,
Apr 4, 2016, 11:04:34 PM4/4/16
to Beagle Board

> On Apr 4, 2016, at 19:14 , Robert Nelson <robert...@gmail.com> wrote:
>
>> Should that be available in apt, or do I need to git pull and build it myself? I tried "apt-get update && apt-get install -y linux-image-4.4.6-bone-rt-r7" but no luck. Maybe it just takes a while to show up?
>
> It should be out now.. The builders where still a little behind from
> v4.6-rc2 build's..
>
> Regards,

Thanks, just found it (while my manual build was running :-) ). Good thing, too; I forgot how to go from building the kernel to installing the image, dtbs, modules, and headers :-)


--
Rick Mann
rm...@latencyzero.com


Rick Mann

unread,
Apr 4, 2016, 11:29:22 PM4/4/16
to Beagle Board, Robert Nelson
I updated to -r7, and set the dtb=am335x-boneblack-audio.dtb

uEnv.txt: http://pastebin.com/yhQqzGWZ

Booting fails now. Log: http://pastebin.com/M8YJJGWi

> U-Boot SPL 2016.03-00001-gd12d09f (Mar 17 2016 - 16:16:15)
> Trying to boot from MMC
> bad magic
> .
> .
> .
> Loading, please wait...
> mount: can't find /root in /etc/fstab
> Target filesystem doesn't have requested /sbin/init.
> mount: mounting /dev on /root/dev failed: No such file or directory
> No init found. Try passing init= bootarg.
> modprobe: module i8042 not found in modules.dep
> modprobe: module ehci-pci not found in modules.dep
> modprobe: module ehci-orion not found in modules.dep
> modprobe: module uhci-hcd not found in modules.dep
> modprobe: module ohci-hcd not found in modules.dep

I updated to -r7 with apt-get install.

Did my MMC get corrupted?

Rick Mann

unread,
Apr 4, 2016, 11:37:40 PM4/4/16
to Beagle Board, Robert Nelson
Oh, I'm on a BB Green. Should that have been am335x-bonegreen-audio.dtb?

I'm in initramfs, but I'm not sure how to find the uEnv.txt file to edit it.

Robert Nelson

unread,
Apr 5, 2016, 12:15:31 AM4/5/16
to Rick Mann, Beagle Board
On Mon, Apr 4, 2016 at 10:29 PM, Rick Mann <rm...@roderickmann.org> wrote:
> I updated to -r7, and set the dtb=am335x-boneblack-audio.dtb
>
> uEnv.txt: http://pastebin.com/yhQqzGWZ
>
> Booting fails now. Log: http://pastebin.com/M8YJJGWi
>
>> U-Boot SPL 2016.03-00001-gd12d09f (Mar 17 2016 - 16:16:15)
>> Trying to boot from MMC
>> bad magic
>> .
>> .
>> .
>> Loading, please wait...
>> mount: can't find /root in /etc/fstab
>> Target filesystem doesn't have requested /sbin/init.
>> mount: mounting /dev on /root/dev failed: No such file or directory
>> No init found. Try passing init= bootarg.
>> modprobe: module i8042 not found in modules.dep
>> modprobe: module ehci-pci not found in modules.dep
>> modprobe: module ehci-orion not found in modules.dep
>> modprobe: module uhci-hcd not found in modules.dep
>> modprobe: module ohci-hcd not found in modules.dep
>
> I updated to -r7 with apt-get install.
>
> Did my MMC get corrupted?

dtb=am335x-boneblack-audio.dtb

doesn't setup the emmc...

Rick Mann

unread,
Apr 5, 2016, 12:20:02 AM4/5/16
to Robert Nelson, Beagle Board

> On Apr 4, 2016, at 21:14 , Robert Nelson <robert...@gmail.com> wrote:
>
> On Mon, Apr 4, 2016 at 10:29 PM, Rick Mann <rm...@roderickmann.org> wrote:
>> I updated to -r7, and set the dtb=am335x-boneblack-audio.dtb
>>
>> Did my MMC get corrupted?
>
> dtb=am335x-boneblack-audio.dtb
>
> doesn't setup the emmc...

Augh, right. So, how do I get past this situation? Do I need to boot from SD card, or can I fix it via initramfs?

I tried googling, but didn't have much luck.

--
Rick Mann
rm...@latencyzero.com


Rafael Vega

unread,
Apr 19, 2016, 12:40:58 PM4/19/16
to BeagleBoard, robert...@gmail.com
I'm trying to use the same codec as Rick but I need to use a 'bone-rt' kernel (old PRU api and PREEMPT). Can you tell me what/where the base  *.dtb is and how to compile it when using a bone-rt kernel?
Thanks!

Rafael Vega

unread,
Apr 19, 2016, 1:27:51 PM4/19/16
to BeagleBoard, robert...@gmail.com
> dtb=am335x-boneblack-audio.dtb
>
> doesn't setup the emmc...

Does this mean that the board won't be able to boot from the emmc when using this dtb? If so, how is it supposed to be used?


Rick Mann

unread,
Apr 19, 2016, 4:05:22 PM4/19/16
to beagl...@googlegroups.com, Rafael Vega
I had to make one that also enabled the emmc:

http://pastebin.com/Wja7ZQRk

Note that there's a problem with that file. It includes am33xx-overlay-edma-fix.dtsi, which causes the mcasp driver to load first, and it ends up not being properly configured when you load the overlay. I'll be writing a full DTS for my project, rather than use the overlay mechanism, but for now that's how I do it.



--
Rick Mann
rm...@latencyzero.com


Rafael Vega

unread,
Apr 20, 2016, 2:48:24 PM4/20/16
to BeagleBoard, cont...@rafaelvega.co
Thanks Rick!

When you say the driver ends up not being properly configured when you load the overlay, does that mean I should not load the overlay? Or should I load it and expect problems? which problems?

Rick Mann

unread,
Apr 20, 2016, 4:28:23 PM4/20/16
to beagl...@googlegroups.com, cont...@rafaelvega.co
The DTB I posted includes am33xx-overlay-edma-fix.dtsi, which enables mcasp0 and mcasp1. This causes the snd_soc_davinci_mcasp driver to load, and it configures itself at that time. But that DTB doesn't have the necessary entries for that driver to properly configure. When you then later load the overlay (e.g. BB-BONE-AUDI-02), the driver ignores the new entries.

There are a couple of solutions. The best is to move all the remaining entries that are in the overlay into a new .dts file based on this <
http://pastebin.com/Wja7ZQRk>, compile that, and load it at boot.

Or, compile this .dts <http://pastebin.com/vny3wpnq> and load it at boot, then load the cape overlay. The drawback to this is (apparently) the eDMA slots won't get assigned properly for mcasp, so there might be issues down the road. It seems to work as-is for me, but I don't know if there is higher CPU loading, or what. I don't really understand the eDMA issues.
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/394a008d-c039-429b-8814-56c9183b7d37%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


--
Rick Mann
rm...@latencyzero.com


evilwulfie

unread,
Apr 20, 2016, 4:45:50 PM4/20/16
to beagl...@googlegroups.com
I see that on 4.1.14-bone-rt-r17 kernel the edma fix is compiled into
the am335x-boneblack-emmc-overlay.dtb resulting in
any audio cape overlay not loading.

so i guess i can grab this file
https://github.com/beagleboard/linux/blob/4.1/arch/arm/boot/dts/am335x-boneblack-emmc-overlay.dts

but i have no idea how to complie it and what paths i need to include to
get it to complie

I am wondering why that *fix* was needed and why it wants to enable the
davinci_mdio_default pins so we cant enable audio overlays
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Robert Nelson

unread,
Apr 20, 2016, 4:56:17 PM4/20/16
to Beagle Board
On Wed, Apr 20, 2016 at 3:45 PM, evilwulfie <evilw...@gmail.com> wrote:
I see that on 4.1.14-bone-rt-r17 kernel the edma fix is compiled into
the am335x-boneblack-emmc-overlay.dtb resulting in
any audio cape overlay not loading.

so i guess i can grab this file
https://github.com/beagleboard/linux/blob/4.1/arch/arm/boot/dts/am335x-boneblack-emmc-overlay.dts

but i have no idea how to complie it and what paths i need to include to
get it to complie

it's easy, there is a whole repo setup to just do that..

cd ./dtb-rebuilder/

make/sudo make install/etc...

I am wondering why that *fix* was needed and why it wants to enable the
davinci_mdio_default pins so we cant enable audio overlays

oh it's been discussed on this list before, there was a specific case it needed to be enabled by default to fix a case..

and the "fix" was pushed to the repo, before we got the that audio cape.

evilwulfie

unread,
Apr 20, 2016, 5:15:38 PM4/20/16
to beagl...@googlegroups.com
very interesting. after removing the eDMA fix and recompiling we still cant load the audio cape

sudo cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins

stuff removed for clarity


pin 82 (44e10948.0): 4a101000.mdio (GPIO UNCLAIMED) function davinci_mdio_default group davinci_mdio_default
pin 83 (44e1094c.0): 4a101000.mdio (GPIO UNCLAIMED) function davinci_mdio_default group davinci_mdio_default


I think this is the reason.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


Virus-free. www.avast.com

William Hermans

unread,
Apr 20, 2016, 5:25:20 PM4/20/16
to beagl...@googlegroups.com
Just playing along here . . . I thought maybe HDMI had to be loaded to load the audio cape, but seems not. I'm going to start over with a fresh dts file and load the same one as evilwulfie to see if I can get to the bottom of things.
 
william@beaglebone:~$ sudo sh -c "echo 'BB-BONE-AUDI-02' > /sys/devices/platform/bone_capemgr/slots"
william@beaglebone:~$ cat /sys/devices/platform/bone_capemgr/slots
 0: PF----  -1
 1: PF----  -1
 2: PF----  -1
 3: PF----  -1
 5: P-O-L-   0 Override Board Name,00A0,Override Manuf,WH-UART5
william@beaglebone:~$ dmesg | grep BB-BONE-AUDI-02
[66985.108405] bone_capemgr bone_capemgr: part_number 'BB-BONE-AUDI-02', version 'N/A'
[66985.128912] bone_capemgr bone_capemgr: slot #6: 'Override Board Name,00A0,Override Manuf,BB-BONE-AUDI-02'


Rick Mann

unread,
Apr 20, 2016, 5:31:23 PM4/20/16
to beagl...@googlegroups.com
Keep in mind I'm on 4.4.7-bone-rt-r9, not 4.1.x. Dunno if that matters.
> Virus-free. www.avast.com
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/5717F175.6030608%40gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CALHSORrHtB5cqwU68QjK7JNkMaYWr1%3Dh9K7f1dkLFJ6Ltti4OQ%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.


--
Rick Mann
rm...@latencyzero.com


William Hermans

unread,
Apr 20, 2016, 5:37:20 PM4/20/16
to beagl...@googlegroups.com
Keep in mind I'm on 4.4.7-bone-rt-r9, not 4.1.x. Dunno if that matters.

We're trying to determine that here. Were you able to get the audio cape loaded at all with a 4.1.x kernel ? We really do not want to move outside of a "stable" kernel if at all possible.

Robert Nelson

unread,
Apr 20, 2016, 5:40:07 PM4/20/16
to Beagle Board
On Wed, Apr 20, 2016 at 4:37 PM, William Hermans <yyr...@gmail.com> wrote:
Keep in mind I'm on 4.4.7-bone-rt-r9, not 4.1.x. Dunno if that matters.

We're trying to determine that here. Were you able to get the audio cape loaded at all with a 4.1.x kernel ? We really do not want to move outside of a "stable" kernel if at all possible.

4.4.x is also an lts, the overlay patches between v4.1.x and v4.4.x are almost identical..

getting really close to swap v4.1.x-ti for v4.4.x-ti... ;)

Regards,

William Hermans

unread,
Apr 20, 2016, 5:40:12 PM4/20/16
to beagl...@googlegroups.com
For the record, I edited recompiled the same main board file as evilwulfie, and . . .

william@beaglebone:~$ sudo sh -c "echo 'BB-BONE-AUDI-02' > /sys/devices/platform/bone_capemgr/slots"
william@beaglebone:~$ cat /sys/devices/platform/bone_capemgr/slots
 0: PF----  -1
 1: PF----  -1
 2: PF----  -1
 3: PF----  -1
william@beaglebone:~$ dmesg | grep BB-BONE-AUDI-02
[   47.785411] bone_capemgr bone_capemgr: part_number 'BB-BONE-AUDI-02', version 'N/A'
[   47.805914] bone_capemgr bone_capemgr: slot #4: 'Override Board Name,00A0,OverrideManuf,BB-BONE-AUDI-02'

Actually, dahm it, I forgot to edit uEnv.txt . . .

William Hermans

unread,
Apr 20, 2016, 5:41:12 PM4/20/16
to beagl...@googlegroups.com
4.4.x is also an lts, the overlay patches between v4.1.x and v4.4.x are almost identical..

getting really close to swap v4.1.x-ti for v4.4.x-ti... ;)

Regards,

Ok, so we're not sticking to the traditional even / odd minor version number meanings ?

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

Robert Nelson

unread,
Apr 20, 2016, 5:45:44 PM4/20/16
to Beagle Board
On Wed, Apr 20, 2016 at 4:41 PM, William Hermans <yyr...@gmail.com> wrote:
4.4.x is also an lts, the overlay patches between v4.1.x and v4.4.x are almost identical..

getting really close to swap v4.1.x-ti for v4.4.x-ti... ;)

Regards,

Ok, so we're not sticking to the traditional even / odd minor version number meanings ?


Nah, v4.1.x was just the outlieer...

ti's used: 3.14 -> 4.1 -> 4.4


Longterm release kernels
VersionMaintainerReleasedProjected EOL
4.4Greg Kroah-Hartman2016-01-10Feb, 2018
4.1Sasha Levin2015-06-21Sep, 2017
3.18Sasha Levin2014-12-07Jan, 2017
3.14Greg Kroah-Hartman2014-03-30Aug, 2016
3.12Jiri Slaby2013-11-03Jan, 2017
3.10Willy Tarreau2013-06-30Oct, 2017
3.4Li Zefan2012-05-20Sep, 2016
3.2Ben Hutchings2012-01-04May, 2018

Regards,

William Hermans

unread,
Apr 20, 2016, 5:45:49 PM4/20/16
to beagl...@googlegroups.com
Ok, still not working.

Robert, so is there anything note worthy not working in 4.4* ? We have to know up front . . .

William Hermans

unread,
Apr 20, 2016, 5:49:37 PM4/20/16
to beagl...@googlegroups.com
Oh, and right I dont know if it matter for any of this, but we're trying to avoid ti kernels if possible, so . . . but it seems Rick is using a bone kernel, so ill give that one a shot.

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

Robert Nelson

unread,
Apr 20, 2016, 5:52:12 PM4/20/16
to Beagle Board
On Wed, Apr 20, 2016 at 4:45 PM, William Hermans <yyr...@gmail.com> wrote:
Ok, still not working.

Robert, so is there anything note worthy not working in 4.4* ? We have to know up front . . .

It's in pretty good shape...

am335x:
remoteproc_pruss (not ported)

bbgw = wl1835 & mmc3 fighting either other...

uio_pruss = (v4.4.x-bone) is reported to have been working..

x15: 

opencl: (remoteproc_<something>) not ready..

Regards,

William Hermans

unread,
Apr 20, 2016, 5:59:45 PM4/20/16
to beagl...@googlegroups.com
Robert, one more question for now if you do not mind. Is there a location on the web where i can view or find this information out myself, without having to bug you all the time ? Well I mean version status, etc.

Thanks for the help, as always :)

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

William Hermans

unread,
Apr 20, 2016, 6:05:33 PM4/20/16
to beagl...@googlegroups.com
Ok it is still not working, I'm kind of at a dead end now. I dont know how to proceed from here.

william@beaglebone:~$ sudo sh -c "echo 'BB-BONE-AUDI-02' > /sys/devices/platform/bone_capemgr/slots"
william@beaglebone:~$ cat /sys/devices/platform/bone_capemgr/slots
 0: PF----  -1
 1: PF----  -1
 2: PF----  -1
 3: PF----  -1
william@beaglebone:~$ uname -r
4.4.7-bone-rt-r9
william@beaglebone:~$ cat /etc/dogtag
BeagleBoard.org Debian Image 2015-03-01
william@beaglebone:~$ dtc -v
Version: DTC 1.4.1-g1e75ebc9

William Hermans

unread,
Apr 20, 2016, 6:10:50 PM4/20/16
to beagl...@googlegroups.com
I'm still seeing this:


pin 82 (44e10948.0): 4a101000.mdio (GPIO UNCLAIMED) function davinci_mdio_default group davinci_mdio_default
pin 83 (44e1094c.0): 4a101000.mdio (GPIO UNCLAIMED) function davinci_mdio_default group davinci_mdio_default


Are these pins required for the ethernet MAC ? And are they interfering with the McASP module ?

William Hermans

unread,
Apr 20, 2016, 6:22:50 PM4/20/16
to beagl...@googlegroups.com
Is the audio cape another one of those eeprom capes that need physical hardware in order to load properly ? Because I do not have the physical cape.

evilwulfie

unread,
Apr 20, 2016, 7:55:36 PM4/20/16
to beagl...@googlegroups.com
So much i dont know.


rick or robert where might i get this file ?

am33xx-es2.dtsi

Its not in the dts-rebuilder i installed and Ricks new dts file seems to
require it to compile

src/arm/am335x-boneblack-audio-emmc.dts:11:27: fatal error:
am33xx-es2.dtsi: No such file or directory

Designing hardware is so much more easier :P

I remember firmware in the old days patch the code and burn some
bipolar proms install and continue

Rick Mann

unread,
Apr 20, 2016, 7:57:21 PM4/20/16
to beagl...@googlegroups.com
You probably need to switch to the 4.4.x branch.
> To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/571816F6.9050201%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.


--
Rick Mann
rm...@latencyzero.com


William Hermans

unread,
Apr 20, 2016, 8:00:57 PM4/20/16
to beagl...@googlegroups.com
Rick, that's not the problem dtb-rebuilder and bb.org-overlays neither of these git's have that source file.

Robert Nelson

unread,
Apr 20, 2016, 8:01:52 PM4/20/16
to Beagle Board
On Wed, Apr 20, 2016 at 6:55 PM, evilwulfie <evilw...@gmail.com> wrote:
So much i dont know.


rick or robert where might i get this file ?

am33xx-es2.dtsi

Its not in the dts-rebuilder i installed and Ricks new dts file seems to
require it to compile

src/arm/am335x-boneblack-audio-emmc.dts:11:27: fatal error:
am33xx-es2.dtsi: No such file or directory

Designing hardware is so much more easier :P

I remember firmware in the old days  patch the code and burn some
bipolar proms  install and continue

am33xx-es2.dtsi is on the 4.4.x branch..  you had mentioned " 4.1.14-bone-rt-r17 " that's why i pointed out 4.1.x...

Regards,

William Hermans

unread,
Apr 20, 2016, 8:03:32 PM4/20/16
to beagl...@googlegroups.com
Do'h just dawned on me hah ! Sorry Rick !

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

William Hermans

unread,
Apr 20, 2016, 8:09:46 PM4/20/16
to beagl...@googlegroups.com
Here ya go evilwulfie exact steps . . . just make sure you backup any files you have in there that you may need . . .

william@beaglebone:~$ rm -rf dtb-rebuilder/
william@beaglebone:~$ git clone -b 4.4.x https://github.com/RobertCNelson/dtb-rebuilder
Cloning into 'dtb-rebuilder'...
remote: Counting objects: 7106, done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 7106 (delta 2), reused 0 (delta 0), pack-reused 7095
Receiving objects: 100% (7106/7106), 4.74 MiB | 339 KiB/s, done.
Resolving deltas: 100% (3135/3135), done.

Rick Mann

unread,
Apr 20, 2016, 8:10:07 PM4/20/16
to beagl...@googlegroups.com
Message has been deleted

Rick Mann

unread,
Apr 20, 2016, 9:19:27 PM4/20/16
to beagl...@googlegroups.com, cont...@rafaelvega.co

> On Apr 20, 2016, at 18:13 , Rafael Vega <cont...@rafaelvega.co> wrote:
>
>
>
> move all the remaining entries that are in the overlay into a new .dts file based on this <
> http://pastebin.com/Wja7ZQRk>, compile that, and load it at boot.
>
>
> Here's my attempt to do what you suggest:

> [snip]
>
> I compiled it as am335x-boneblack-audio-fixed.dtb, copied it to /boot/dtbs/4.4.7-bone-rt-r9 and added # dtb=am335x-boneblack-audio-fixed.dtb to /boot/uEnv.txt. When I try to boot the board the 4 user leds stay lit. No luck booting.
>
> Can someone spot an error on the dts or suggest a way to find error messages?

That seems reasonable, but I haven't tried it myself. Obviously, you should connect to the serial console and see what messages are output there.

Are you able to make it work with my original .dtb and loading the BB-BONE-AUDI-02 overlay via capemgr?

--
Rick Mann
rm...@latencyzero.com


Rafael Vega

unread,
Apr 20, 2016, 9:21:42 PM4/20/16
to BeagleBoard, cont...@rafaelvega.co


On Wednesday, April 20, 2016 at 3:28:23 PM UTC-5, Rick M wrote:
move all the remaining entries that are in the overlay into a new .dts file based on this <
http://pastebin.com/Wja7ZQRk>, compile that, and load it at boot.


Here's my attempt to do what you suggest: https://gist.github.com/rvega/aebb225155b7c8990b3593f3a90851eb
It compiles as am335x-boneblack-audio-fixed.dtb without any error messages, I copied the dtb to /boot/dtbs/4.4.7-bone-rt-r9, added  dtb=am335x-boneblack-audio-fixed.dtb to uEnv.txt and rebooted the board but when powering up, the 4 user leds stay lit and the heartbeat never starts. No luck booting.

Can anyone spot the error on the dts or suggest a way to get error messages?

evilwulfie

unread,
Apr 20, 2016, 9:45:19 PM4/20/16
to beagl...@googlegroups.com
lol  i am recovering from the same issue  :P
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


Virus-free. www.avast.com

Robert Nelson

unread,
Apr 20, 2016, 11:17:23 PM4/20/16
to Beagle Board, Rafael Vega
Yeah, that's very broken..  Here's a quick copy/paste/etc...


I'd say it's 95% there, didn't try building it..

Regards

William Hermans

unread,
Apr 21, 2016, 12:04:05 AM4/21/16
to beagl...@googlegroups.com
I'm still attempting to get the audio cape overlay to load. Anyone have a clue as to why it might not work ? Something that did cross my mind is that perhaps that edma fix include is being included in yet another source file. Somethign else that is being included.

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

William Hermans

unread,
Apr 21, 2016, 12:39:18 AM4/21/16
to beagl...@googlegroups.com
Ah, right, so I'm in the right place ;) I just so happened to fire up the serial debug port on the remote end

[  241.060498] bone_capemgr bone_capemgr: part_number 'BB-BONE-AUDI-02', version 'N/A'
[  241.068352] bone_capemgr bone_capemgr: slot #4: override
[  241.073705] bone_capemgr bone_capemgr: Using override eeprom data at slot 4
[  241.081431] bone_capemgr bone_capemgr: slot #4: 'Override Board Name,00A0,Override Manuf,BB-BONE-AUDI-02'
[  241.094660] of_resolve_phandles: Could not find symbol 'clk_mcasp0'
[  241.101464] bone_capemgr bone_capemgr: slot #4: Failed to resolve tree


Rick Mann

unread,
Apr 21, 2016, 1:54:29 AM4/21/16
to beagl...@googlegroups.com
Yeah, so this was the problem I ran into a few weeks ago. There's a thread on it, but I thought the dts I posted addressed it.
> To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CALHSORpT3i6OF3iFLArykU8x-zOFB%3DgB1sfUPC%2BgjCzU9sN7QA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.


--
Rick Mann
rm...@latencyzero.com


Rick Mann

unread,
Apr 21, 2016, 1:54:41 AM4/21/16
to beagl...@googlegroups.com
Er, I guess *this* is the thread on that.

> On Apr 20, 2016, at 21:39 , William Hermans <yyr...@gmail.com> wrote:
>
> To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CALHSORpT3i6OF3iFLArykU8x-zOFB%3DgB1sfUPC%2BgjCzU9sN7QA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.


--
Rick Mann
rm...@latencyzero.com


William Hermans

unread,
Apr 21, 2016, 2:44:57 AM4/21/16
to beagl...@googlegroups.com
Yeah, right now I'm just trying to get the audio cape to load. The audio cape of our project is actually one of two potential daughter capes, and we're not in a huge hurry to figure all that out. But I figured since you all are doing this, now I'd join in and see if i could help or not. Plus, yes, get our cape working in the process ;)

Also, my buddy tried one of your capes, and it wound up locking his board up at boot. But the funny thing was, I took his sdcard, and rewrote the dtb= line myself, and the board still would not boot. I had to revert it to an older kernel. So yeah, no idea exactly what was going on. Hard to keep track of what I'm doing, and what he's doing at the same time . . .

William Hermans

unread,
Apr 21, 2016, 2:52:31 AM4/21/16
to beagl...@googlegroups.com
Rick, ah I gotcha now I guess. I'd have to use this -> http://pastebin.com/Wja7ZQRk edit out the edma include line, compile, and then load that up as my dtb= line. Then, perhaps the audio cape will load. It seems as though the McASP stuff has been rewritten since 3.8.x, and the clk_mcasp0 "object" either got renamed, or removed.

Rick Mann

unread,
Apr 21, 2016, 3:15:28 AM4/21/16
to beagl...@googlegroups.com

> On Apr 20, 2016, at 23:52 , William Hermans <yyr...@gmail.com> wrote:
>
> Rick, ah I gotcha now I guess. I'd have to use this -> http://pastebin.com/Wja7ZQRk edit out the edma include line, compile, and then load that up as my dtb= line. Then, perhaps the audio cape will load. It seems as though the McASP stuff has been rewritten since 3.8.x, and the clk_mcasp0 "object" either got renamed, or removed.

Yeah, that's the file that's working for me, EXCEPT: I modified my am33xx-overlay-edma-fix.dtsi to comment out the two mcasp entries. If I boot with that (on 4.4.7-bone-rt-r9), then I can load the BB-BONE-AUDI-02 overlay, and then I can use aplay and speaker-test.

At this point, though, the channels are not quite right. Only the left works. This is hopefully due to a very badly configured ALSA.

BTW, your buddy surely didn't use my cape; I've only built one, and it's here. :-) The last few days I've been using the CircuitCo AudioCape Rev B (the Rev A has a different codec). My cape is almost identical to the Rev B, so I'll soon try it again.
> To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CALHSORoXn2E%3DUU%3DFikyd4OhhT6%3Ds1qdSQS2_M8jR_eW9g80G0Q%40mail.gmail.com.

Rafael Vega

unread,
Apr 21, 2016, 10:29:26 AM4/21/16
to BeagleBoard, cont...@rafaelvega.co


Are you able to make it work with my original .dtb and loading the BB-BONE-AUDI-02 overlay via capemgr?


When I do this, the overlay loads fine and I can see the mcasp0 pins being driven by the BBB when I start aplay or speaker-test. However, I can't see any analog signals coming out of the codec. May I ask what ALSA or alsamixer configuration you are using to achieve output on the left channel?

Thanks for taking me this far!! :)
 

William Hermans

unread,
Apr 21, 2016, 1:21:12 PM4/21/16
to beagl...@googlegroups.com
Yeah, that's the file that's working for me, EXCEPT: I modified my am33xx-overlay-edma-fix.dtsi to comment out the two mcasp entries. If I boot with that (on 4.4.7-bone-rt-r9), then I can load the BB-BONE-AUDI-02 overlay, and then I can use aplay and speaker-test.

At this point, though, the channels are not quite right. Only the left works. This is hopefully due to a very badly configured ALSA.

Wish I had a physical cape, I'm very good at troubleshooting these sorts of issues. I'm thinking it's probably in the driver though. No reason, other than gut instinct.


BTW, your buddy surely didn't use my cape; I've only built one, and it's here. :-) The last few days I've been using the CircuitCo AudioCape Rev B (the Rev A has a different codec). My cape is almost identical to the Rev B, so I'll soon try it again.

Well, you know, I wasn't there . . . word of mouth sort of thing.

Anyway, I'll probably just comment out the edma fix file,  and just manualy load the SPI's later, or . . . actually I do not think we use any of the SPI modules from the processor.

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

Rafael Vega

unread,
Apr 21, 2016, 5:40:30 PM4/21/16
to BeagleBoard
I've made some progress but I still can't get any sound from the codec. I tried the two approaches suggested by Rick M earlier on this thread:

1) To use this dtb by Rick M and the audio cape overlay, and 2) to use this dtb (by RobertCNelson) with no overlay. In both cases I have the same apparent outcome: I can see I2C and I2S signals being driven by the BBB when I use aplay or speaker-test but I can't see any analog signal coming out of the codec.

I have played around with alsamixer, I have deleted /var/lib/alsa/asound.state, used the one from here and no luck...

I guess the next step would be to check the driver code and the codec datasheet to try to figure out what might be wrong. I found the code for the driver here (is that it?) but I have no experience in kernel-land development so I'm not sure what the compiling/debugging workflow would be...  My initial questions are:

1. How do you compile and install the driver/module without recompiling and installing the whole kernel?
2. How does the driver code integrates with the device tree system? I can't see anyting in the driver code that suggests it's taking values or it's functions are being called from the dtb or the overlay.
3. What is the simplest 'log' function callable from kernel land and where do I see the output?

Any advice on  this would be appreciated!

:)

Rick Mann

unread,
Apr 21, 2016, 5:51:52 PM4/21/16
to beagl...@googlegroups.com, Rafael Vega
I don't have the BBB connected at the moment, but if I don't get you the configuration by tonight, please feel free to email me again.
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/78d35232-c66d-49e8-841c-f77f99e5e368%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


--
Rick Mann
rm...@latencyzero.com


William Hermans

unread,
Apr 22, 2016, 2:41:29 AM4/22/16
to beagl...@googlegroups.com
Progress. I was able to get teh audio cape to load in 4.1.x.


william@beaglebone:~$ sudo sh -c "echo 'BB-BONE-AUDI-02' > /sys/devices/platform/bone_capemgr/slots"
[  104.123082] bone_capemgr bone_capemgr: part_number 'BB-BONE-AUDI-02', version 'N/A'
[  104.130898] bone_capemgr bone_capemgr: slot #4: override
[  104.136277] bone_capemgr bone_capemgr: Using override eeprom data at slot 4
[  104.143283] bone_capemgr bone_capemgr: slot #4: 'Override Board Name,00A0,Override Manuf,BB-BONE-AUDI-02'
[  104.157826] bone_capemgr bone_capemgr: slot #4: dtbo 'BB-BONE-AUDI-02-00A0.dtbo' loaded; overlay id #0
[  104.311953] 2-0018 supply IOVDD not found, using dummy regulator
[  104.318146] 2-0018 supply DVDD not found, using dummy regulator
[  104.324235] 2-0018 supply AVDD not found, using dummy regulator
[  104.330270] 2-0018 supply DRVDD not found, using dummy regulator
[  104.339740] asoc-simple-card sound: tlv320aic3x-hifi <-> 48038000.mcasp mapping ok

I used your device tree board file exactly Rick, with one modification.

#include "am33xx.dtsi"
#include "am335x-bone-common.dtsi"

The other two includes were removed. The rest of your source file is exactly the same. But the am33xx-es2.dtsi include
file looked pretty much useless to me for this end goal. Looked like it had mostly to do with voltage / processor frequency
scaling. Since I did not know if that was a 4.4.x specific feature, I just removed the include.

/*
* Device Tree Source for AM33XX SoC
*
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
*
* This file is licensed under the terms of the GNU General Public License
* version 2. This program is licensed "as is" without any warranty of any
* kind, whether express or implied.
*/

/ {
cpus {
cpu@0 {
/*
* To consider voltage drop between PMIC and SoC,
* tolerance value is reduced to 2% from 4% and
* voltage value is increased as a precaution.
*/
operating-points = <
/* kHz uV */
1000000 1325000
800000 1300000
600000 1112000
300000 969000
>;
voltage-tolerance = <2>; /* 2 percentage */

clocks = <&dpll_mpu_ck>;
clock-names = "cpu";

clock-latency = <300000>; /* From omap-cpufreq driver */
};
};
};


Rick Mann

unread,
Apr 22, 2016, 2:56:34 AM4/22/16
to beagl...@googlegroups.com
Good news! Thanks for all the work.
> To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CALHSORpyfyQ7K5SSOVj-Hx-zGWcZ6RozKx3QKtQG6nhFrDqMxQ%40mail.gmail.com.

William Hermans

unread,
Apr 22, 2016, 3:14:08 AM4/22/16
to beagl...@googlegroups.com
You're welcome Rick, and hey it will benefit me too in the future. Also just to make sure you notice I switched back to 4.1.x

william@beaglebone:~$ uname -r
4.1.18-bone-rt-r19


The problem with 4.4.x is that I've been gettign all kinds of strange behavior from it, that I could not nail down. Then today( maybe you saw my posts ) I was able to finally nail down a specific issue with capemgr. I'm not sure what eactly is causing the problem, but there is a problem there *somewhere*.

So for now, I'm back to 4.1.x

Rick Mann

unread,
Apr 22, 2016, 3:33:22 AM4/22/16
to beagl...@googlegroups.com
I did see that. I'll keep it in mind when I try to get the rest of my cape up and running on 4.4.x.
> To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CALHSORrJnsVu_c1KuKF3xpRyiQF%3D8QXe%2BCuA0fHDkN0FKACx9g%40mail.gmail.com.

evilwulfie

unread,
Apr 22, 2016, 4:07:32 PM4/22/16
to beagl...@googlegroups.com
worked for me too    *yay*  now on to real work

For more options, visit https://groups.google.com/d/optout.


Virus-free. www.avast.com

engka...@gmail.com

unread,
Jul 19, 2017, 12:21:09 PM7/19/17
to BeagleBoard
This might be an old thread but I got a question. I was able to compile and load the modified device tree. I then loaded my overlay for the audio. I built this circuit base from http://elinux.org/CircuitCo:Audio_Cape_RevB. The only difference with mine is that I am using I2C1. I can see the it is using address 0x18 dmesg has:
[  135.176315] asoc-simple-card sound: tlv320aic3x-hifi <-> 48038000.mcasp mapping ok

However, when I call on the speaker-test, this error appears:


Unable to set hw params for playback: Invalid argument
Setting of hwparams failed: Invalid argument


Checking dmesg:
[  617.051387] davinci-mcasp 48038000.mcasp: stream has more channels (2) than are enabled in mcasp (0)
[  617.051781] davinci-mcasp 48038000.mcasp: ASoC: can't set 48038000.mcasp hw params: -22

Has anyone encountered the same problem?




On Monday, April 4, 2016 at 5:48:01 PM UTC+8, Rick M wrote:
I'm trying to get my audio cape to work (which is nearly identical to the cape that was available for sale). I've had it working to some level of success with past kernels (3.1.18), but now I'm on 4.4.6. My existing DTS didn't work, so I'm looking at how the BB-BONE-AUDI-02 DTS is written.

One of the differences is that it doesn't explicitly call out the McASP clock frequency like the older one did. Instead, it seems to refer to clk_mcasp0. But when I copy the same code into my DTS, I get:

[  103.180866] of_resolve_phandles: Could not find symbol 'clk_mcasp0'
[  103.187269] bone_capemgr bone_capemgr: slot #4: Failed to resolve tree

I found it defined by grepping /boot/dtbs. It's in /boot/dtbs/4.4.6-bone-rt-r6/am335x-abbbi.dtb. Where can I find the source files for these DTBs?

Is this dtb part of what's loaded by default in 4.4.6-bone-rt-r6? If not, can I copy the definition into my

FWIW, here's my DTS and some output from dmesg: http://pastebin.com/niDkWdWV

Thanks,


--
Rick Mann
rm...@latencyzero.com


Mike Davis

unread,
Aug 9, 2017, 3:27:56 PM8/9/17
to BeagleBoard, engka...@gmail.com
I have the same issue.
I am running kernel debian with kernel 4.4.52-bone16
I pulled down RobertCNelson's dtb-rebuilder from https://github.com/RobertCNelson/dtb-rebuilder, branch 4.4.x and rebuilt all the arm dtbs and installed them.
Then added then updated my *base* dtb, which is am335x-boneblack-emmc-overlay.dtb with the clock definitions in am335x-boneblack-audio.dts, 

Reboot, then install the audio: sudo sh -c "echo BB-BONE-AUDI-02 > /sys/devices/platform/bone_capemgr/slots"

All seems ok in dmesg:
[  411.768801] bone_capemgr bone_capemgr: part_number 'BB-BONE-AUDI-02', version 'N/A'
[  411.768866] bone_capemgr bone_capemgr: slot #4: override
[  411.774250] bone_capemgr bone_capemgr: Using override eeprom data at slot 4
[  411.774295] bone_capemgr bone_capemgr: slot #4: 'Override Board Name,00A0,Override Manuf,BB-BONE-AUDI-02'
[  411.811080] bone_capemgr bone_capemgr: slot #4: dtbo 'BB-BONE-AUDI-02-00A0.dtbo' loaded; overlay id #0

but speaker-test and aplay both fail with:
[ 2632.788052] davinci-mcasp 48038000.mcasp: stream has more channels (2) than are enabled in mcasp (0)
[ 2632.788110] davinci-mcasp 48038000.mcasp: ASoC: can't set 48038000.mcasp hw params: -22

Mike Davis

unread,
Aug 10, 2017, 11:30:14 AM8/10/17
to BeagleBoard, engka...@gmail.com
I managed to get this working, thanks to a post on the alsa-devel forum:

By loading the overlay *before* the sound drivers, rather than after it now works.
from /boot/uEnv.txt:
##Example v4.1.x
#cape_disable=bone_capemgr.disable_partno=
cape_enable=bone_capemgr.enable_partno=BB-BONE-AUDI-02
Reply all
Reply to author
Forward
0 new messages