AM335x SoC Kernel Change: version 4.x to 5.x


We have been running kernel 4.8 with Robert C. Nelson’s patches for years on our custom embedded AM335x platform (thank you!). Our device uses many of the same components as the Beaglebone Black, including the TLV320AIC3x audio codec. We have created a custom DTS for our board, but otherwise, not made changes to his am33x-v4.8 patched kernel.

I’ve recently attempted to upgrade the kernel to LTS versions 5.4 and 5.10 by following the RobertCNelson/bb-kernel github instructions. I then added our DTS files and built the kernel with our board’s defconfig. I ran into several issues running these 5.x kernel versions:

Kernel 5.4 boots OK, but the soundcard is not found:
aplay: device_list:270: no soundcards found…

It looks like the davinci and omap sound directories were merged into the sound/soc/ti directory, and the davinci-evm machine driver config option (SND_AM33XX_SOC_EVM) we were using was removed:

With our old kernel defconfig, the davinci-evm driver was not being built in the 5.4 kernel, so I tried to build it with the SND_SOC_DAVINCI_EVM config option, but this depends on ARCH_DAVINCI, which depends on ARCH_MULTI_V5; this apparently conflicts with ARCH_MULTI_V7, which is used for the ARMv7 Cortex-A platform.

Even when I build the davinci-evm driver with a different defconfig or hack, I still do not see the soundcard. Has anyone run into anything like this with the Beaglebone Black running kernel 5.4? Maybe there is something else I need to adjust in my kernel config and/or DTS with this kernel change?

I was originally hoping to get kernel 5.10 working on our board, but I ran into an entirely different problem: the kernel wouldn’t boot; it would just hang here when starting:
Starting kernel …

We are booting the image from an eMMC, but it looks like this could be problematic?

I will keep investigating, but any help or insight you can provide would be greatly appreciated.

Thank you!

Hi @cmg ,

On your old 4.8.x kernel, which modules are loaded? (lsmod)…

We can patch the Kconfig to build them on MULTI_V7…

Sorry, i don’t test sound very often, but v5.10.x-ti did make some noise on a lcd with speakers… (didn’t realize the lcd had built-in speakers…)

Do you have a boot log of eMMC?


1 Like

Hi Robert,

Thank you for the response. Here is a list of the loaded modules when running kernel 4.8:

Module                  Size  Used by
cppi41                  7511  60
musb_dsps               8831  0
musb_hdrc             112736  1 musb_dsps
phy_am335x              2591  6
phy_generic             5439  1 phy_am335x
phy_am335x_control      3129  1 phy_am335x
snd_soc_evm             4812  0
ti_am335x_adc           5754  0
kfifo_buf               3452  1 ti_am335x_adc
industrialio           47155  2 ti_am335x_adc,kfifo_buf
snd_soc_davinci_mcasp    16847  2
snd_soc_edma            1309  1 snd_soc_davinci_mcasp
snd_soc_omap            3514  1 snd_soc_davinci_mcasp
snd_soc_tlv320aic3x    48232  1
snd_soc_core          167304  5 snd_soc_davinci_mcasp,snd_soc_edma,snd_soc_evm,snd_soc_omap,snd_soc_tlv320aic3x
snd_pcm_dmaengine       5676  2 snd_soc_omap,snd_soc_core
snd_pcm                94259  5 snd_soc_davinci_mcasp,snd_pcm_dmaengine,snd_soc_omap,snd_soc_core,snd_soc_tlv320aic3x
musb_am335x             1566  0
snd_timer              22063  1 snd_pcm
snd                    62946  3 snd_timer,snd_soc_core,snd_pcm
soundcore               7445  1 snd
ti_am335x_tscadc        5837  1 ti_am335x_adc

When running kernel 5.10 (v5.10.106-bone62), here is the boot log before getting stuck at “Starting kernel …”:

       Watchdog enabled
I2C:   ready
DRAM:  512 MiB
Using default environment

Net:   <ethaddr> not set. Validating first E-fuse MAC
Hit any key to stop autoboot:  0
gpio: pin 53 (gpio 53) value is 1
Card did not respond to voltage select!
Card did not respond to voltage select!
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
switch to partitions #0, OK
mmc1(part 0) is current device
gpio: pin 54 (gpio 54) value is 1
gpio: pin 31 (gpio 31) value is 1
RTFM not pressed: booting normally
Checking for: /uEnv.txt ...
reading uEnv.txt
943 bytes read in 4 ms (229.5 KiB/s)
gpio: pin 55 (gpio 55) value is 1
Loaded environment from uEnv.txt
Importing environment from mmc ...
Checking if uenvcmd is set ...
gpio: pin 56 (gpio 56) value is 1
Running uenvcmd ...
Loading image from mmc...
reading zImage3
9490944 bytes read in 519 ms (17.4 MiB/s)
Loadng DT from mmc...
reading cyberdata-intercomv4.dtb
63982 bytes read in 11 ms (5.5 MiB/s)
Kernel image @ 0x82000000 [ 0x000000 - 0x90d200 ]
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Using Device Tree in place at 88000000, end 880129ed

Starting kernel ...

Note: when running kernel, 5.4 (v5.4.182-bone64), the board boots, but I run into the “no soundcards found…” issue when attempting to play audio.

I look forward to hearing from you. Thanks!

Enable earlyprintk… Probably mmc configuration…

Without seeing your DTS source, that’s a just a guess…