From patchwork Fri Nov 25 05:44:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lokesh Vutla X-Patchwork-Id: 84025 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp343793qgi; Thu, 24 Nov 2016 21:46:08 -0800 (PST) X-Received: by 10.194.116.66 with SMTP id ju2mr5349215wjb.223.1480052768734; Thu, 24 Nov 2016 21:46:08 -0800 (PST) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id n10si11999878wma.60.2016.11.24.21.46.08; Thu, 24 Nov 2016 21:46:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE dis=NONE) header.from=ti.com Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 34404B384A; Fri, 25 Nov 2016 06:46:00 +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 dlx2hI91BJXN; Fri, 25 Nov 2016 06:46:00 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6CA684B99D; Fri, 25 Nov 2016 06:45:54 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8313E4BA16 for ; Fri, 25 Nov 2016 06:45:41 +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 P9gNV3gg-00q for ; Fri, 25 Nov 2016 06:45:41 +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 fllnx209.ext.ti.com (fllnx209.ext.ti.com [198.47.19.16]) by theia.denx.de (Postfix) with ESMTPS id 0FA5F4B99D for ; Fri, 25 Nov 2016 06:45:36 +0100 (CET) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id uAP5jZvO003470; Thu, 24 Nov 2016 23:45:35 -0600 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id uAP5jZBf004913; Thu, 24 Nov 2016 23:45:35 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.294.0; Thu, 24 Nov 2016 23:45:34 -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 uAP5jQe9028151; Thu, 24 Nov 2016 23:45:32 -0600 From: Lokesh Vutla To: Tom Rini , Date: Fri, 25 Nov 2016 11:14:19 +0530 Message-ID: <20161125054426.20635-3-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 2/9] board: ti: am57xx: Add support for detection of reva3 variations for GPEVM 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" From: Nishanth Menon AM57xx evm Rev A3 with SR2.0 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 A3 variations. Signed-off-by: Nishanth Menon Signed-off-by: Lokesh Vutla --- board/ti/am57xx/board.c | 17 ++++++++++++----- include/configs/ti_omap5_common.h | 2 ++ 2 files changed, 14 insertions(+), 5 deletions(-) -- 2.10.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot Reviewed-by: Tom Rini diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c index 7aee28e..bf092e7 100644 --- a/board/ti/am57xx/board.c +++ b/board/ti/am57xx/board.c @@ -36,6 +36,9 @@ #define board_is_x15() board_ti_is("BBRDX15_") #define board_is_am572x_evm() board_ti_is("AM572PM_") +#define board_is_am572x_evm_reva3() \ + (board_ti_is("AM572PM_") && \ + (strncmp("A.30", board_ti_get_rev(), 3) <= 0)) #define board_is_am572x_idk() board_ti_is("AM572IDK") #ifdef CONFIG_DRIVER_TI_CPSW @@ -390,15 +393,19 @@ static void setup_board_eeprom_env(void) if (rc) goto invalid_eeprom; - if (board_is_x15()) + if (board_is_x15()) { name = "beagle_x15"; - else if (board_is_am572x_evm()) - name = "am57xx_evm"; - else if (board_is_am572x_idk()) + } else if (board_is_am572x_evm()) { + if (board_is_am572x_evm_reva3()) + name = "am57xx_evm_reva3"; + else + name = "am57xx_evm"; + } else if (board_is_am572x_idk()) { name = "am572x_idk"; - else + } else { printf("Unidentified board claims %s in eeprom header\n", board_ti_get_name()); + } invalid_eeprom: set_board_info_env(name); diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h index 3bc7bf9..51608d2 100644 --- a/include/configs/ti_omap5_common.h +++ b/include/configs/ti_omap5_common.h @@ -106,6 +106,8 @@ "setenv fdtfile am572x-idk.dtb; fi;" \ "if test $board_name = am57xx_evm; then " \ "setenv fdtfile am57xx-beagle-x15.dtb; fi;" \ + "if test $board_name = am57xx_evm_reva3; then " \ + "setenv fdtfile am57xx-beagle-x15.dtb; fi;" \ "if test $fdtfile = undefined; then " \ "echo WARNING: Could not determine device tree to use; fi; \0" \ "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile};\0" \