arm: dart6ul: read and print SoM info from eeprom on startup
authorMarc Ferland <ferlandm@amotus.ca>
Tue, 22 Dec 2020 19:24:12 +0000 (14:24 -0500)
committerStefano Babic <sbabic@denx.de>
Sat, 26 Dec 2020 13:56:09 +0000 (14:56 +0100)
commit37648b600cd16848e689e341b20da71356e24212
tree3d180989d5ef6409b2e1f9d396a2177a43bcb9bf
parentd4d7b663b8cae5ef4209aaef21a2435a7d5d4dd7
arm: dart6ul: read and print SoM info from eeprom on startup

The dart6ul has an i2c eeprom at 0x50 which contains, among other
things, the manufacturing/revision/options info of the SoM. This patch
replaces the current checkboard() implementation with a more
exhaustive one based on the content of the eeprom.

Since this code uses the new driver model, some changes were also
required in the DTS to make the nodes related to i2c available before
relocation.

This code was inspired from the supported u-boot code from Variscite
which can be found here:

https://github.com/varigit/uboot-imx/tree/imx_v2018.03_4.14.78_1.0.0_ga_var02

New output example:

Board: PN: VSM-6UL-705B, Assy: AS1812142257, Date: 2019 Feb 17
       Storage: eMMC, Wifi: yes, DDR: 1024 MiB, Rev: 2.4G

Signed-off-by: Marc Ferland <ferlandm@amotus.ca>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
arch/arm/dts/imx6ull-dart-6ul.dtsi
board/variscite/dart_6ul/dart_6ul.c
configs/variscite_dart6ul_defconfig