PDA Detection at Boot Time

Last modified by Microchip on 2025/10/10 06:11

Introduction

Starting with U-boot 2018.07, U-boot can autodetect which PDA screen is connected (if any is connected).

How it Works

PDA Detection at Boot

The auto-detection of the connected PDA screen feature has been available since U-boot 2018.07 released with linux4sam_6.0.

One Wire EEPROM

The PDAs have a 512-byte Maxim DS24 1-Wire® EEPROM, which is available on pin 1 of the LCD connector. This memory holds the specific information for the PDA type.

Error

Not all evaluation kits have the pin 1 of the LCD connector properly connected to the SAMA5 System-on-Chip ​​​​​​(SoC).

Please check following table for information and hardware required adjustments:

  
Board name Hardware changes required
SAMA5D4 Xplained R32 must be moved to position R33
SAMA5D3 Xplained None
SAMA5D2 Xplained None
SAMA5D2-PTC-EK R95 must be populated
SAMA5D27-SOM1-EK1 None
SAMA5D27-WLSOM1 None
SAM9X60-EK None

U-boot Behavior

At boot time, U-boot will:

  • Initialize the 1-Wire bus and protocol on the GPIO connected on pin 1 of the LCD connector
  • Read the EEPROM memory of the PDA
  • Copy the contents of the PDA memory at the offset where the screen type is stored into an environment variable called "pda"
  • Print an information message in the booting log with the detected PDA
Information

Tip: Any potential PDA can be detected as long as it respects the same memory map for the connected EEPROM. U-boot will automatically copy the information from EEPROM in the pda environment variable.

Information

Tip: By default, in Linux4SAM 6.0 and later, U-boot comes with an environment that will take this information into account and select a specific PDA overlay to boot Linux®. For more information, visit the "How to Manually Select (or Enforce) the PDA at Boot Time" and "Using FIT Image and Device Tree Overlays" pages.

Example

U-Boot 2018.07-linux4sam_6.0 (Oct 03 2018 - 16:03:04 +0000)

CPU: SAMA5D27-CU
Crystal frequency:       12 MHz
CPU clock        :      498 MHz
Master clock     :      166 MHz
DRAM:  512 MiB
MMC:   sdio-host@a0000000: 0, sdio-host@b0000000: 1
Loading Environment from SPI Flash... SF: Detected at25df321a with page size 256 Bytes, erase size 4 KiB, total 4 MiB
OK
In:    serial@f8020000
Out:   serial@f8020000
Err:   serial@f8020000
PDA TM5000 detected
Net:   eth0: ethernet@f8008000
Hit any key to stop autoboot:  0

In this example, we can see that PDA TM5000 was detected.

Furthermore, if we inspect the U-boot environment, we can see that the pda variable was configured:

=> print
baudrate=115200
bootargs=console=ttyS0,115200 root=/dev/mmcblk0p1 rw rootfstype=ext4 rootwait atmel.pm_modes=standby,ulp1
bootcmd=ext4load mmc 0 0x24000000 boot/sama5d2_xplained.itb; bootm 0x24000000#kernel_dtb
bootdelay=1
ethaddr=fc:c2:3d:0d:1f:4b
fdtcontroladdr=3fb773c8
pda=5000
stderr=serial@f8020000
stdin=serial@f8020000
stdout=serial@f8020000

This can be used in the booting mechanism to inform the OS that the PDA is connected.

Related Topics

Boards

Components

Summary

PDA detection in U-boot