From patchwork Wed Nov 7 15:04:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 150408 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp5279032ljp; Wed, 7 Nov 2018 07:07:35 -0800 (PST) X-Google-Smtp-Source: AJdET5eYLsSBHPRT7ID+6wVV7thHtZfN0yLbyyyP8JygjMq6PmtrMVsooTQ+ckPJSH3sbOOowxui X-Received: by 2002:a17:906:7087:: with SMTP id b7-v6mr385791ejk.194.1541603255086; Wed, 07 Nov 2018 07:07:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541603255; cv=none; d=google.com; s=arc-20160816; b=CgifshT3fdDcOR+eVw3DdB9ZkCtqiOYcWNcrfFhvNqo0+6w3T7dIDHCfoJNyG+Pnas bD1KwDjYcwTPXGLP1kN9mWMvdbDyMyflUTHPCSJDhUj6k3Bn07EHAdKc+K+l0JHDXfl+ bYeBBD4Nu7ljnF5nEbMaJiC9eGVl/2kj1EDZ5mleavZTroHq7GK8SzYmrGnVPRyWFlkI EYEPss1D1oXPko81RTYeFou+mbhTTOraQs+p/wZL/MutIHwyOn6Gvwo8Q4wXMKc6sOaG DiKENT88OoOq7Moo3alPT7ia9Hmalr3XuuLJmyg7KqInPHzz3xjWpD8tG8oz6TYE9SUj VU5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:cms-type:in-reply-to :message-id:date:to:from:dkim-signature:dkim-filter; bh=fikCbaPGVE2nUmfzLcBgUtSRH4K/LvodRMAeizO2O3g=; b=lK3tfGLQd8KKrBQCQ5ori+bh7Ak77dLRtM3jTzKDTADvWcLktx8MPDYldsqRqqkN7s CELEphXHRCyxU3hFSrmrViGlSNWL7nEbeeXkPsv5HgH+UeieofEN5xaRhpuGkBVyyr+D BBgBKoJjVEkazRczLhd07JFlw98PFQoQokHz6vMHnV0GDo+cDT+WxSL0ThR0UZor/8jQ AFC7fxUc29CLOGxAAcC5b8g+6eQGeHTK5U94CGqmB3VRU+c5+YSpWeuVUkxCR6ktpvmX EwZMRThJaPGwJgNcguVJpT8BJDtriw5FVb0vDtaYKnHvUB2Ty5Y4X8EM5dfBIWizy+aa /0Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=fxwrULk6; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id d3-v6si262109edp.215.2018.11.07.07.07.34; Wed, 07 Nov 2018 07:07:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=fxwrULk6; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: by lists.denx.de (Postfix, from userid 105) id B75C9C224F3; Wed, 7 Nov 2018 15:06:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id A872BC224CC; Wed, 7 Nov 2018 15:06:02 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id DB76AC224D6; Wed, 7 Nov 2018 15:05:14 +0000 (UTC) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lists.denx.de (Postfix) with ESMTPS id 5C5DFC224DD for ; Wed, 7 Nov 2018 15:05:11 +0000 (UTC) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20181107150511euoutp02c3eab5309829ca7ddd3a4b0e68ff2f2a~k39ya_jGx0644806448euoutp02f; Wed, 7 Nov 2018 15:05:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181107150511euoutp02c3eab5309829ca7ddd3a4b0e68ff2f2a~k39ya_jGx0644806448euoutp02f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1541603111; bh=A/3Y22sY7q36KE9RybhI8y1xtUiUZ4nzWTw41noaQyQ=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=fxwrULk6SjK5FLPqLgsWwFc1gVupdfumw0ZqIHZmWci448D/g49weIzxQDngknL4e thjYmYLLiO9OcKmG9AL1/+UMfUqqLWyRKOGWbQSgvGwuejgihE51KN+qdANbbeL87+ tnZyprvy2E1wBjg1acgPZUgU27S6xaXptI/bDZag= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181107150510eucas1p142c65910bffced3b8c7f17fe099ac76b~k39yA-k890594605946eucas1p18; Wed, 7 Nov 2018 15:05:10 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id B0.FB.04806.62FF2EB5; Wed, 7 Nov 2018 15:05:10 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181107150509eucas1p19593df267e31a0d07a0a96a3ec02c4f9~k39xRHHvx1875718757eucas1p1V; Wed, 7 Nov 2018 15:05:09 +0000 (GMT) X-AuditID: cbfec7f5-79db79c0000012c6-3a-5be2ff268f18 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 4B.91.04284.52FF2EB5; Wed, 7 Nov 2018 15:05:09 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PHT00JT8WKDXN80@eusync1.samsung.com>; Wed, 07 Nov 2018 15:05:09 +0000 (GMT) From: Marek Szyprowski To: u-boot@lists.denx.de Date: Wed, 07 Nov 2018 16:04:59 +0100 Message-id: <20181107150459.23431-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20181107150105.23165-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprNIsWRmVeSWpSXmKPExsWy7djP87pq/x9FG9x7xmOxccZ6Vosbv9pY LZ6/u8xksfbIXXaLjiMtjBZv93ayO7B5zJt1gsXj7J0djB59W1YxBjBHcdmkpOZklqUW6dsl cGU8nPqMuWCuXsXMvwuZGxh3qnYxcnJICJhIzD03j6WLkYtDSGAFo0TbtFOsEM5nRonrH44y wlQ13v7LBpFYxijx5MZ8KKeBSeJo1y5WkCo2AUOJrrddbCC2iICExK/+q2DdzALXGCVmbVcE sYUFoiQ+bDzO3sXIwcEioCrx5Z47SJhXwFZi1vW5bBDL5CVWbzjADGJzCthJdPdMZoGIf2WV 2P3OG8J2kWjbuxUqLizx6vgWdghbRqKz4yATyG0SAs2MEu0zZrFDOD2MElvn7IDaYC1x+PhF Vojj+CQmbZvODHKQhACvREebEESJh8TjhTOhnpzIKHFm/Wv2CYySCxgZVjGKp5YW56anFhvn pZbrFSfmFpfmpesl5+duYgRG2el/x7/uYNz3J+kQowAHoxIP74WtD6OFWBPLiitzDzFKcDAr ifD2rn4ULcSbklhZlVqUH19UmpNafIhRmoNFSZy3muFBtJBAemJJanZqakFqEUyWiYNTqoHx 9p7jv5izJeaY5j/eZRfkJ9XgUpPHedNwd+vlDYolPtPcpxRdqomffvei0zdZ08AtQtqqshPm 8wqVKT0xS7x/1Oe9odKiYx5+Tk9fn2g/VVQc116tOl1oUUeYJlOAo92h1I28QX5MNz1mNXG+ ZJB4vD+r8eamL4furjwd9juJ/8BTgaB452VKLMUZiYZazEXFiQC45uIJrgIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrBJMWRmVeSWpSXmKPExsVy+t/xy7qq/x9FG6zYpG2xccZ6Vosbv9pY LZ6/u8xksfbIXXaLjiMtjBZv93ayO7B5zJt1gsXj7J0djB59W1YxBjBHcdmkpOZklqUW6dsl cGU8nPqMuWCuXsXMvwuZGxh3qnYxcnJICJhINN7+y9bFyMUhJLCEUWLh6zPsIAkhgSYmibdH HEFsNgFDia63XWwgtoiAhMSv/quMIA3MAjcYJe6c/wnWICwQJfFh43Egm4ODRUBV4ss9d5Aw r4CtxKzrc9kglslLrN5wgBnE5hSwk+jumcwCsctW4uHV84wTGHkWMDKsYhRJLS3OTc8tNtQr TswtLs1L10vOz93ECAyPbcd+bt7BeGlj8CFGAQ5GJR5ejR0Po4VYE8uKK3MPMUpwMCuJ8Pau fhQtxJuSWFmVWpQfX1Sak1p8iFGag0VJnPe8QWWUkEB6YklqdmpqQWoRTJaJg1OqgbEg48CJ bZtkrLVYLs+5eOLvBs10b70dq3PLr6jE/7z2rXqSxuLVamuy1AIz/a0W1LZ++7pfRmet24e1 xdcrP564b98v99c7Mv3oxtPTXk1Yn7u5542H9plnzwxbZSOevY9fOyvs6iLnesby5b0t/i8j q5oKhaJU5b7/UlfUtn27sP6ME7/VqVglluKMREMt5qLiRAAMqknwCwIAAA== X-CMS-MailID: 20181107150509eucas1p19593df267e31a0d07a0a96a3ec02c4f9 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181107150509eucas1p19593df267e31a0d07a0a96a3ec02c4f9 References: <20181107150105.23165-1-m.szyprowski@samsung.com> Cc: Bartlomiej Zolnierkiewicz , Marek Szyprowski Subject: [U-Boot] [PATCH 8/9] ARM: Exynos: Add minimal support for ARM 64bit based Exynos5433 SoC X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" This patch adds minimal support for Exynos5433 SoC (ARM64 based). The following devices are supported: - mmc0 (for eMMC) - serial1 (for debug/console) - gpa0..3 and gpb0..2 GPIO banks Based on earlier work done by Lukasz Majewski . Signed-off-by: Marek Szyprowski --- arch/arm/cpu/armv8/Kconfig | 2 +- arch/arm/dts/exynos5433.dtsi | 84 ++++++++++++++++++++++++++++++++ arch/arm/mach-exynos/Kconfig | 7 +++ arch/arm/mach-exynos/mmu-arm64.c | 24 +++++++++ arch/arm/mach-exynos/soc.c | 3 ++ drivers/gpio/s5p_gpio.c | 1 + scripts/config_whitelist.txt | 1 + 7 files changed, 121 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/exynos5433.dtsi diff --git a/arch/arm/cpu/armv8/Kconfig b/arch/arm/cpu/armv8/Kconfig index c8bebabdf6..295cdd4653 100644 --- a/arch/arm/cpu/armv8/Kconfig +++ b/arch/arm/cpu/armv8/Kconfig @@ -96,7 +96,7 @@ endmenu config PSCI_RESET bool "Use PSCI for reset and shutdown" default y - depends on !ARCH_EXYNOS7 && !ARCH_BCM283X && \ + depends on !ARCH_EXYNOS5433 && !ARCH_EXYNOS7 && !ARCH_BCM283X && \ !TARGET_LS2080A_SIMU && !TARGET_LS2080AQDS && \ !TARGET_LS2080ARDB && !TARGET_LS2080A_EMU && \ !TARGET_LS1088ARDB && !TARGET_LS1088AQDS && \ diff --git a/arch/arm/dts/exynos5433.dtsi b/arch/arm/dts/exynos5433.dtsi new file mode 100644 index 0000000000..509b39a95f --- /dev/null +++ b/arch/arm/dts/exynos5433.dtsi @@ -0,0 +1,84 @@ +/* + * SAMSUNG EXYNOS5433 SoC device tree source + * + * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/dts-v1/; +#include "skeleton.dtsi" + +/ { + mmc_0: mmc@15540000 { + compatible = "samsung,exynos-dwmmc"; + reg = <0x0 0x15540000 0x0 0x1000>; + samsung,bus-width = <8>; + samsung,timing = <1 3 3>; + samsung,removable = <0>; + samsung,pre-init; + fifoth_val = <0x201f0020>; + status = "disabled"; + }; + + pinctrl_alive: pinctrl@10580000 { + compatible = "samsung,exynos5433-pinctrl"; + reg = <0x10580000 0x1a20>, <0x11090000 0x100>; + /* gpa0..3, gpf1..5 */ + + gpa0: gpa0 { + gpio-controller; + #gpio-cells = <2>; + }; + + gpa1: gpa1 { + gpio-controller; + #gpio-cells = <2>; + }; + + gpa2: gpa2 { + gpio-controller; + #gpio-cells = <2>; + }; + + gpa3: gpa3 { + gpio-controller; + #gpio-cells = <2>; + + }; + }; + + pinctrl_peric: pinctrl@14cc0000 { + compatible = "samsung,exynos5433-pinctrl"; + reg = <0x14cc0000 0x1100>; + /* gpv7, gpb0, gpc0..3, gpg0, gpd0..4,6,8,7, gpg1..3 */ + + gpv7: gpv7 { + gpio-controller; + #gpio-cells = <2>; + }; + + gpb0: gpb0 { + gpio-controller; + #gpio-cells = <2>; + }; + + gpb1: gpb1 { + gpio-controller; + #gpio-cells = <2>; + }; + + gpb2: gpb2 { + gpio-controller; + #gpio-cells = <2>; + }; + }; + + serial_1: serial@14c20000 { + compatible = "samsung,exynos4210-uart"; + reg = <0x14c20000 0x100>; + id = <1>; + status = "disabled"; + }; +}; diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index ed04369cfa..4a49c8dcc2 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -29,6 +29,13 @@ config ARCH_EXYNOS5 Cortex-A7 CPU in big.LITTLE configuration). There are multiple SoCs in this family including Exynos5250, Exynos5420 and Exynos5800. +config ARCH_EXYNOS5433 + bool "Exynos5433 SoC family" + select ARM64 + help + Samsung Exynos5433 SoC family are based on ARM Cortex-A57 CPU and + Cortex-A53 CPU (in a big.LITTLE configuration). + config ARCH_EXYNOS7 bool "Exynos7 SoC family" select ARM64 diff --git a/arch/arm/mach-exynos/mmu-arm64.c b/arch/arm/mach-exynos/mmu-arm64.c index 46b8169d19..a857a7318e 100644 --- a/arch/arm/mach-exynos/mmu-arm64.c +++ b/arch/arm/mach-exynos/mmu-arm64.c @@ -29,3 +29,27 @@ static struct mm_region exynos7420_mem_map[] = { struct mm_region *mem_map = exynos7420_mem_map; #endif + +#ifdef CONFIG_EXYNOS5433 +static struct mm_region exynos5433_mem_map[] = { + { + .virt = 0x00000000UL, + .phys = 0x00000000UL, + .size = 0x20000000UL, + .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | + PTE_BLOCK_NON_SHARE | + PTE_BLOCK_PXN | PTE_BLOCK_UXN + }, { + .virt = 0x20000000UL, + .phys = 0x20000000UL, + .size = 0xC0000000UL, + .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | + PTE_BLOCK_INNER_SHARE + }, { + /* List terminator */ + 0, + } +}; + +struct mm_region *mem_map = exynos5433_mem_map; +#endif diff --git a/arch/arm/mach-exynos/soc.c b/arch/arm/mach-exynos/soc.c index 589e16c5ad..215cbb8f70 100644 --- a/arch/arm/mach-exynos/soc.c +++ b/arch/arm/mach-exynos/soc.c @@ -23,6 +23,9 @@ void reset_cpu(ulong addr) #ifdef CONFIG_CPU_V7A writel(0x1, samsung_get_base_swreset()); #endif +#ifdef CONFIG_ARCH_EXYNOS5433 + writel(0x1, (void *)0x105C0400); +#endif } #ifndef CONFIG_SYS_DCACHE_OFF diff --git a/drivers/gpio/s5p_gpio.c b/drivers/gpio/s5p_gpio.c index e4b5383d0f..fcaad1c4a6 100644 --- a/drivers/gpio/s5p_gpio.c +++ b/drivers/gpio/s5p_gpio.c @@ -357,6 +357,7 @@ static const struct udevice_id exynos_gpio_ids[] = { { .compatible = "samsung,exynos4x12-pinctrl" }, { .compatible = "samsung,exynos5250-pinctrl" }, { .compatible = "samsung,exynos5420-pinctrl" }, + { .compatible = "samsung,exynos5433-pinctrl" }, { } }; diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 94c0f1ff82..6438686fc4 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -571,6 +571,7 @@ CONFIG_EXYNOS4210 CONFIG_EXYNOS5 CONFIG_EXYNOS5250 CONFIG_EXYNOS5420 +CONFIG_EXYNOS5433 CONFIG_EXYNOS5_DT CONFIG_EXYNOS7420 CONFIG_EXYNOS_ACE_SHA