From patchwork Thu Jan 3 13:26:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Tomer X-Patchwork-Id: 1020287 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Bi+9ylMt"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 43Vpcj32lnz9s55 for ; Fri, 4 Jan 2019 00:27:33 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 1CDDDC21D83; Thu, 3 Jan 2019 13:27:20 +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=FREEMAIL_FROM, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 892F0C21DA1; Thu, 3 Jan 2019 13:27:05 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 9DCB8C21DD4; Thu, 3 Jan 2019 13:27:01 +0000 (UTC) Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by lists.denx.de (Postfix) with ESMTPS id 42271C21DF3 for ; Thu, 3 Jan 2019 13:26:57 +0000 (UTC) Received: by mail-pg1-f195.google.com with SMTP id z11so16034836pgu.0 for ; Thu, 03 Jan 2019 05:26:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=i9PtnQSoZ/BWo3FHZCE5F0f62wAhW7QizFimbrZGqc0=; b=Bi+9ylMtlc1BseVC2xThVPhqouTrZGZpqKmQIFEgozKwrbDMYbVna9Kvk8B/3hao/q 0RyCc1qYjEyUJfBHoOntoD+zDf+fhibdR4mf12iQ4po7GUH5onh8ow6LTJ8Sc26OhxiF C8qgwm8YV7GL39oV+22jdwRSPa6NDSf8nNUH++aD77U7UR0b2snqSSJEHFjki0demvqu cHI7lqStNiAXP+Gqn1kxuAXhNjMMU+23PeOiB6TnIXJbHaTelPRHBiBqFz9I9ITEDX8v 3vOsojPMq6YRQnHw/euBYGpuxpJyvUdk+TE7H5rVcgWEU69kOw5hdmH4YpF8y4qzyDGy HO9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=i9PtnQSoZ/BWo3FHZCE5F0f62wAhW7QizFimbrZGqc0=; b=Rmg6yDeQDj6Ubb7vXCFO/v/p0OLGHvFUp0fuZBodagkPPM+6aL1dr4+HneOfR7hp6p OX16NS+hLxjKVKRW/04hvVndEa3xn+wpG19Homhe1D80q245cpuPXJBr8DjhkTnSXKxH w8I/Rdd2+HCo9527cqy4qkWRHiYCpa1J4y1BzyzVSHv0RX7YRJDXQBKiAr4DQCNQgXG6 HzO0BnhJHpuwuOIy6IcTPnpb9irk/3pK8sXNkzXg2Gz1JTLFprer8edM8Cz0PzuqIscD U3zH0zlXdBqSbalWJ8hbq/ybXNfcqyw2X9oBI4FqL8+s1rffvsqMfmlBqRna71jnys9t HHfQ== X-Gm-Message-State: AA+aEWa9Ycp2rNZ+rQwsXSWIAeBwnmxP/RbPojWXOJ/u6c4sTIrFyLV1 chctUlbKXBS5AZpej9cL6aMa/9hd X-Google-Smtp-Source: ALg8bN4EdXHrPlGnJr7urtpKJDG1qLYg7Tz2xaYeR/TV6whLw7TZ/J687i58kjajsxm7aVun4m05og== X-Received: by 2002:a62:76cc:: with SMTP id r195mr47964122pfc.38.1546522015323; Thu, 03 Jan 2019 05:26:55 -0800 (PST) Received: from localhost.localdomain ([171.61.184.111]) by smtp.gmail.com with ESMTPSA id o84sm94669160pfi.172.2019.01.03.05.26.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 03 Jan 2019 05:26:54 -0800 (PST) From: Amit Singh Tomar To: u-boot@lists.denx.de Date: Thu, 3 Jan 2019 18:56:16 +0530 Message-Id: <1546521983-19385-2-git-send-email-amittomer25@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1546521983-19385-1-git-send-email-amittomer25@gmail.com> References: <1546521983-19385-1-git-send-email-amittomer25@gmail.com> Cc: andre.przywara@arm.com, manivannan.sadhasivam@linaro.org Subject: [U-Boot] [RFC PATCH 1/8] arm: actions: Add common framework for Actions Semi SoCs 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 adds common arch owl support that drives both s700 and s900, 64-bits SoCs from Actions Semiconductor. Signed-off-by: Amit Singh Tomar --- arch/arm/Kconfig | 2 -- arch/arm/mach-owl/Kconfig | 31 +++++++++++------------ arch/arm/mach-owl/Makefile | 2 +- arch/arm/mach-owl/soc.c | 56 ++++++++++++++++++++++++++++++++++++++++++ configs/bubblegum_96_defconfig | 3 +-- include/configs/bubblegum_96.h | 42 ------------------------------- include/configs/owl-common.h | 42 +++++++++++++++++++++++++++++++ include/configs/s700.h | 15 +++++++++++ include/configs/s900.h | 18 ++++++++++++++ 9 files changed, 147 insertions(+), 64 deletions(-) create mode 100644 arch/arm/mach-owl/soc.c delete mode 100644 include/configs/bubblegum_96.h create mode 100644 include/configs/owl-common.h create mode 100644 include/configs/s700.h create mode 100644 include/configs/s900.h diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index b5952ad..b478096 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -760,7 +760,6 @@ config ARCH_MX5 config ARCH_OWL bool "Actions Semi OWL SoCs" - select ARM64 select DM select DM_SERIAL select OF_CONTROL @@ -1555,7 +1554,6 @@ source "board/spear/spear600/Kconfig" source "board/spear/x600/Kconfig" source "board/st/stv0991/Kconfig" source "board/tcl/sl50/Kconfig" -source "board/ucRobotics/bubblegum_96/Kconfig" source "board/birdland/bav335x/Kconfig" source "board/toradex/colibri_pxa270/Kconfig" source "board/vscom/baltos/Kconfig" diff --git a/arch/arm/mach-owl/Kconfig b/arch/arm/mach-owl/Kconfig index 199e772..3143782 100644 --- a/arch/arm/mach-owl/Kconfig +++ b/arch/arm/mach-owl/Kconfig @@ -1,27 +1,24 @@ if ARCH_OWL -config SYS_SOC - default "owl" - choice - prompt "Actions Semi OWL SoCs board select" + prompt "SemiActions SoC Variant" optional -config TARGET_BUBBLEGUM_96 - bool "96Boards Bubblegum-96" - help - Support for 96Boards Bubblegum-96. This board complies with - 96Board Consumer Edition Specification. Features: - - Actions Semi S900 SoC (4xCortex A53, Power VR G6230 GPU) - - 2GiB RAM - - 8GiB eMMC, uSD slot - - WiFi, Bluetooth and GPS module - - 2x Host, 1x Device USB port - - HDMI - - 20-pin low speed and 40-pin high speed expanders, 6 LED, 3 buttons +config MACH_S700 + bool "SemiActions S700" + select ARM64 + +config MACH_S900 + bool "SemiActions S900" + select ARM64 endchoice -source "board/ucRobotics/bubblegum_96/Kconfig" +config SYS_CONFIG_NAME + default "s900" if MACH_S900 + default "s700" if MACH_S700 + +config SYS_SOC + default "owl" endif diff --git a/arch/arm/mach-owl/Makefile b/arch/arm/mach-owl/Makefile index 1b43dc2..2a76ee0 100644 --- a/arch/arm/mach-owl/Makefile +++ b/arch/arm/mach-owl/Makefile @@ -1,3 +1,3 @@ # SPDX-License-Identifier: GPL-2.0+ -obj-y += sysmap-s900.o +obj-y += soc.o diff --git a/arch/arm/mach-owl/soc.c b/arch/arm/mach-owl/soc.c new file mode 100644 index 0000000..a4c202d --- /dev/null +++ b/arch/arm/mach-owl/soc.c @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Bubblegum-96 Boards Support + * + * Copyright (C) 2018 Manivannan Sadhasivam + */ + +#include +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +/* + * dram_init - sets uboots idea of sdram size + */ +int dram_init(void) +{ + gd->ram_size = CONFIG_SYS_SDRAM_SIZE; + return 0; +} + +/* This is called after dram_init() so use get_ram_size result */ +int dram_init_banksize(void) +{ + gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE; + gd->bd->bi_dram[0].size = gd->ram_size; + + return 0; +} + +static void show_psci_version(void) +{ + struct arm_smccc_res res; + + arm_smccc_smc(ARM_PSCI_0_2_FN_PSCI_VERSION, 0, 0, 0, 0, 0, 0, 0, &res); + + printf("PSCI: v%ld.%ld\n", + PSCI_VERSION_MAJOR(res.a0), + PSCI_VERSION_MINOR(res.a0)); +} + +int board_init(void) +{ + show_psci_version(); + + return 0; +} + +void reset_cpu(ulong addr) +{ + psci_system_reset(); +} diff --git a/configs/bubblegum_96_defconfig b/configs/bubblegum_96_defconfig index 4b00a17..6c31b1c 100644 --- a/configs/bubblegum_96_defconfig +++ b/configs/bubblegum_96_defconfig @@ -2,7 +2,7 @@ CONFIG_ARM=y CONFIG_ARM_SMCCC=y CONFIG_ARCH_OWL=y CONFIG_SYS_TEXT_BASE=0x11000000 -CONFIG_TARGET_BUBBLEGUM_96=y +CONFIG_MACH_S900=y CONFIG_IDENT_STRING="\nBubblegum-96" CONFIG_DISTRO_DEFAULTS=y CONFIG_NR_DRAM_BANKS=1 @@ -19,5 +19,4 @@ CONFIG_CMD_TIMER=y CONFIG_DEFAULT_DEVICE_TREE="bubblegum_96" CONFIG_CLK=y CONFIG_CLK_OWL=y -CONFIG_CLK_S900=y CONFIG_OWL_SERIAL=y diff --git a/include/configs/bubblegum_96.h b/include/configs/bubblegum_96.h deleted file mode 100644 index e1dc37b..0000000 --- a/include/configs/bubblegum_96.h +++ /dev/null @@ -1,42 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Board configuration file for Bubblegum-96 - * - * Copyright (C) 2015 Actions Semi Co., Ltd. - * Copyright (C) 2018 Manivannan Sadhasivam - * - */ - -#ifndef _BUBBLEGUM_96_H_ -#define _BUGGLEGUM_96_H_ - -/* SDRAM Definitions */ -#define CONFIG_SYS_SDRAM_BASE 0x0 -#define CONFIG_SYS_SDRAM_SIZE 0x80000000 - -/* Generic Timer Definitions */ -#define COUNTER_FREQUENCY (24000000) /* 24MHz */ - -#define CONFIG_SYS_MALLOC_LEN (32 * 1024 * 1024) - -/* Some commands use this as the default load address */ -#define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7ffc0) - -/* - * This is the initial SP which is used only briefly for relocating the u-boot - * image to the top of SDRAM. After relocation u-boot moves the stack to the - * proper place. - */ -#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE + 0x7ff00) - -/* UART Definitions */ -#define CONFIG_BAUDRATE 115200 - -#define CONFIG_ENV_SIZE 0x2000 - -/* Console configuration */ -#define CONFIG_SYS_CBSIZE 1024 /* Console buffer size */ -#define CONFIG_SYS_MAXARGS 64 -#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE - -#endif diff --git a/include/configs/owl-common.h b/include/configs/owl-common.h new file mode 100644 index 0000000..a980681 --- /dev/null +++ b/include/configs/owl-common.h @@ -0,0 +1,42 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Board configuration file for Bubblegum-96 + * + * Copyright (C) 2015 Actions Semi Co., Ltd. + * Copyright (C) 2018 Manivannan Sadhasivam + * + */ + +#ifndef _OWL_COMMON_CONFIG_H_ +#define _OWL_COMMON_CONFIG_H_ + +/* SDRAM Definitions */ +#define CONFIG_SYS_SDRAM_BASE 0x0 +#define CONFIG_SYS_SDRAM_SIZE 0x80000000 + +/* Generic Timer Definitions */ +#define COUNTER_FREQUENCY (24000000) /* 24MHz */ + +#define CONFIG_SYS_MALLOC_LEN (32 * 1024 * 1024) + +/* Some commands use this as the default load address */ +#define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7ffc0) + +/* + * This is the initial SP which is used only briefly for relocating the u-boot + * image to the top of SDRAM. After relocation u-boot moves the stack to the + * proper place. + */ +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE + 0x7ff00) + +/* UART Definitions */ +#define CONFIG_BAUDRATE 115200 + +#define CONFIG_ENV_SIZE 0x2000 + +/* Console configuration */ +#define CONFIG_SYS_CBSIZE 1024 /* Console buffer size */ +#define CONFIG_SYS_MAXARGS 64 +#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE + +#endif diff --git a/include/configs/s700.h b/include/configs/s700.h new file mode 100644 index 0000000..84f9174 --- /dev/null +++ b/include/configs/s700.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Board configuration file for Action semi s700 + * + */ + +#ifndef _CONFIG_S700_H_ +#define _CONFIG_S700_H_ + +/* + * Include common owl configuration where most the settings are + */ +#include + +#endif diff --git a/include/configs/s900.h b/include/configs/s900.h new file mode 100644 index 0000000..fe5cfb5 --- /dev/null +++ b/include/configs/s900.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Board configuration file for Bubblegum-96 + * + * Copyright (C) 2015 Actions Semi Co., Ltd. + * Copyright (C) 2018 Manivannan Sadhasivam + * + */ + +#ifndef _CONFIG_S900_H_ +#define _CONFIG_S900_H_ + +/* + * Include common owl configuration where most the settings are + */ +#include + +#endif