From patchwork Wed Apr 13 10:43:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Abraham X-Patchwork-Id: 610046 X-Patchwork-Delegate: promsoft@gmail.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 3qlQwT6509z9t3t for ; Thu, 14 Apr 2016 00:21:45 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=gIBbA2KO; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3D726A76F5; Wed, 13 Apr 2016 16:20:30 +0200 (CEST) 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 n8rA6frHv22l; Wed, 13 Apr 2016 16:20:30 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B3841A7626; Wed, 13 Apr 2016 16:19:52 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 568AEA7534 for ; Wed, 13 Apr 2016 11:48:00 +0200 (CEST) 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 600iQpVTVls2 for ; Wed, 13 Apr 2016 11:48:00 +0200 (CEST) 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 mail-pf0-f196.google.com (mail-pf0-f196.google.com [209.85.192.196]) by theia.denx.de (Postfix) with ESMTPS id DAEC8A7530 for ; Wed, 13 Apr 2016 11:47:59 +0200 (CEST) Received: by mail-pf0-f196.google.com with SMTP id e190so3660158pfe.0 for ; Wed, 13 Apr 2016 02:47:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=itiqnB7C2Zyr6B7fyV4uOhVTMGRq0C1HxVHlAiESKw4=; b=gIBbA2KOTnMnZy/OaINeyQo+8iH2IXoklYwYcGvAJLBzYPV4twGmuIZi9+r0Dx+YmO bVjbgaXVZD7SaygppYArAsQF7nZS/Jjz2YUE1SwpVusJX3HaVscil67zE/crsPZOObWm GqAZ/qppR5rOTULvXo9mSQNQgElZKTIKH5Fl2peCuHeglXoz3+or9342NVz5ikSozOrN aafLVkhQHDJ5kuF4cjbjrPxzCiSSzDeNCszZz9BMHllbUlggGWSz59Jcihfgrz7TJ4i1 ASHKUdIwG6Li9/TZGux8NoJ5YltXUfnqWBFs3oUqekdDtb4fJ7ycOC+00bLKiwCIydFn 10/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=itiqnB7C2Zyr6B7fyV4uOhVTMGRq0C1HxVHlAiESKw4=; b=hQ24bgcgOQJTBtFEdPnRUy4mueIJslcv9iQrgtwIUHGZ+LkMHdVLD83FyEhLhvL+tO 0Y/ZclaWO4FSw3yNmSyqn47YP1yWFDbIcfRjrrClb4oeh+fn2OVcbSzUYRVb9bjpqmGF re5Yow+Hno4LcNhb+eXkNg8Ai1+5EWDyYTSY7GcRD2vBrHASOxyTWmrEnCXxv2mQm5Li D+Sn+ZHu7CWNtAR408eS82oGHaQtIT5MD3lsvjLeRy5Tgq1LzP2yubMP0pv4T6m7ehHn qks+YYaVQEaLhlR9Bq2vH5Kx7XC5/r47QEgdX3I7NpPCqCpDQAx/VK3mMgr26yEWppaY Vx0w== X-Gm-Message-State: AOPr4FU9fCgEeomBorNsXDaVmu8uGIesgO+nD7nsCSkk3BJifj0dTaaXhXUf0j/sg2xt9A== X-Received: by 10.98.40.4 with SMTP id o4mr11792818pfo.76.1460540878536; Wed, 13 Apr 2016 02:47:58 -0700 (PDT) Received: from user-ubuntu.sisodomain.com ([103.58.156.161]) by smtp.gmail.com with ESMTPSA id lq10sm49762686pab.36.2016.04.13.02.47.51 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Apr 2016 02:47:58 -0700 (PDT) From: Thomas Abraham To: u-boot@lists.denx.de Date: Wed, 13 Apr 2016 16:13:42 +0530 Message-Id: <1460544222-5342-10-git-send-email-ta.omasab@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1460544222-5342-1-git-send-email-ta.omasab@gmail.com> References: <1460544222-5342-1-git-send-email-ta.omasab@gmail.com> X-Mailman-Approved-At: Wed, 13 Apr 2016 16:19:24 +0200 Cc: thomas.ab@samsung.com, alim.akhtar@samsung.com Subject: [U-Boot] [PATCH 9/9] board: samsung: add initial Espresso7420 board support 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Thomas Abraham Espresso7420 is a development/evaluation board for Exynos7420 SoC. It includes multiple onboard compoments (EMMC/Codec) and various interconnects (USB/HDMI). Signed-off-by: Thomas Abraham Reviewed-by: Simon Glass --- arch/arm/dts/Makefile | 1 + arch/arm/dts/exynos7420-espresso7420.dts | 24 ++++++++++++++++++++++++ board/samsung/common/board.c | 18 ++++++++++++++++-- board/samsung/espresso7420/Kconfig | 12 ++++++++++++ board/samsung/espresso7420/MAINTAINERS | 5 +++++ board/samsung/espresso7420/Makefile | 16 ++++++++++++++++ board/samsung/espresso7420/espresso7420.c | 16 ++++++++++++++++ configs/espresso7420_defconfig | 8 ++++++++ 8 files changed, 98 insertions(+), 2 deletions(-) create mode 100644 arch/arm/dts/exynos7420-espresso7420.dts create mode 100644 board/samsung/espresso7420/Kconfig create mode 100644 board/samsung/espresso7420/MAINTAINERS create mode 100644 board/samsung/espresso7420/Makefile create mode 100644 board/samsung/espresso7420/espresso7420.c create mode 100644 configs/espresso7420_defconfig diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index ea635e4..a61bbff 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -19,6 +19,7 @@ dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \ exynos5420-peach-pit.dtb \ exynos5800-peach-pi.dtb \ exynos5422-odroidxu3.dtb +dtb-$(CONFIG_EXYNOS7420) += exynos7420-espresso7420.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += \ rk3288-firefly.dtb \ rk3288-jerry.dtb \ diff --git a/arch/arm/dts/exynos7420-espresso7420.dts b/arch/arm/dts/exynos7420-espresso7420.dts new file mode 100644 index 0000000..f17a848 --- /dev/null +++ b/arch/arm/dts/exynos7420-espresso7420.dts @@ -0,0 +1,24 @@ +/* + * Samsung Espresso7420 board device tree source + * + * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include "exynos7420.dtsi" +/ { + model = "Samsung Espresso7420 board based on Exynos7420"; + compatible = "samsung,espresso7420", "samsung,exynos7420"; + + aliases { + serial2 = "/serial@14C30000"; + console = "/serial@14C30000"; + pinctrl0 = "/pinctrl@13470000"; + }; +}; + +&fin_pll { + clock-frequency = <24000000>; +}; diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c index 1334c22..e4f189c 100644 --- a/board/samsung/common/board.c +++ b/board/samsung/common/board.c @@ -27,6 +27,8 @@ #include #include #include +#include +#include DECLARE_GLOBAL_DATA_PTR; @@ -97,7 +99,7 @@ int board_init(void) int dram_init(void) { unsigned int i; - u32 addr; + unsigned long addr; for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { addr = CONFIG_SYS_SDRAM_BASE + (i * SDRAM_BANK_SIZE); @@ -109,7 +111,7 @@ int dram_init(void) void dram_init_banksize(void) { unsigned int i; - u32 addr, size; + unsigned long addr, size; for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { addr = CONFIG_SYS_SDRAM_BASE + (i * SDRAM_BANK_SIZE); @@ -122,6 +124,17 @@ void dram_init_banksize(void) static int board_uart_init(void) { +#if CONFIG_PINCTRL_EXYNOS + struct udevice *pinctrl; + int ret; + + ret = uclass_get_device(UCLASS_PINCTRL, 0, &pinctrl); + if (ret) + return ret; + + ret = pinctrl_request_noflags(pinctrl, PERIPH_ID_UART2); + return ret; +#else int err, uart_id, ret = 0; for (uart_id = PERIPH_ID_UART0; uart_id <= PERIPH_ID_UART3; uart_id++) { @@ -133,6 +146,7 @@ static int board_uart_init(void) } } return ret; +#endif } #ifdef CONFIG_BOARD_EARLY_INIT_F diff --git a/board/samsung/espresso7420/Kconfig b/board/samsung/espresso7420/Kconfig new file mode 100644 index 0000000..6cfead0 --- /dev/null +++ b/board/samsung/espresso7420/Kconfig @@ -0,0 +1,12 @@ +if TARGET_ESPRESSO7420 + +config SYS_BOARD + default "espresso7420" + +config SYS_VENDOR + default "samsung" + +config SYS_CONFIG_NAME + default "espresso7420" + +endif diff --git a/board/samsung/espresso7420/MAINTAINERS b/board/samsung/espresso7420/MAINTAINERS new file mode 100644 index 0000000..aaebc4c --- /dev/null +++ b/board/samsung/espresso7420/MAINTAINERS @@ -0,0 +1,5 @@ +ESPRESSO7420 Board +M: Thomas Abraham +S: Maintained +F: board/samsung/espresso7420/ +F: include/configs/espresso7420.h diff --git a/board/samsung/espresso7420/Makefile b/board/samsung/espresso7420/Makefile new file mode 100644 index 0000000..53d90fd --- /dev/null +++ b/board/samsung/espresso7420/Makefile @@ -0,0 +1,16 @@ +# +# Copyright (C) 2015 Samsung Electronics +# +# SPDX-License-Identifier: GPL-2.0+ +# + +#obj-y += espresso7420_spl.o +#obj-y += clk-boot_evt1.o +#obj-y += lpddr4_evt1.o +#obj-y += dmc_init_lpddr4.o +#obj-y += dmc.o +#obj-y += clock.o clock_init.o + +ifndef CONFIG_SPL_BUILD +obj-y += espresso7420.o +endif diff --git a/board/samsung/espresso7420/espresso7420.c b/board/samsung/espresso7420/espresso7420.c new file mode 100644 index 0000000..04a83bc --- /dev/null +++ b/board/samsung/espresso7420/espresso7420.c @@ -0,0 +1,16 @@ +/* + * Espresso7420 board file + * Copyright (C) 2016 Samsung Electronics + * Thomas Abraham + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include + +DECLARE_GLOBAL_DATA_PTR; + +int exynos_init(void) +{ + return 0; +} diff --git a/configs/espresso7420_defconfig b/configs/espresso7420_defconfig new file mode 100644 index 0000000..604921f --- /dev/null +++ b/configs/espresso7420_defconfig @@ -0,0 +1,8 @@ +CONFIG_ARM=y +CONFIG_ARCH_EXYNOS=y +CONFIG_TARGET_ESPRESSO7420=y +CONFIG_DEFAULT_DEVICE_TREE="exynos7420-espresso7420" +CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_SYS_PROMPT="ESPRESSO7420 # " +# CONFIG_CMD_IMLS is not set +# CONFIG_CMD_SETEXPR is not set