From: Detlev Casanova <detlev.casanova@collabora.com>
To: u-boot@lists.denx.de
Cc: Marek Vasut <marek.vasut+renesas@mailbox.org>,
Hai Pham <hai.pham.ud@renesas.com>,
Tam Nguyen <tam.nguyen.xa@renesas.com>,
Detlev Casanova <detlev.casanova@collabora.com>
Subject: [PATCH v1 4/4] configs: rcar3: Add shell function to select the linux devicetree
Date: Fri, 16 Jun 2023 11:21:22 -0400 [thread overview]
Message-ID: <20230616152122.588168-5-detlev.casanova@collabora.com> (raw)
In-Reply-To: <20230616152122.588168-1-detlev.casanova@collabora.com>
This function uses the sysinfo command to determine which linux device
tree is selected for the running board.
Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
---
configs/rcar3_ulcb_defconfig | 1 +
include/configs/rcar-gen3-common.h | 9 ++++++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/configs/rcar3_ulcb_defconfig b/configs/rcar3_ulcb_defconfig
index b8fdb5e3826..bb5f8f742ea 100644
--- a/configs/rcar3_ulcb_defconfig
+++ b/configs/rcar3_ulcb_defconfig
@@ -47,6 +47,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_SYSINFO=y
CONFIG_OF_CONTROL=y
CONFIG_OF_LIST="r8a77950-ulcb-u-boot r8a77960-ulcb-u-boot r8a77965-ulcb-u-boot"
CONFIG_MULTI_DTB_FIT_LZO=y
diff --git a/include/configs/rcar-gen3-common.h b/include/configs/rcar-gen3-common.h
index 213caa75238..b278eb85a81 100644
--- a/include/configs/rcar-gen3-common.h
+++ b/include/configs/rcar-gen3-common.h
@@ -33,6 +33,13 @@
/* ENV setting */
#define CFG_EXTRA_ENV_SETTINGS \
- "bootm_size=0x10000000\0"
+ "bootm_size=0x10000000\0" \
+ "set_board_fdt=sysinfo revision board_rev; " \
+ "sysinfo id board_id; " \
+ "if test ${board_rev} = 2.1 && test ${board_id} = 0x0b; then " \
+ "setenv fdtfile renesas/r8a779m1-ulcb.dtb; " \
+ "elif test ${board_rev} = 2.0 && test ${board_id} = 0x0b; then "\
+ "setenv fdtfile renesas/r8a77951-ulcb.dtb; " \
+ "fi\0" \
#endif /* __RCAR_GEN3_COMMON_H */
--
2.39.3
next prev parent reply other threads:[~2023-06-16 15:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-16 15:21 [PATCH v1 0/4] Introduce the sysinfo command Detlev Casanova
2023-06-16 15:21 ` [PATCH v1 1/4] sysinfo: Add IDs for board id and revision Detlev Casanova
2023-06-16 15:21 ` [PATCH v1 2/4] cmd: Add a sysinfo command Detlev Casanova
2023-06-17 0:41 ` Marek Vasut
2023-06-16 15:21 ` [PATCH v1 3/4] sysinfo: rcar3: Implement BOARD_ID and BOARD_REVISION Detlev Casanova
2023-06-17 0:43 ` Marek Vasut
2023-06-19 14:42 ` Detlev Casanova
2023-06-19 16:11 ` Marek Vasut
2023-06-19 18:27 ` Detlev Casanova
2023-06-19 21:54 ` Marek Vasut
2023-06-20 17:49 ` Detlev Casanova
2023-06-20 20:03 ` Marek Vasut
2023-06-20 20:40 ` Detlev Casanova
2023-06-21 3:49 ` Marek Vasut
2023-06-16 15:21 ` Detlev Casanova [this message]
2023-06-17 0:45 ` [PATCH v1 4/4] configs: rcar3: Add shell function to select the linux devicetree Marek Vasut
2023-06-19 14:45 ` Detlev Casanova
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=20230616152122.588168-5-detlev.casanova@collabora.com \
--to=detlev.casanova@collabora.com \
--cc=hai.pham.ud@renesas.com \
--cc=marek.vasut+renesas@mailbox.org \
--cc=tam.nguyen.xa@renesas.com \
--cc=u-boot@lists.denx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox