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.

Warning, important Warning, important Warning, important Not all evaluation kits have the pin 1 of the LCD connector properly connected to the SAMA5 SoC. Warning, important Warning, important Warning, important

Please check below 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
SAMA5D2 SOM1 EK None
SAMA5D2 WLSOM1 EK None
SAM9X60-EK 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

TIP 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.
TIP 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.

r8 - 24 Oct 2019 - 09:06:33 - 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