diff mbox

[U-Boot,3/9] board: ti: am57xx: Add support for detection of X15 revb1

Message ID 20161125054426.20635-4-lokeshvutla@ti.com
State Accepted
Commit f7f9f6be95bc1f484ec118714defd3d6f6f10d4a
Delegated to: Tom Rini
Headers show

Commit Message

Lokesh Vutla Nov. 25, 2016, 5:44 a.m. UTC
BeagleBoard-X15 Rev B1 with SR1.1 platform have incompatible changes for HDMI
GPIO requiring new dtb support. This implies we have to properly identify
the platform now as well. Hence provide a different board name for the
Rev B1 variants.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 board/ti/am57xx/board.c           | 26 +++++++++++++++++++-------
 configs/am57xx_evm_defconfig      |  2 +-
 include/configs/ti_omap5_common.h |  2 ++
 3 files changed, 22 insertions(+), 8 deletions(-)

Comments

Tom Rini Nov. 26, 2016, 4:11 p.m. UTC | #1
On Fri, Nov 25, 2016 at 11:14:20AM +0530, Lokesh Vutla wrote:

> BeagleBoard-X15 Rev B1 with SR1.1 platform have incompatible changes for HDMI
> GPIO requiring new dtb support. This implies we have to properly identify
> the platform now as well. Hence provide a different board name for the
> Rev B1 variants.
> 
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>

Reviewed-by: Tom Rini <trini@konsulko.com>
Tom Rini Dec. 4, 2016, 11:33 p.m. UTC | #2
On Fri, Nov 25, 2016 at 11:14:20AM +0530, Lokesh Vutla wrote:

> BeagleBoard-X15 Rev B1 with SR1.1 platform have incompatible changes for HDMI
> GPIO requiring new dtb support. This implies we have to properly identify
> the platform now as well. Hence provide a different board name for the
> Rev B1 variants.
> 
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c
index bf092e7..ef3940b 100644
--- a/board/ti/am57xx/board.c
+++ b/board/ti/am57xx/board.c
@@ -35,6 +35,8 @@ 
 #include "mux_data.h"
 
 #define board_is_x15()		board_ti_is("BBRDX15_")
+#define board_is_x15_revb1()	(board_ti_is("BBRDX15_") && \
+				 (strncmp("B.10", board_ti_get_rev(), 3) <= 0))
 #define board_is_am572x_evm()	board_ti_is("AM572PM_")
 #define board_is_am572x_evm_reva3()	\
 				(board_ti_is("AM572PM_") && \
@@ -394,7 +396,10 @@  static void setup_board_eeprom_env(void)
 		goto invalid_eeprom;
 
 	if (board_is_x15()) {
-		name = "beagle_x15";
+		if (board_is_x15_revb1())
+			name = "beagle_x15_revb1";
+		else
+			name = "beagle_x15";
 	} else if (board_is_am572x_evm()) {
 		if (board_is_am572x_evm_reva3())
 			name = "am57xx_evm_reva3";
@@ -782,14 +787,21 @@  int ft_board_setup(void *blob, bd_t *bd)
 #ifdef CONFIG_SPL_LOAD_FIT
 int board_fit_config_name_match(const char *name)
 {
-	if (board_is_x15() && !strcmp(name, "am57xx-beagle-x15"))
-		return 0;
-	else if (board_is_am572x_evm() && !strcmp(name, "am57xx-beagle-x15"))
+	if (board_is_x15()) {
+		if (board_is_x15_revb1()) {
+			if (!strcmp(name, "am57xx-beagle-x15-revb1"))
+				return 0;
+		} else if (!strcmp(name, "am57xx-beagle-x15")) {
+			return 0;
+		}
+	} else if (board_is_am572x_evm() &&
+		   !strcmp(name, "am57xx-beagle-x15")) {
 		return 0;
-	else if (board_is_am572x_idk() && !strcmp(name, "am572x-idk"))
+	} else if (board_is_am572x_idk() && !strcmp(name, "am572x-idk")) {
 		return 0;
-	else
-		return -1;
+	}
+
+	return -1;
 }
 #endif
 
diff --git a/configs/am57xx_evm_defconfig b/configs/am57xx_evm_defconfig
index 12d9a14..bffa47c 100644
--- a/configs/am57xx_evm_defconfig
+++ b/configs/am57xx_evm_defconfig
@@ -47,7 +47,7 @@  CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_OF_CONTROL=y
-CONFIG_OF_LIST="am57xx-beagle-x15 am572x-idk"
+CONFIG_OF_LIST="am57xx-beagle-x15 am57xx-beagle-x15-revb1 am572x-idk"
 CONFIG_DM=y
 # CONFIG_BLK is not set
 CONFIG_DM_GPIO=y
diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h
index 51608d2..540bde8 100644
--- a/include/configs/ti_omap5_common.h
+++ b/include/configs/ti_omap5_common.h
@@ -102,6 +102,8 @@ 
 			"setenv fdtfile dra71-evm.dtb; fi;" \
 		"if test $board_name = beagle_x15; then " \
 			"setenv fdtfile am57xx-beagle-x15.dtb; fi;" \
+		"if test $board_name = beagle_x15_revb1; then " \
+			"setenv fdtfile am57xx-beagle-x15-revb1.dtb; fi;" \
 		"if test $board_name = am572x_idk; then " \
 			"setenv fdtfile am572x-idk.dtb; fi;" \
 		"if test $board_name = am57xx_evm; then " \