PDA detection at boot time

Last modified by Microchip on 2025/02/28 14:44

PDA detection at boot time

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

Since U-boot 2018.07, released with linux4sam_6.0, we have the feature of auto detection of the connected PDA screen

One wire EEPROM

The PDAs have a 512-byte Maxim DS24 1wire EEPROM which is available on the 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 SoC.

Please check below table for information and hardware required adjustments:

  
Board name Hardware changes required
Sama5d4Xplained R32 must be moved to position R33
Sama5d3Xplained None
Sama5d2Xplained None
Sama5d2PtcEK R95 must be populated
Sama5d27Som1EK None
Sama5d27WLSom1EK None
Sam9x60EK None

U-boot behavior

At boot time, U-boot will:

  • Initialize 1wire 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

Tips: 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

 Tips: 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 with. For more information visit how to manually select your PDA at boot and how to use FIT image and the U-boot environment explained.

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.

Further more, if we inspect the U-boot environment:

=> 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

We can see that the variable 'pda' was configured. This can be used in the booting mechanism to inform the OS that the PDA is connected.</br>

Related Topics

Boards

Sam9x60EK
Sama5d27WLSom1EK
Sama5d27Som1EK
Sama5d2PtcEK
Sama5d2Xplained
Sama5d3Xplained
Sama5d4Xplained

Components

U-Boot

Summary

PDA detection in U-boot