board: gateworks: venice: add board model to dt
authorTim Harvey <tharvey@gateworks.com>
Tue, 27 Jul 2021 22:19:40 +0000 (15:19 -0700)
committerStefano Babic <sbabic@denx.de>
Mon, 9 Aug 2021 12:46:50 +0000 (14:46 +0200)
Add the specific board model from EEPROM config to the device-tree to
make it easier to access from Linux userspace.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
board/gateworks/venice/imx8mm_venice.c
configs/imx8mm_venice_defconfig

index ca01e75..2a97d55 100644 (file)
@@ -152,3 +152,11 @@ int board_mmc_get_env_dev(int devno)
 {
        return devno;
 }
+
+int ft_board_setup(void *blob, struct bd_info *bd)
+{
+       /* set board model dt prop */
+       fdt_setprop_string(blob, 0, "board", gsc_get_model());
+
+       return 0;
+}
index d8d930a..44ff5f8 100644 (file)
@@ -27,6 +27,7 @@ CONFIG_FIT=y
 CONFIG_FIT_EXTERNAL_OFFSET=0x3000
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh"
+CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_SYSTEM_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/imx8m/imximage-8mm-lpddr4.cfg"
 # CONFIG_USE_BOOTCOMMAND is not set