Skip to contentSkip to conversation

armv8: ls1088ardb_pb: Add support for board detection

PATCH New Pramod Kumar 2 participants 2 messages Oct 12, 2018 – Dec 10, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 armv8: ls1088ardb_pb: Add support for board detection

ls1088ardb-pb and ls1088ardb both boards are ls1088a based soc, board type detection is dynamic at boot time

---
 board/freescale/ls1088a/ls1088a.c | 27 +++++++++++++++++++++++++--
 include/configs/ls1088a_common.h  |  3 ++-
 2 files changed, 27 insertions(+), 3 deletions(-)
board/freescale/ls1088a/ls1088a.c +25 -2
index 517a8ceed9..1e2ad98c6e 100644
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0+
 /*
- * Copyright 2017 NXP
+ * Copyright 2017-2018 NXP
  */
 #include <common.h>
 #include <i2c.h>
@@ -67,6 +67,24 @@ int init_func_vid(void)
 }
 #endif
 
+int is_pb_board(void)
+{
+	u8 board_id;
+
+	board_id = QIXIS_READ(id);
+	if (board_id == LS1088ARDB_PB_BOARD)
+		return 1;
+	else
+		return 0;
+}
+
+int fixup_ls1088ardb_pb_banner(void *fdt)
+{
+	fdt_setprop_string(fdt, 0, "model", "LS1088ARDB-PB Board");
+
+	return 0;
+}
+
 #if !defined(CONFIG_SPL_BUILD)
 int checkboard(void)
 {
@@ -79,7 +97,10 @@ int checkboard(void)
 #ifdef CONFIG_TARGET_LS1088AQDS
 	printf("Board: LS1088A-QDS, ");
 #else
-	printf("Board: LS1088A-RDB, ");
+	if (is_pb_board())
+		printf("Board: LS1088ARDB-PB, ");
+	else
+		printf("Board: LS1088A-RDB, ");
 #endif
 
 	sw = QIXIS_READ(arch);
@@ -585,6 +606,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 	if (err)
 		return err;
 #endif
+	if (is_pb_board())
+		fixup_ls1088ardb_pb_banner(blob);
 
 	return 0;
 }
include/configs/ls1088a_common.h +2 -1
index 822fd76cc5..743d0cf30f 100644
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
- * Copyright 2017 NXP
+ * Copyright 2017-2018 NXP
  */
 
 #ifndef __LS1088_COMMON_H
@@ -27,6 +27,7 @@
 #include <asm/arch/config.h>
 #include <asm/arch/soc.h>
 
+#define LS1088ARDB_PB_BOARD            0x4A
 /* Link Definitions */
 #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_FSL_OCRAM_BASE + 0xfff0)
 
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 armv8: ls1088ardb_pb: Add support for board detection

Quoted 5 lines · Pramod Kumar

ls1088ardb-pb and ls1088ardb both boards are ls1088a based soc, board type detection is dynamic at boot time

---

This set is applied to fsl-qoriq master, awaiting upstream. Thanks.

York