[SAMA5D4 Xplained Ultra] help needed with atmel-hlcdc


I have been trying and continuously failing to load the atmel-hlcdc drivers which would enable me to wok with a custom LCD panel.

I have managed to get the boot logo to appear for a brief moment during the u-boot phase but no sign of any atmel-hlcdc drivers after this.

The menu configuration lists the atmel-hlcdc drivers as selected but nothing ever gets written to the appropriate .dts file.

Apart from the steps listed in the eewiki for the sama5d4xplained what else should I have done to get the drivers loaded with kernel.

Hi @jotech, the sama5d4xplained does not ship with a default LCD, so the base *.dts file does not have any LCD data configured.

You will need to manually update the *.dts with the proper LCD device tree nodes:

Microchip has a repo here with a bunch of examples for common sama5d4xplained hardware:


Many thanks for the quick reply , I started following the instructions in the readme and hit this problem.

john@APACHE:~/dt-overlay-at91$ make sama5d4_xplained_dtbos
cc -E -nostdinc -I…/linux/include -I…/linux/arch/arm/boot/dts -x assembler-with-cpp -undef -o sama5d4_xplained/sama5d4_xplained_hdmi.pre.dtso sama5d4_xplained/sama5d4_xplained_hdmi.dtso
sama5d4_xplained/sama5d4_xplained_hdmi.dtso:14:10: fatal error: dt-bindings/pinctrl/at91.h: No such file or directory
#include “dt-bindings/pinctrl/at91.h”
compilation terminated.
Makefile:23: recipe for target ‘sama5d4_xplained/sama5d4_xplained_hdmi.pre.dtso’ failed
make: *** [sama5d4_xplained/sama5d4_xplained_hdmi.pre.dtso] Error 1

I can locate the at91.h file at various locations on my drive but not the dt-bindings directory, what have I have done wrong?

thanks again

For that you should open a bug report:

What I was recommending you to do, was take the mainline default sama5d4xplained *.dts file and manually add the lcd nodes from that dt-overlay-at91 that match your custom lcd.


1 Like

Many thanks Robert for the pointers , I took the dts from the pda4 sample . Apart from a few warnings in the boot up which I will try and sort myself I have the LCD booting nicely to the Ubuntu log in screen.



I am using the at91-sama5d4_xplained_pda4b.dtb renamed to at91-sama5d4_xplained.dtb.

At boot up I get the Microchip logo, then some garbage on screen followed by the Linux logo and finally the Ubuntu login prompt.

I can not get modetest to work as if fails to find any atmel-hlcdc drivers

snippet from my kernel booting log:

panel-simple panel: Linked as a consumer to regulator.2
[ 0.810000] panel-simple panel: Dropping the link to regulator.2
[ 0.820000] brd: module loaded
[ 0.840000] loop: module loaded
[ 0.850000] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 0.860000] [drm] No driver support for vblank timestamp query.
[ 0.860000] atmel-hlcdc-display-controller atmel-hlcdc-dc: failed to create HLCDC outputs: -517
[ 0.870000] atmel-hlcdc-display-controller atmel-hlcdc-dc: failed to initialize mode setting
[ 0.880000] atmel-nand-controller 80000000.nand: Failed to retrieve HSMC clock (err = -2)
[ 0.890000] atmel-nand-controller: probe of 80000000.nand failed with error -2
[ 0.900000] atmel_spi f8010000.spi: Using dma0chan3 (tx) and dma0chan4 (rx) for DMA transfers

do I also have to manually copy the VIDEO and DRM folders from the host machine to the SD card rootfs?

Hi @jotech, Sorry, i don’t have access to this hardware at my house. Both devices are on my desk at work, I’m going in on Friday to help out in the PDC, so i can grab these then.

Are you trying to get Xorg/Wayland to work?

Microchip’s documentation on this is here:


I’m thinking a basic /etc/X11/xorg.conf should get things working:

sudo apt update
sudo apt install read-edid xserver-xorg-video-fbdev x11-xserver-utils
Section "Monitor"
        Identifier      "Builtin Default Monitor"
Section "Device"
        Identifier      "Builtin Default fbdev Device 0"
        Driver          "fbdev"
Section "Screen"
        Identifier      "Builtin Default fbdev Screen 0"
        Device          "Builtin Default fbdev Device 0"
        Monitor         "Builtin Default Monitor"
Section "ServerLayout"
        Identifier      "Builtin Default Layout"
        Screen          "Builtin Default fbdev Screen 0"

Totally untested, but i should be able to test over the weekend…


My objective was to be able to test the GPU performance with a small square LCD that we currently use with a Rpi zero

I’m sorry, the “video” hardware on the SAMA5D4 was never designed to compete directly with any Rpi GPU…

from: https://www.linux4sam.org/bin/view/Linux4SAM/UsingAtmelDRMDriver

The atmel-hlcdc driver supports:

  • base layer
  • overlays (planes in DRM words)
  • alpha channel blending of overlays
  • color space conversion: RGB (different formats), YUV (different formats as well)
  • panning
  • rotation
  • scaling / upsampling
  • hardware cursor (when supported by hardware)


Yes I understand that, I wanted to see what sort of performance we could achieve with it - Is there anything in your portfolio that may be a better choice. I would still like to get the SAMA5d4 running with our panel as we have a number of applications some less demanding than others on the graphics side?

Hi @jotech, the STM32MP157 family is an interesting option:


It has a Vivante GCNano (not 100% on the exact Vivante model id) embedded GPU. So you get OpenGL ES 2.0 acceleration. However they don’t document which IP block, so 2D functionality isn’t known at this point.