All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Harvey <tharvey@gateworks.com>
To: Stefano Babic <sbabic@denx.de>,
	Fabio Estevam <festevam@gmail.com>,
	"NXP i . MX U-Boot Team" <uboot-imx@nxp.com>,
	u-boot@lists.denx.de
Cc: Tim Harvey <tharvey@gateworks.com>
Subject: [PATCH 8/9] board: gateworks: venice: add board model to dt
Date: Tue, 27 Jul 2021 15:19:40 -0700	[thread overview]
Message-ID: <20210727221941.10420-8-tharvey@gateworks.com> (raw)
In-Reply-To: <20210727221941.10420-1-tharvey@gateworks.com>

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 | 8 ++++++++
 configs/imx8mm_venice_defconfig        | 1 +
 2 files changed, 9 insertions(+)

diff --git a/board/gateworks/venice/imx8mm_venice.c b/board/gateworks/venice/imx8mm_venice.c
index ca01e75d0d..2a97d55d32 100644
--- a/board/gateworks/venice/imx8mm_venice.c
+++ b/board/gateworks/venice/imx8mm_venice.c
@@ -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;
+}
diff --git a/configs/imx8mm_venice_defconfig b/configs/imx8mm_venice_defconfig
index f1efdc60a4..58b00a6813 100644
--- a/configs/imx8mm_venice_defconfig
+++ b/configs/imx8mm_venice_defconfig
@@ -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
-- 
2.17.1


  parent reply	other threads:[~2021-07-27 22:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-27 22:19 [PATCH 1/9] configs: imx8mm_venice_defconfig: remove unused SPL features Tim Harvey
2021-07-27 22:19 ` [PATCH 2/9] arm: dts: imx8mm-venice-gw71xx: fix USB OTG VBUS Tim Harvey
2021-07-27 22:19 ` [PATCH 3/9] arm: dts: imx8mm-venice-gw700x: fix fifo-depth phy props Tim Harvey
2021-07-27 22:19 ` [PATCH 4/9] arm: dts: imx8mm-venice-gw7901: use common u-boot dtsi Tim Harvey
2021-07-27 22:19 ` [PATCH 5/9] board: gateworks: venice: get mem size from dt Tim Harvey
2021-07-27 22:19 ` [PATCH 6/9] board: gateworks: venice: use bus numbers vs names Tim Harvey
2021-07-27 22:19 ` [PATCH 7/9] board: gateworks: venice: add board model/serial# to env Tim Harvey
2021-07-27 22:19 ` Tim Harvey [this message]
2021-07-27 22:19 ` [PATCH 9/9] board: gateworks: venice: add imx8mm-gw7902 support Tim Harvey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210727221941.10420-8-tharvey@gateworks.com \
    --to=tharvey@gateworks.com \
    --cc=festevam@gmail.com \
    --cc=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-imx@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.