How to manually select (or enforce) the PDA at boot time

How it works

How to select the PDA at boot time

Starting from Linux4SAM6.0 release, we release a single image named video that includes support for all our PDA screens and HDMI (for SAMA5D4 Xplained only).
U-boot has the feature of auto detect at boot time, but this does not work in all possible cases. Some boards may require hardware adjustment for this to work, or, we may want to select hdmi as screen, which is not detectable in U-boot.

TIP Tips: For which screens are supported and how to connect them, check the specific page.

How to manually select the PDA at boot time

If we manually set the display variable in U-boot with the desired PDA/HDMI screen, U-boot will automatically load the correct Device Tree Overlay and the corresponding video mode and will boot the Linux Kernel accordingly.
For example, if we want to have U-boot start the kernel with the PDA 5000 enabled, we need to stop the autoboot process, and at the U-boot prompt, issue the command:
setenv display 5000

We can save this variable in the environment so we do not need to repeat this process on every boot by running the following command:
saveenv

TIP Tips: If we have a display that U-boot will autodetect, the display variable will be replaced by the proper one of the detected display.

The table below summarizes the possible values of the display variable:

value effect
5000 Load PDA5000 setup
4300 Load PDA43XX setup
7000 Load PDA7000 setup
7000B Load PDA7000B setup
hdmi Load HDMI setup (only valid for SAMA5D4 Xplained)

How to manually force U-boot to always load the desired PDA

If we manually alter the U-boot booting command, we can force U-boot to start the kernel with the desired PDA support regardless of the detected PDA.
Here is the needed modification:
bootcmd_boot=ext4load mmc 0 0x24000000 boot/sama5d2_xplained.itb; bootm 0x24000000#kernel_dtb${at91_overlays_config}

Will change to:
bootcmd_boot=ext4load mmc 0 0x24000000 boot/sama5d2_xplained.itb; bootm 0x24000000#kernel_dtb#pda5

This will ensure that U-boot will always load pda5 setup regardless of the PDA detected.

The table below summarizes the possible overlays that can be added to the boot command line in U-boot:

value effect
pda5 Load PDA5000 setup
pda4 Load PDA43XX setup
pda7 Load PDA7000 setup
pda7b Load PDA7000B setup
hdmi Load HDMI setup (only valid for SAMA5D4 Xplained)


Practical example with TM4301B screen

The new TM4301B screen is not automatically configured by Linux4SAM 6.0. Its hardware is fully compatible with the previous revision TM4300 or TM4300B screens. So you can follow the above piece of advice to use it by selecting the PDA43XX setup in the table just above which corresponds to "pda4" string:

After having stopped the boot process, you can manually alter the U-boot booting command from the U-Boot prompt. Hereunder are some examples that you can adapt to your boot media and board name.

For the eMMC boot case on SAMA5D2 Xplained board:

setenv bootcmd_boot 'ext4load mmc 0 0x24000000 boot/sama5d2_xplained.itb; bootm 0x24000000#kernel_dtb#pda4'
saveenv
Or for SD Card boot case on SAMA5D27 SOM1 EK board:
setenv bootcmd 'fatload mmc 0:1 0x24000000 sama5d27_som1_ek.itb; bootm 0x24000000#kernel_dtb#pda4'
saveenv
r6 - 24 Oct 2019 - 09:03:51 - EugenHristev
 
Linux & Open Source for AT91 Microchip Microprocessors

Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.

Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.

Microchip and others, are registered trademarks or trademarks of Microchip Technology Inc. and its subsidiaries. This site is powered by the TWiki collaboration platform

Arm® and others are registered trademarks or trademarks of Arm Limited (or its affiliates). Other terms and product names may be trademarks of others.

Ideas, requests, contributions ? Connect to LinksToCommunities page.

Syndicate this siteRSS ATOM