Skip to content
Advertisement

Linux kernel does not see all components on my at91sam9g20 board

I am working with a Stamp9g20 embedded chip. It is based on the Atmel at91sam9g20 platform. For a client I need to upgrade the kernel to a newer version. After a bit of research, I landed on the Linux4SAM pages and their additional yocto layer, complete with a 4.14 kernel!

However, when I compile that kernel, I don’t see all of my devices, for example, I can write onto the NAND memory and mount an USB device, but I cannot see nor mount any mmc/mci devices. I have tried checking how the Stamp9g20 really differs from the AT91SAM9G20EK, but I couldn’t find a definitive clue to an answer there.

The Linux4SAM repo supports slightly different versions of the AT91SAM9 family, but I got it working for the 4.14 kernel, using the at91sam9g20ek.dts as an input for the board. Had to add my machine to the compatible machine list, so it will compile for the 9g20 versions as well.

COMPATIBLE_MACHINE += 'at91sam9g20ek'

and my machine.conf looks like:

JavaScript

When the kernel launches, it shows that it registers a device driver onto the address 0xffff8000, but it doesn’t see a block device.

JavaScript

I have tried this board with the 2.6.x version where it works as expected.

How can I make the block device mmcblk available in the system? Do I need to change the .dts (currently I am using the at91sam9g20ek.dts as a template with a minor change to the NAND memory). Or what can I do to get more information as to why the kernel doesn’t interact with the mmc device?

Also, if I compare the source code from before the dts structure, I don’t see significant differences in the mcc part of the code: https://elixir.bootlin.com/linux/v3.6.9/source/arch/arm/mach-at91/board-sam9g20ek.c https://elixir.bootlin.com/linux/v3.6.9/source/arch/arm/mach-at91/board-stamp9g20.c

The only difference I found, at91sam9g20ek board:

JavaScript

stamp9g20 board:

JavaScript

so I tried changing the reg<> property in the dts to 1, but to no avail…

Advertisement

Answer

Found it! All I had to do was change the mmc slot (was 1) in the dts to slot 0:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement