From patchwork Fri Nov 25 05:44:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lokesh Vutla X-Patchwork-Id: 699073 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3tQ4nr0R8Kz9sQw for ; Fri, 25 Nov 2016 16:46:40 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3087BB3838; Fri, 25 Nov 2016 06:46:13 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YoPSajI_B4Kh; Fri, 25 Nov 2016 06:46:12 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8F8CAB386B; Fri, 25 Nov 2016 06:45:59 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1D882B3838 for ; Fri, 25 Nov 2016 06:45:46 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pjBi116UnmjJ for ; Fri, 25 Nov 2016 06:45:46 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from lelnx193.ext.ti.com (lelnx193.ext.ti.com [198.47.27.77]) by theia.denx.de (Postfix) with ESMTPS id 3C8BA4BDBD for ; Fri, 25 Nov 2016 06:45:40 +0100 (CET) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id uAP5jcre029090; Thu, 24 Nov 2016 23:45:38 -0600 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id uAP5jcUR004958; Thu, 24 Nov 2016 23:45:38 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.294.0; Thu, 24 Nov 2016 23:45:37 -0600 Received: from a0131933.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id uAP5jQeA028151; Thu, 24 Nov 2016 23:45:35 -0600 From: Lokesh Vutla To: Tom Rini , Date: Fri, 25 Nov 2016 11:14:20 +0530 Message-ID: <20161125054426.20635-4-lokeshvutla@ti.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161125054426.20635-1-lokeshvutla@ti.com> References: <20161125054426.20635-1-lokeshvutla@ti.com> MIME-Version: 1.0 Cc: Tero Kristo , s-kipisz2@ti.com Subject: [U-Boot] [PATCH 3/9] board: ti: am57xx: Add support for detection of X15 revb1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 Reviewed-by: Tom Rini --- 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(-) 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 " \