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
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.
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
Example
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:
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
- SAM9X60-EK
- SAMA5D27-WLSOM1
- SAMA5D27-SOM1-EK1
- SAMA5D2-PTC-EK
- SAMA5D2 Xplained
- SAMA5D3 Xplained
- SAMA5D4 Xplained
Components
Summary
PDA detection in U-boot