From patchwork Fri Mar 20 17:35:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Tomer X-Patchwork-Id: 1259119 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=C5r7KDVs; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48kWCL4wQjz9sPk for ; Sat, 21 Mar 2020 04:35:58 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 315BD81717; Fri, 20 Mar 2020 18:35:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="C5r7KDVs"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 667F38037A; Fri, 20 Mar 2020 18:35:39 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7C4418037A for ; Fri, 20 Mar 2020 18:35:34 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=amittomer25@gmail.com Received: by mail-pl1-x643.google.com with SMTP id b9so2796373pls.12 for ; Fri, 20 Mar 2020 10:35:34 -0700 (PDT) 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=d+JXmCRi0ZjjhRuOINyhW4oIjupTQf2RerVc4O8QALI=; b=C5r7KDVs1Qb76DE1D7TEE6XmIb9SeoR8EivA1ZAsWXourx7mNGNJR+h7ea5+v4M+07 ytJHtNzx+0fyzCc82t1VaP/x5fj8/Q2/Z/7L/RjOUPG8rKH1R3HORtOwamy/cF/thbvU 0Necd1cZMDOOB9LGY0VIv/KT3lJa/G+4TUEeo5TSAxj/+hWj6ViZBkhsaWWp1RSJ2L7/ C/u1WXUZoNeU7Dvat8SdfriNyZzLrDbok3ZaFcHUBennSkpOMjPtBwLEj80RSMmOtmz2 dNEEOx/kI9dtQBP8WyzjR25NALIW3Tuh2c1rIDKZpbuoVe8v/UaKndXGmhgCtsEGXlF0 lQvw== 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=d+JXmCRi0ZjjhRuOINyhW4oIjupTQf2RerVc4O8QALI=; b=ckaDp2lWQ6IAmcNYCi2z3Ut5tk35z9jfl9JxqmiciBOuI8XHhpZJpx9RCg4u1WFo8j 9n9Y04H0R5/RI6scAlaUaUFOPG2Ks2dVdX886nB6ZyECRM+bZLQlcFoeRJ7TFqlZ7QGs y6A4LvHhYE+Im3nQblv553qktrFK9Swqr4OhJUCmoG3YJYQuCSIwj38pnwdSzda+GNID 2fnSQoPR0ZCSnRdJN0hQoLHYBKp1eJPQfHJMc3NVY9wTtq40UA0tAgOLyHG0cKFfRCjT CHCJfhYf9v0TOe07uu1LJJ+som2wO486Eb/XPcRbMLRS/98qV/B8vA4PDMU/3XyecPDU gHBQ== X-Gm-Message-State: ANhLgQ30HY0Y6OLpv5iUeUs1NHIXYmw4msNqiL2tuBQ46EYtHM4zICLC zTNI1FJc5PhaiGOwIMx/hM/lYcGi X-Google-Smtp-Source: ADFU+vuuSlTqVM9Z51au4uCP0EnRx+m5odyOknD3mX06RTTrYyYzikHbHWLbRPflAoBH91rP1e2AIQ== X-Received: by 2002:a17:90a:9501:: with SMTP id t1mr10988473pjo.108.1584725732000; Fri, 20 Mar 2020 10:35:32 -0700 (PDT) Received: from localhost.localdomain ([106.215.6.94]) by smtp.gmail.com with ESMTPSA id i187sm6037302pfg.33.2020.03.20.10.35.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Mar 2020 10:35:31 -0700 (PDT) From: Amit Singh Tomar To: u-boot@lists.denx.de Cc: andre.przywara@arm.com, manivannan.sadhasivam@linaro.org, trini@konsulko.com, Amit Singh Tomar Subject: [PATCH v7 01/12] arm: actions: Add common framework for Actions Owl Semi SoCs Date: Fri, 20 Mar 2020 23:05:03 +0530 Message-Id: <1584725714-2770-2-git-send-email-amittomer25@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1584725714-2770-1-git-send-email-amittomer25@gmail.com> References: <1584725714-2770-1-git-send-email-amittomer25@gmail.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean This commit adds common arch support for Actions Semi Owl series SoCs and removes the Bubblegum96 board files. Signed-off-by: Amit Singh Tomar --- Changes since v6: * No change. Changes since v5: * No change. Changes since v4: * No change. Changes since v3: * Corrected the file list entry in MAINTAINERS file. Changes since v2: * Moved the file list details to root MAINTAINERS file. * Updated the commit message as suggested by Mani. * Used the "Owl" keyword to describe SoC family. Changes since v1: * Moved S700 specific changes to patch 4 of 9. * Moved couple of symbols from defconfig to arch/arm/Kconfig and platform owl Kconfig. --- MAINTAINERS | 2 + arch/arm/Kconfig | 3 +- arch/arm/mach-owl/Kconfig | 29 ++++++-------- arch/arm/mach-owl/Makefile | 1 + arch/arm/mach-owl/soc.c | 57 ++++++++++++++++++++++++++++ board/ucRobotics/bubblegum_96/Kconfig | 15 -------- board/ucRobotics/bubblegum_96/MAINTAINERS | 6 --- board/ucRobotics/bubblegum_96/Makefile | 3 -- board/ucRobotics/bubblegum_96/bubblegum_96.c | 57 ---------------------------- configs/bubblegum_96_defconfig | 4 +- include/configs/bubblegum_96.h | 40 ------------------- include/configs/owl-common.h | 40 +++++++++++++++++++ include/configs/s900.h | 16 ++++++++ 13 files changed, 130 insertions(+), 143 deletions(-) create mode 100644 arch/arm/mach-owl/soc.c delete mode 100644 board/ucRobotics/bubblegum_96/Kconfig delete mode 100644 board/ucRobotics/bubblegum_96/MAINTAINERS delete mode 100644 board/ucRobotics/bubblegum_96/Makefile delete mode 100644 board/ucRobotics/bubblegum_96/bubblegum_96.c delete mode 100644 include/configs/bubblegum_96.h create mode 100644 include/configs/owl-common.h create mode 100644 include/configs/s900.h diff --git a/MAINTAINERS b/MAINTAINERS index 92dda40..e1c03cb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -275,6 +275,8 @@ F: arch/arm/mach-owl/ F: board/ucRobotics/ F: drivers/clk/owl/ F: drivers/serial/serial_owl.c +F: include/configs/owl-common.h +F: configs/bubblegum_96_defconfig ARM RENESAS RMOBILE/R-CAR M: Nobuhiro Iwamatsu diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 5d36788..1cfdcb6 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -873,9 +873,9 @@ config ARCH_MX5 config ARCH_OWL bool "Actions Semi OWL SoCs" - select ARM64 select DM select DM_SERIAL + select OWL_SERIAL select OF_CONTROL imply CMD_DM @@ -1865,7 +1865,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/variscite/dart_6ul/Kconfig" diff --git a/arch/arm/mach-owl/Kconfig b/arch/arm/mach-owl/Kconfig index 199e772..d0be2b5 100644 --- a/arch/arm/mach-owl/Kconfig +++ b/arch/arm/mach-owl/Kconfig @@ -1,27 +1,22 @@ if ARCH_OWL -config SYS_SOC - default "owl" - choice - prompt "Actions Semi OWL SoCs board select" + prompt "Actions Semi Owl 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_S900 + bool "Actions Semi S900 SoC" + select ARM64 endchoice -source "board/ucRobotics/bubblegum_96/Kconfig" +config SYS_TEXT_BASE + default 0x11000000 + +config SYS_CONFIG_NAME + default "s900" if MACH_S900 + +config SYS_SOC + default "s900" if MACH_S900 endif diff --git a/arch/arm/mach-owl/Makefile b/arch/arm/mach-owl/Makefile index 1b43dc2..0b181c6 100644 --- a/arch/arm/mach-owl/Makefile +++ b/arch/arm/mach-owl/Makefile @@ -1,3 +1,4 @@ # SPDX-License-Identifier: GPL-2.0+ +obj-y += soc.o obj-y += sysmap-s900.o diff --git a/arch/arm/mach-owl/soc.c b/arch/arm/mach-owl/soc.c new file mode 100644 index 0000000..409cbd3 --- /dev/null +++ b/arch/arm/mach-owl/soc.c @@ -0,0 +1,57 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Actions Semi Owl SoCs platform support. + * + * Copyright (C) 2018 Manivannan Sadhasivam + */ + +#include +#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/board/ucRobotics/bubblegum_96/Kconfig b/board/ucRobotics/bubblegum_96/Kconfig deleted file mode 100644 index 2dd40d9..0000000 --- a/board/ucRobotics/bubblegum_96/Kconfig +++ /dev/null @@ -1,15 +0,0 @@ -if TARGET_BUBBLEGUM_96 - -config SYS_BOARD - default "bubblegum_96" - -config SYS_VENDOR - default "ucRobotics" - -config SYS_SOC - default "s900" - -config SYS_CONFIG_NAME - default "bubblegum_96" - -endif diff --git a/board/ucRobotics/bubblegum_96/MAINTAINERS b/board/ucRobotics/bubblegum_96/MAINTAINERS deleted file mode 100644 index d0cb727..0000000 --- a/board/ucRobotics/bubblegum_96/MAINTAINERS +++ /dev/null @@ -1,6 +0,0 @@ -BUBBLEGUM_96 BOARD -M: Manivannan Sadhasivam -S: Maintained -F: board/ucRobotics/bubblegum_96/ -F: include/configs/bubblegum_96.h -F: configs/bubblegum_96_defconfig diff --git a/board/ucRobotics/bubblegum_96/Makefile b/board/ucRobotics/bubblegum_96/Makefile deleted file mode 100644 index c4b524d..0000000 --- a/board/ucRobotics/bubblegum_96/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ - -obj-y := bubblegum_96.o diff --git a/board/ucRobotics/bubblegum_96/bubblegum_96.c b/board/ucRobotics/bubblegum_96/bubblegum_96.c deleted file mode 100644 index c16f117..0000000 --- a/board/ucRobotics/bubblegum_96/bubblegum_96.c +++ /dev/null @@ -1,57 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Bubblegum-96 Boards Support - * - * Copyright (C) 2018 Manivannan Sadhasivam - */ - -#include -#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 ae44ce1..8c94def 100644 --- a/configs/bubblegum_96_defconfig +++ b/configs/bubblegum_96_defconfig @@ -1,9 +1,8 @@ CONFIG_ARM=y CONFIG_ARCH_OWL=y -CONFIG_SYS_TEXT_BASE=0x11000000 CONFIG_ENV_SIZE=0x2000 -CONFIG_TARGET_BUBBLEGUM_96=y CONFIG_NR_DRAM_BANKS=1 +CONFIG_MACH_S900=y CONFIG_IDENT_STRING="\nBubblegum-96" CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTDELAY=5 @@ -21,4 +20,3 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y 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 c739d66..0000000 --- a/include/configs/bubblegum_96.h +++ /dev/null @@ -1,40 +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 - -/* 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..f77a5fa --- /dev/null +++ b/include/configs/owl-common.h @@ -0,0 +1,40 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Board configuration file for Actions Semi Owl SoCs. + * + * 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 + +/* 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/s900.h b/include/configs/s900.h new file mode 100644 index 0000000..7544cfc --- /dev/null +++ b/include/configs/s900.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * 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 From patchwork Fri Mar 20 17:35:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Tomer X-Patchwork-Id: 1259120 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=q3BDdNry; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48kWCZ1RW0z9sPR for ; Sat, 21 Mar 2020 04:36:10 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 435D08176E; Fri, 20 Mar 2020 18:35:48 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="q3BDdNry"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 53D8481717; Fri, 20 Mar 2020 18:35:41 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 23774801D2 for ; Fri, 20 Mar 2020 18:35:37 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=amittomer25@gmail.com Received: by mail-pl1-x644.google.com with SMTP id w3so2808705plz.5 for ; Fri, 20 Mar 2020 10:35:37 -0700 (PDT) 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=DwZ8uQLc9dAsLV/W72uj0rc73JFUfS+8iZJQMTZNQ3o=; b=q3BDdNryTtijLqaz8U2JPGw6iZwUoJKWtCq/9DR3YzLDxcXMm25TW1rYJZ30Ha/461 PZWKF1Rf+Kkc4BrSRlSNGOhCkWRfkwNX1ZhRPKTBS+soCLqrPKrA/36duvugo5864nrf +Jg2wK0aJFy5mJ+DyMn4ztrUAAzdMnxxj2XfojEbOa8gWGCP6tOQxEd1dBkLJP8cfJjj IDYT8Hg7oI94zEMFcu+E3O5bEeB4420zLcS1ai+KOS/1SReGrWzK1Ni8rpv3JWBLY+V8 W1mmvdq/F9v5Y/v5E00ooZycgt8xtG3ilxKwdsl2AWgTGQaQdsZQ5ed74GJloRGGTmh9 ZD6A== 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=DwZ8uQLc9dAsLV/W72uj0rc73JFUfS+8iZJQMTZNQ3o=; b=sUXoFxQTRBKJxAZymJ41xZ0pOvVPjQLHWgoj5hFblfiYF4G0qtMGxba/Fw1r/fCA4z rk9baWCWizFRoZwcYTF87T+QqmQjEjWqfLCHHb+cnnAMYVIDXvVmayTcMyNHmx2FUVfh 9XZOyAeJWKV28WRMk/SNnscP2XftxHdYOl/Ek7JTDJW+5f1YKv9mzpI6Hj2HmloAdK9D ApYgn65WwWnNmlXDXeRMw+JzcmNXLCR73RGbJQKBIEQ4ocNAwxizbeC/T208/5I7Ffrf AxefVo8mji+oMH/FbvL0bAG6stfSq5MnDZadSfre0WhT3P9TKTAYsn6COHkVNKdoA+SV JdeA== X-Gm-Message-State: ANhLgQ3Mq1NCPJ3NK32RN0XP9KNsbT2H6/q6NPgYDVTABnLNplgmfYf9 oInbx27nX3p66j60RdEzi3wHvLja X-Google-Smtp-Source: ADFU+vt1WeHZrNDnjslDKtL+nuVRsB200LnbLkehgBQzG9RIeq7UqHGfguZXiUfvYi9m+hTkqm/7hQ== X-Received: by 2002:a17:90b:238e:: with SMTP id mr14mr10827153pjb.146.1584725735067; Fri, 20 Mar 2020 10:35:35 -0700 (PDT) Received: from localhost.localdomain ([106.215.6.94]) by smtp.gmail.com with ESMTPSA id i187sm6037302pfg.33.2020.03.20.10.35.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Mar 2020 10:35:34 -0700 (PDT) From: Amit Singh Tomar To: u-boot@lists.denx.de Cc: andre.przywara@arm.com, manivannan.sadhasivam@linaro.org, trini@konsulko.com, Amit Singh Tomar Subject: [PATCH v7 02/12] arm: actions: rename sysmap-s900 to sysmap-owl Date: Fri, 20 Mar 2020 23:05:04 +0530 Message-Id: <1584725714-2770-3-git-send-email-amittomer25@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1584725714-2770-1-git-send-email-amittomer25@gmail.com> References: <1584725714-2770-1-git-send-email-amittomer25@gmail.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Now that memory maps(for both S700 and S900 SoCs) can be managed using a common file, rename sysmap-s900 to sysmap-owl to reflect the same. Reviewed-by: Manivannan Sadhasivam Signed-off-by: Amit Singh Tomar --- Changes since v6: * No changes. Changes since v5: * No changes. Changes since v4: * No changes. Changes since v3: * Added reviewed-by tag. Changes since v2: * Fixed the commit message and header. Changes since v1: * compile sysmap-owl.c against CONFIG_ARM64 now. --- arch/arm/mach-owl/Makefile | 2 +- arch/arm/mach-owl/sysmap-owl.c | 32 ++++++++++++++++++++++++++++++++ arch/arm/mach-owl/sysmap-s900.c | 32 -------------------------------- 3 files changed, 33 insertions(+), 33 deletions(-) create mode 100644 arch/arm/mach-owl/sysmap-owl.c delete mode 100644 arch/arm/mach-owl/sysmap-s900.c diff --git a/arch/arm/mach-owl/Makefile b/arch/arm/mach-owl/Makefile index 0b181c6..f3a69eb 100644 --- a/arch/arm/mach-owl/Makefile +++ b/arch/arm/mach-owl/Makefile @@ -1,4 +1,4 @@ # SPDX-License-Identifier: GPL-2.0+ obj-y += soc.o -obj-y += sysmap-s900.o +obj-$(CONFIG_ARM64) += sysmap-owl.o diff --git a/arch/arm/mach-owl/sysmap-owl.c b/arch/arm/mach-owl/sysmap-owl.c new file mode 100644 index 0000000..81f6ca2 --- /dev/null +++ b/arch/arm/mach-owl/sysmap-owl.c @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Memory map for Actions Semi Owl series SoCs. + * + * Copyright (C) 2015 Actions Semi Co., Ltd. + * Copyright (C) 2018 Manivannan Sadhasivam + */ + +#include +#include + +static struct mm_region owl_mem_map[] = { + { + .virt = 0x0UL, /* DDR */ + .phys = 0x0UL, /* DDR */ + .size = 0x80000000UL, + .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | + PTE_BLOCK_INNER_SHARE + }, { + .virt = 0xE0000000UL, /* Peripheral block */ + .phys = 0xE0000000UL, /* Peripheral block */ + .size = 0x08000000UL, + .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | + PTE_BLOCK_NON_SHARE | + PTE_BLOCK_PXN | PTE_BLOCK_UXN + }, { + /* List terminator */ + 0, + } +}; + +struct mm_region *mem_map = owl_mem_map; diff --git a/arch/arm/mach-owl/sysmap-s900.c b/arch/arm/mach-owl/sysmap-s900.c deleted file mode 100644 index f78b639..0000000 --- a/arch/arm/mach-owl/sysmap-s900.c +++ /dev/null @@ -1,32 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Actions Semi S900 Memory map - * - * Copyright (C) 2015 Actions Semi Co., Ltd. - * Copyright (C) 2018 Manivannan Sadhasivam - */ - -#include -#include - -static struct mm_region s900_mem_map[] = { - { - .virt = 0x0UL, /* DDR */ - .phys = 0x0UL, /* DDR */ - .size = 0x80000000UL, - .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | - PTE_BLOCK_INNER_SHARE - }, { - .virt = 0xE0000000UL, /* Peripheral block */ - .phys = 0xE0000000UL, /* Peripheral block */ - .size = 0x08000000UL, - .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | - PTE_BLOCK_NON_SHARE | - PTE_BLOCK_PXN | PTE_BLOCK_UXN - }, { - /* List terminator */ - 0, - } -}; - -struct mm_region *mem_map = s900_mem_map; From patchwork Fri Mar 20 17:35:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Tomer X-Patchwork-Id: 1259121 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=m6QgmvLB; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48kWCp5HP9z9sPk for ; Sat, 21 Mar 2020 04:36:22 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C2ABB81795; Fri, 20 Mar 2020 18:35:57 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="m6QgmvLB"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0603A8037A; Fri, 20 Mar 2020 18:35:44 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C995C8037A for ; Fri, 20 Mar 2020 18:35:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=amittomer25@gmail.com Received: by mail-pf1-x443.google.com with SMTP id l184so3634124pfl.7 for ; Fri, 20 Mar 2020 10:35:40 -0700 (PDT) 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=umWA8ObQFjvZYDxVieplb4MAZ5bZBS2GMbE9PJnNA20=; b=m6QgmvLBaKCKzSpl6L9hdj7WDtovcA7skkxIG/faTyZsf1/WBA/KcVjOTeZOefB2je I1edwktUS1u+/bNnLP9/5hKevwvtvCQ54inxzYd+HoG++pHlOeHquCt16AE9ABBp9dVo 5HC6tWXCo7eYHH8oAKocvPQ0HqRNcQzPpRYv9JdokFCIGfZ+UpP5akW2q8GgAB5DxdD1 COsDi0J+lkr1x6tOhwI2X0COhskDejQpBBmNw6Vbv00iVJ1uyfkR5oVLFVDIYDqVdQr1 Ff2VIdPwUaG+5JRG8lXWYVZ7pNIPnh8BRQScI8rKA26qR2pAsbYFClKJJEia7E+d4KDQ DbxA== 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=umWA8ObQFjvZYDxVieplb4MAZ5bZBS2GMbE9PJnNA20=; b=bmW/6ot0j3E/OrM8Y4IV8ytIjdNV6iSh186Vyw6yZWIuUQyvLnHr1fzlSC1clGEFID 1xJiwg0Wg51BnHCnv2EgFl99X+JHTlCDdYCbnz3byHEPxqlICoNozLLXbCl1sP3OXvpJ B2HkXo9h/WscxusKnQZZI3HP9YkK+Pc6ps7kBezABa9otNCaqbhQV06+bo3PVOfAgIkh e5TcETnoViD8ZDXb30p10sSfNcL9mp16VWi8YjryHvTyo/DZOFZVzat4k337Vxb8gO48 j0RcS+RpWC4ac8jxYZp0CGTHdNP6uA9rqZ0kA3MJSy0Q+ZQfVW+ojLWUG64AJvsYWJh0 2NtA== X-Gm-Message-State: ANhLgQ2s3fBM8ItsFOJVOIzDiySu4j5W56Z/kPVmjcpwyxTskca5HTkf Yjd3PJss1rUcsJ7yyIfIy4RBZtW2 X-Google-Smtp-Source: ADFU+vslXunL9sZA4C+2wOFRoVSxWwTUnQfOnPr2Hn0t/sCILjkzDIClpSRBB2Ez3QmTUhfEfmXFiw== X-Received: by 2002:a62:31c4:: with SMTP id x187mr10560176pfx.83.1584725738647; Fri, 20 Mar 2020 10:35:38 -0700 (PDT) Received: from localhost.localdomain ([106.215.6.94]) by smtp.gmail.com with ESMTPSA id i187sm6037302pfg.33.2020.03.20.10.35.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Mar 2020 10:35:37 -0700 (PDT) From: Amit Singh Tomar To: u-boot@lists.denx.de Cc: andre.przywara@arm.com, manivannan.sadhasivam@linaro.org, trini@konsulko.com, Amit Singh Tomar Subject: [PATCH v7 03/12] serial: actions: add compatible string Date: Fri, 20 Mar 2020 23:05:05 +0530 Message-Id: <1584725714-2770-4-git-send-email-amittomer25@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1584725714-2770-1-git-send-email-amittomer25@gmail.com> References: <1584725714-2770-1-git-send-email-amittomer25@gmail.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean This patch adds "actions,owl-uart" string to the owl uart driver. It is also defined in Linux kernel. Reviewed-by: Andre Przywara Signed-off-by: Amit Singh Tomar --- Changes since v6: * Added Reviewd-by tag. Changes since v5: * Moved it to from 06/11 to 03/11. * Used appropriate commit message. * Removed the reviwed-by tag. Changes since v4: * Moved it to from 09/11 to 06/11. Changes since v3: * Used only owl-uart for compatible string. Changes since v2: * No changes. Changes since v1: * No changes. --- drivers/serial/serial_owl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/serial/serial_owl.c b/drivers/serial/serial_owl.c index 7ead73e..539acdc 100644 --- a/drivers/serial/serial_owl.c +++ b/drivers/serial/serial_owl.c @@ -121,6 +121,7 @@ static const struct dm_serial_ops owl_serial_ops = { static const struct udevice_id owl_serial_ids[] = { { .compatible = "actions,s900-serial" }, + { .compatible = "actions,owl-uart" }, { } }; From patchwork Fri Mar 20 17:35:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Amit Tomer X-Patchwork-Id: 1259123 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=bDv7prwC; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48kWDG0Bmcz9sPR for ; Sat, 21 Mar 2020 04:36:45 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 27E4981838; Fri, 20 Mar 2020 18:36:12 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="bDv7prwC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 10D9A817A7; Fri, 20 Mar 2020 18:36:01 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id F3BCE81764 for ; Fri, 20 Mar 2020 18:35:46 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=amittomer25@gmail.com Received: by mail-pf1-x441.google.com with SMTP id 22so36224pfa.9 for ; Fri, 20 Mar 2020 10:35:46 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=3dLnml4qGPTvlP2HCMsTRjVgpWMTS8nTKg+BHbA4sLE=; b=bDv7prwCahuDR7QxAj2yAcSkwhdnHGjkakWqCReNtIp21cBf5/19ZMgGzwOLd6X1LC qskyV2OMh8RpkElj0jDIYTphcalcgZwQHgsgh+nQr/32Xsxk35NrL1RcoMNqdiiPiPWx cnjWvHPuYoHLqXbCHEynccZ410PuNdTxwdWUAguT2tUtZa3xLe5rkrmaY/u6dWbtiH2C E1jKZRXKRLbArsYxn9y25nwh3H7DHPgjFjAwIJ43pn8R0xqi0ulLThMS0TbnOw3P+6ob BMPf5nEdLxsMJqn9ygj2g17W0asadT7RU5lGbu+c0Dmb6+QsPb3zI6yOxlQq7nalN8Tt P5Yw== 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:mime-version:content-transfer-encoding; bh=3dLnml4qGPTvlP2HCMsTRjVgpWMTS8nTKg+BHbA4sLE=; b=sFhVkudTVuPmzyCxQ1V5rRwOO2cmA5uhTYhs0Wz6B1ub0t+KBCtPAVbnaGCdj5oZsk gDSPmOtTqg6U/VAtGgQx4PthttJmb/3XCTFjNPS32AAnD3yfTAsi88MUgAU37iIGDoJa E3dQTN4hlIXbEeweKqFm6uDjffTnfdIyNI6qwDfDgw5/zZqvXDEnlcyhqi/QCo/6SNk5 wM/MYawzKQqtFQaOnQmMHpAZ0cmM3dIxJedChVzh/40Dow86FFX9Q29x92yNgQ6JBx8N N7j/wCbB1hpHISTzTkIpysFVTqQ829o+clZwU2cFMMjb5WK0vDDIJWvWD8DVB785VSVa ykQg== X-Gm-Message-State: ANhLgQ1V6o7/4e0pik+ephLuONexeaqUT0BlBVB3umrb/y9KsKAH122p kYpRots5ecledgevRIFDrU/m7Xd0 X-Google-Smtp-Source: ADFU+vvUu2arMwuY988zYWaOHwCqZMHH3QPvI6oZd1qDUuOi5xSeTRK1OzapQSQ7dNyJwtG9OnEvuA== X-Received: by 2002:a65:6409:: with SMTP id a9mr3334385pgv.303.1584725744526; Fri, 20 Mar 2020 10:35:44 -0700 (PDT) Received: from localhost.localdomain ([106.215.6.94]) by smtp.gmail.com with ESMTPSA id i187sm6037302pfg.33.2020.03.20.10.35.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Mar 2020 10:35:43 -0700 (PDT) From: Amit Singh Tomar To: u-boot@lists.denx.de Cc: andre.przywara@arm.com, manivannan.sadhasivam@linaro.org, trini@konsulko.com, Amit Singh Tomar Subject: [PATCH v7 04/12] arm: dts: sync dts for Action Semi S900 Date: Fri, 20 Mar 2020 23:05:06 +0530 Message-Id: <1584725714-2770-5-git-send-email-amittomer25@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1584725714-2770-1-git-send-email-amittomer25@gmail.com> References: <1584725714-2770-1-git-send-email-amittomer25@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Synchronize device tree bindings with v5.5-rc6 tag with commit id "b3a987b0264d". Also, it removes older clock binding defined for S900 along with undocumented compatible string "actions,s900-serial" from serial driver and adapts clock driver to cater to new bindings. Reviewed-by: Andre Przywara Signed-off-by: Amit Singh Tomar --- Changes since v6: * Added Reviewed-by tag. Changes since v5: * Moved it 04/11 from 03/11. * removed the undocumented compatible string "actions,s900-serial". * removed the reviewed-by tag. Changes since v4: * This patch is re-ordered, moved from 07/11 to 03/11. * Used the commit-id(12 chars long) in commit message. Changes since v3: * Added Reviewed-by: tag. Changes since v2: * Newly added patch, not there in v2/v1. --- arch/arm/dts/s900.dtsi | 322 +++++++++++++++++++++++-- drivers/clk/owl/clk_s900.c | 6 +- drivers/serial/serial_owl.c | 1 - include/dt-bindings/clock/actions,s900-cmu.h | 129 ++++++++++ include/dt-bindings/clock/s900_cmu.h | 77 ------ include/dt-bindings/reset/actions,s900-reset.h | 65 +++++ 6 files changed, 498 insertions(+), 102 deletions(-) create mode 100644 include/dt-bindings/clock/actions,s900-cmu.h delete mode 100644 include/dt-bindings/clock/s900_cmu.h create mode 100644 include/dt-bindings/reset/actions,s900-reset.h diff --git a/arch/arm/dts/s900.dtsi b/arch/arm/dts/s900.dtsi index 2bbb30a..eb35cf7 100644 --- a/arch/arm/dts/s900.dtsi +++ b/arch/arm/dts/s900.dtsi @@ -1,17 +1,94 @@ -// SPDX-License-Identifier: GPL-2.0+ -// -// Device Tree Source for Actions Semi S900 SoC -// -// Copyright (C) 2015 Actions Semi Co., Ltd. -// Copyright (C) 2018 Manivannan Sadhasivam +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2017 Andreas Färber + */ -/dts-v1/; -#include +#include +#include +#include +#include / { compatible = "actions,s900"; - #address-cells = <0x2>; - #size-cells = <0x2>; + interrupt-parent = <&gic>; + #address-cells = <2>; + #size-cells = <2>; + + cpus { + #address-cells = <2>; + #size-cells = <0>; + + cpu0: cpu@0 { + device_type = "cpu"; + compatible = "arm,cortex-a53"; + reg = <0x0 0x0>; + enable-method = "psci"; + }; + + cpu1: cpu@1 { + device_type = "cpu"; + compatible = "arm,cortex-a53"; + reg = <0x0 0x1>; + enable-method = "psci"; + }; + + cpu2: cpu@2 { + device_type = "cpu"; + compatible = "arm,cortex-a53"; + reg = <0x0 0x2>; + enable-method = "psci"; + }; + + cpu3: cpu@3 { + device_type = "cpu"; + compatible = "arm,cortex-a53"; + reg = <0x0 0x3>; + enable-method = "psci"; + }; + }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + secmon@1f000000 { + reg = <0x0 0x1f000000 0x0 0x1000000>; + no-map; + }; + }; + + psci { + compatible = "arm,psci-0.2"; + method = "smc"; + }; + + arm-pmu { + compatible = "arm,cortex-a53-pmu"; + interrupts = , + , + , + ; + interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupts = , + , + , + ; + }; + + hosc: hosc { + compatible = "fixed-clock"; + clock-frequency = <24000000>; + #clock-cells = <0>; + }; losc: losc { compatible = "fixed-clock"; @@ -26,28 +103,231 @@ }; soc { - u-boot,dm-pre-reloc; compatible = "simple-bus"; - #address-cells = <0x2>; - #size-cells = <0x2>; + #address-cells = <2>; + #size-cells = <2>; ranges; + gic: interrupt-controller@e00f1000 { + compatible = "arm,gic-400"; + reg = <0x0 0xe00f1000 0x0 0x1000>, + <0x0 0xe00f2000 0x0 0x2000>, + <0x0 0xe00f4000 0x0 0x2000>, + <0x0 0xe00f6000 0x0 0x2000>; + interrupts = ; + interrupt-controller; + #interrupt-cells = <3>; + }; + + uart0: serial@e0120000 { + compatible = "actions,s900-uart", "actions,owl-uart"; + reg = <0x0 0xe0120000 0x0 0x2000>; + clocks = <&cmu CLK_UART0>; + interrupts = ; + status = "disabled"; + }; + + uart1: serial@e0122000 { + compatible = "actions,s900-uart", "actions,owl-uart"; + reg = <0x0 0xe0122000 0x0 0x2000>; + clocks = <&cmu CLK_UART1>; + interrupts = ; + status = "disabled"; + }; + + uart2: serial@e0124000 { + compatible = "actions,s900-uart", "actions,owl-uart"; + reg = <0x0 0xe0124000 0x0 0x2000>; + clocks = <&cmu CLK_UART2>; + interrupts = ; + status = "disabled"; + }; + + uart3: serial@e0126000 { + compatible = "actions,s900-uart", "actions,owl-uart"; + reg = <0x0 0xe0126000 0x0 0x2000>; + clocks = <&cmu CLK_UART3>; + interrupts = ; + status = "disabled"; + }; + + uart4: serial@e0128000 { + compatible = "actions,s900-uart", "actions,owl-uart"; + reg = <0x0 0xe0128000 0x0 0x2000>; + clocks = <&cmu CLK_UART4>; + interrupts = ; + status = "disabled"; + }; + uart5: serial@e012a000 { - u-boot,dm-pre-reloc; - compatible = "actions,s900-serial"; - reg = <0x0 0xe012a000 0x0 0x1000>; - clocks = <&cmu CLOCK_UART5>; + compatible = "actions,s900-uart", "actions,owl-uart"; + reg = <0x0 0xe012a000 0x0 0x2000>; + clocks = <&cmu CLK_UART5>; + interrupts = ; status = "disabled"; }; + uart6: serial@e012c000 { + compatible = "actions,s900-uart", "actions,owl-uart"; + reg = <0x0 0xe012c000 0x0 0x2000>; + clocks = <&cmu CLK_UART6>; + interrupts = ; + status = "disabled"; + }; + + sps: power-controller@e012e000 { + compatible = "actions,s900-sps"; + reg = <0x0 0xe012e000 0x0 0x2000>; + #power-domain-cells = <1>; + }; + cmu: clock-controller@e0160000 { - u-boot,dm-pre-reloc; compatible = "actions,s900-cmu"; reg = <0x0 0xe0160000 0x0 0x1000>; - clocks = <&losc>, <&diff24M>; - clock-names = "losc", "diff24M"; + clocks = <&hosc>, <&losc>; #clock-cells = <1>; + #reset-cells = <1>; + }; + + i2c0: i2c@e0170000 { + compatible = "actions,s900-i2c"; + reg = <0 0xe0170000 0 0x1000>; + clocks = <&cmu CLK_I2C0>; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c1: i2c@e0172000 { + compatible = "actions,s900-i2c"; + reg = <0 0xe0172000 0 0x1000>; + clocks = <&cmu CLK_I2C1>; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c2: i2c@e0174000 { + compatible = "actions,s900-i2c"; + reg = <0 0xe0174000 0 0x1000>; + clocks = <&cmu CLK_I2C2>; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c3: i2c@e0176000 { + compatible = "actions,s900-i2c"; + reg = <0 0xe0176000 0 0x1000>; + clocks = <&cmu CLK_I2C3>; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c4: i2c@e0178000 { + compatible = "actions,s900-i2c"; + reg = <0 0xe0178000 0 0x1000>; + clocks = <&cmu CLK_I2C4>; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c5: i2c@e017a000 { + compatible = "actions,s900-i2c"; + reg = <0 0xe017a000 0 0x1000>; + clocks = <&cmu CLK_I2C5>; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + pinctrl: pinctrl@e01b0000 { + compatible = "actions,s900-pinctrl"; + reg = <0x0 0xe01b0000 0x0 0x1000>; + clocks = <&cmu CLK_GPIO>; + gpio-controller; + gpio-ranges = <&pinctrl 0 0 146>; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupts = , + , + , + , + , + ; + }; + + timer: timer@e0228000 { + compatible = "actions,s900-timer"; + reg = <0x0 0xe0228000 0x0 0x8000>; + interrupts = ; + interrupt-names = "timer1"; + }; + + dma: dma-controller@e0260000 { + compatible = "actions,s900-dma"; + reg = <0x0 0xe0260000 0x0 0x1000>; + interrupts = , + , + , + ; + #dma-cells = <1>; + dma-channels = <12>; + dma-requests = <46>; + clocks = <&cmu CLK_DMAC>; + }; + + mmc0: mmc@e0330000 { + compatible = "actions,owl-mmc"; + reg = <0x0 0xe0330000 0x0 0x4000>; + interrupts = ; + clocks = <&cmu CLK_SD0>; + resets = <&cmu RESET_SD0>; + dmas = <&dma 2>; + dma-names = "mmc"; + status = "disabled"; + }; + + mmc1: mmc@e0334000 { + compatible = "actions,owl-mmc"; + reg = <0x0 0xe0334000 0x0 0x4000>; + interrupts = ; + clocks = <&cmu CLK_SD1>; + resets = <&cmu RESET_SD1>; + dmas = <&dma 3>; + dma-names = "mmc"; + status = "disabled"; + }; + + mmc2: mmc@e0338000 { + compatible = "actions,owl-mmc"; + reg = <0x0 0xe0338000 0x0 0x4000>; + interrupts = ; + clocks = <&cmu CLK_SD2>; + resets = <&cmu RESET_SD2>; + dmas = <&dma 4>; + dma-names = "mmc"; + status = "disabled"; + }; + + mmc3: mmc@e033c000 { + compatible = "actions,owl-mmc"; + reg = <0x0 0xe033c000 0x0 0x4000>; + interrupts = ; + clocks = <&cmu CLK_SD3>; + resets = <&cmu RESET_SD3>; + dmas = <&dma 46>; + dma-names = "mmc"; + status = "disabled"; }; }; }; - diff --git a/drivers/clk/owl/clk_s900.c b/drivers/clk/owl/clk_s900.c index a7c15d2..d60f199 100644 --- a/drivers/clk/owl/clk_s900.c +++ b/drivers/clk/owl/clk_s900.c @@ -12,7 +12,7 @@ #include #include -#include +#include void owl_clk_init(struct owl_clk_priv *priv) { @@ -78,7 +78,7 @@ int owl_clk_enable(struct clk *clk) struct owl_clk_priv *priv = dev_get_priv(clk->dev); switch (clk->id) { - case CLOCK_UART5: + case CLK_UART5: owl_uart_clk_enable(priv); break; default: @@ -93,7 +93,7 @@ int owl_clk_disable(struct clk *clk) struct owl_clk_priv *priv = dev_get_priv(clk->dev); switch (clk->id) { - case CLOCK_UART5: + case CLK_UART5: owl_uart_clk_disable(priv); break; default: diff --git a/drivers/serial/serial_owl.c b/drivers/serial/serial_owl.c index 539acdc..bb60ca2 100644 --- a/drivers/serial/serial_owl.c +++ b/drivers/serial/serial_owl.c @@ -120,7 +120,6 @@ static const struct dm_serial_ops owl_serial_ops = { }; static const struct udevice_id owl_serial_ids[] = { - { .compatible = "actions,s900-serial" }, { .compatible = "actions,owl-uart" }, { } }; diff --git a/include/dt-bindings/clock/actions,s900-cmu.h b/include/dt-bindings/clock/actions,s900-cmu.h new file mode 100644 index 0000000..7c12515 --- /dev/null +++ b/include/dt-bindings/clock/actions,s900-cmu.h @@ -0,0 +1,129 @@ +// SPDX-License-Identifier: GPL-2.0+ +// +// Device Tree binding constants for Actions Semi S900 Clock Management Unit +// +// Copyright (c) 2014 Actions Semi Inc. +// Copyright (c) 2018 Linaro Ltd. + +#ifndef __DT_BINDINGS_CLOCK_S900_CMU_H +#define __DT_BINDINGS_CLOCK_S900_CMU_H + +#define CLK_NONE 0 + +/* fixed rate clocks */ +#define CLK_LOSC 1 +#define CLK_HOSC 2 + +/* pll clocks */ +#define CLK_CORE_PLL 3 +#define CLK_DEV_PLL 4 +#define CLK_DDR_PLL 5 +#define CLK_NAND_PLL 6 +#define CLK_DISPLAY_PLL 7 +#define CLK_DSI_PLL 8 +#define CLK_ASSIST_PLL 9 +#define CLK_AUDIO_PLL 10 + +/* system clock */ +#define CLK_CPU 15 +#define CLK_DEV 16 +#define CLK_NOC 17 +#define CLK_NOC_MUX 18 +#define CLK_NOC_DIV 19 +#define CLK_AHB 20 +#define CLK_APB 21 +#define CLK_DMAC 22 + +/* peripheral device clock */ +#define CLK_GPIO 23 + +#define CLK_BISP 24 +#define CLK_CSI0 25 +#define CLK_CSI1 26 + +#define CLK_DE0 27 +#define CLK_DE1 28 +#define CLK_DE2 29 +#define CLK_DE3 30 +#define CLK_DSI 32 + +#define CLK_GPU 33 +#define CLK_GPU_CORE 34 +#define CLK_GPU_MEM 35 +#define CLK_GPU_SYS 36 + +#define CLK_HDE 37 +#define CLK_I2C0 38 +#define CLK_I2C1 39 +#define CLK_I2C2 40 +#define CLK_I2C3 41 +#define CLK_I2C4 42 +#define CLK_I2C5 43 +#define CLK_I2SRX 44 +#define CLK_I2STX 45 +#define CLK_IMX 46 +#define CLK_LCD 47 +#define CLK_NAND0 48 +#define CLK_NAND1 49 +#define CLK_PWM0 50 +#define CLK_PWM1 51 +#define CLK_PWM2 52 +#define CLK_PWM3 53 +#define CLK_PWM4 54 +#define CLK_PWM5 55 +#define CLK_SD0 56 +#define CLK_SD1 57 +#define CLK_SD2 58 +#define CLK_SD3 59 +#define CLK_SENSOR 60 +#define CLK_SPEED_SENSOR 61 +#define CLK_SPI0 62 +#define CLK_SPI1 63 +#define CLK_SPI2 64 +#define CLK_SPI3 65 +#define CLK_THERMAL_SENSOR 66 +#define CLK_UART0 67 +#define CLK_UART1 68 +#define CLK_UART2 69 +#define CLK_UART3 70 +#define CLK_UART4 71 +#define CLK_UART5 72 +#define CLK_UART6 73 +#define CLK_VCE 74 +#define CLK_VDE 75 + +#define CLK_USB3_480MPLL0 76 +#define CLK_USB3_480MPHY0 77 +#define CLK_USB3_5GPHY 78 +#define CLK_USB3_CCE 79 +#define CLK_USB3_MAC 80 + +#define CLK_TIMER 83 + +#define CLK_HDMI_AUDIO 84 + +#define CLK_24M 85 + +#define CLK_EDP 86 + +#define CLK_24M_EDP 87 +#define CLK_EDP_PLL 88 +#define CLK_EDP_LINK 89 + +#define CLK_USB2H0_PLLEN 90 +#define CLK_USB2H0_PHY 91 +#define CLK_USB2H0_CCE 92 +#define CLK_USB2H1_PLLEN 93 +#define CLK_USB2H1_PHY 94 +#define CLK_USB2H1_CCE 95 + +#define CLK_DDR0 96 +#define CLK_DDR1 97 +#define CLK_DMM 98 + +#define CLK_ETH_MAC 99 +#define CLK_RMII_REF 100 + +#define CLK_NR_CLKS (CLK_RMII_REF + 1) + +#endif /* __DT_BINDINGS_CLOCK_S900_CMU_H */ diff --git a/include/dt-bindings/clock/s900_cmu.h b/include/dt-bindings/clock/s900_cmu.h deleted file mode 100644 index 2685a6d..0000000 --- a/include/dt-bindings/clock/s900_cmu.h +++ /dev/null @@ -1,77 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2015 Actions Semi Co., Ltd. - * Copyright (C) 2018 Manivannan Sadhasivam - * - */ - -#ifndef _DT_BINDINGS_CLOCK_S900_CMU_H_ -#define _DT_BINDINGS_CLOCK_S900_CMU_H_ - -/* Module Clock ID */ -#define CLOCK_DDRCH1 0 -#define CLOCK_DMAC 1 -#define CLOCK_DDRCH0 2 -#define CLOCK_BROM 3 -#define CLOCK_NANDC0 4 -#define CLOCK_SD0 5 -#define CLOCK_SD1 6 -#define CLOCK_SD2 7 -#define CLOCK_DE 8 -#define CLOCK_LVDS 9 -#define CLOCK_EDP 10 -#define CLOCK_NANDC1 11 -#define CLOCK_DSI 12 -#define CLOCK_CSI0 13 -#define CLOCK_BISP 14 -#define CLOCK_CSI1 15 -#define CLOCK_SD3 16 -#define CLOCK_I2C4 17 -#define CLOCK_GPIO 18 -#define CLOCK_DMM 19 -#define CLOCK_I2STX 20 -#define CLOCK_I2SRX 21 -#define CLOCK_HDMIA 22 -#define CLOCK_SPDIF 23 -#define CLOCK_PCM0 24 -#define CLOCK_VDE 25 -#define CLOCK_VCE 26 -#define CLOCK_HDE 27 -#define CLOCK_SHARESRAM 28 -#define CLOCK_CMU_DDR1 29 -#define CLOCK_GPU3D 30 -#define CLOCK_CMUDDR0 31 -#define CLOCK_SPEED 32 -#define CLOCK_I2C5 33 -#define CLOCK_THERMAL 34 -#define CLOCK_HDMI 35 -#define CLOCK_PWM4 36 -#define CLOCK_PWM5 37 -#define CLOCK_UART0 38 -#define CLOCK_UART1 39 -#define CLOCK_UART2 40 -#define CLOCK_IRC 41 -#define CLOCK_SPI0 42 -#define CLOCK_SPI1 43 -#define CLOCK_SPI2 44 -#define CLOCK_SPI3 45 -#define CLOCK_I2C0 46 -#define CLOCK_I2C1 47 -#define CLOCK_PCM1 48 -#define CLOCK_IMX 49 -#define CLOCK_UART6 50 -#define CLOCK_UART3 51 -#define CLOCK_UART4 52 -#define CLOCK_UART5 53 -#define CLOCK_ETHERNET 54 -#define CLOCK_PWM0 55 -#define CLOCK_PWM1 56 -#define CLOCK_PWM2 57 -#define CLOCK_PWM3 58 -#define CLOCK_TIMER 59 -#define CLOCK_SE 60 -#define CLOCK_HDCP2TX 61 -#define CLOCK_I2C2 62 -#define CLOCK_I2C3 63 - -#endif diff --git a/include/dt-bindings/reset/actions,s900-reset.h b/include/dt-bindings/reset/actions,s900-reset.h new file mode 100644 index 0000000..42c19d0 --- /dev/null +++ b/include/dt-bindings/reset/actions,s900-reset.h @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT) +// +// Device Tree binding constants for Actions Semi S900 Reset Management Unit +// +// Copyright (c) 2018 Linaro Ltd. + +#ifndef __DT_BINDINGS_ACTIONS_S900_RESET_H +#define __DT_BINDINGS_ACTIONS_S900_RESET_H + +#define RESET_CHIPID 0 +#define RESET_CPU_SCNT 1 +#define RESET_SRAMI 2 +#define RESET_DDR_CTL_PHY 3 +#define RESET_DMAC 4 +#define RESET_GPIO 5 +#define RESET_BISP_AXI 6 +#define RESET_CSI0 7 +#define RESET_CSI1 8 +#define RESET_DE 9 +#define RESET_DSI 10 +#define RESET_GPU3D_PA 11 +#define RESET_GPU3D_PB 12 +#define RESET_HDE 13 +#define RESET_I2C0 14 +#define RESET_I2C1 15 +#define RESET_I2C2 16 +#define RESET_I2C3 17 +#define RESET_I2C4 18 +#define RESET_I2C5 19 +#define RESET_IMX 20 +#define RESET_NANDC0 21 +#define RESET_NANDC1 22 +#define RESET_SD0 23 +#define RESET_SD1 24 +#define RESET_SD2 25 +#define RESET_SD3 26 +#define RESET_SPI0 27 +#define RESET_SPI1 28 +#define RESET_SPI2 29 +#define RESET_SPI3 30 +#define RESET_UART0 31 +#define RESET_UART1 32 +#define RESET_UART2 33 +#define RESET_UART3 34 +#define RESET_UART4 35 +#define RESET_UART5 36 +#define RESET_UART6 37 +#define RESET_HDMI 38 +#define RESET_LVDS 39 +#define RESET_EDP 40 +#define RESET_USB2HUB 41 +#define RESET_USB2HSIC 42 +#define RESET_USB3 43 +#define RESET_PCM1 44 +#define RESET_AUDIO 45 +#define RESET_PCM0 46 +#define RESET_SE 47 +#define RESET_GIC 48 +#define RESET_DDR_CTL_PHY_AXI 49 +#define RESET_CMU_DDR 50 +#define RESET_DMM 51 +#define RESET_HDCP2TX 52 +#define RESET_ETHERNET 53 + +#endif /* __DT_BINDINGS_ACTIONS_S900_RESET_H */ From patchwork Fri Mar 20 17:35:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Tomer X-Patchwork-Id: 1259122 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=QmOwNZmt; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48kWD145Gmz9sPk for ; Sat, 21 Mar 2020 04:36:33 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1D639817F2; Fri, 20 Mar 2020 18:36:06 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="QmOwNZmt"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B82FA81776; Fri, 20 Mar 2020 18:35:56 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9C8C381793 for ; Fri, 20 Mar 2020 18:35:50 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=amittomer25@gmail.com Received: by mail-pl1-x644.google.com with SMTP id h11so2792925plr.11 for ; Fri, 20 Mar 2020 10:35:50 -0700 (PDT) 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=7+vJGKQDKWARDxmTgLZ0+03cAQWD2opfw8uFPgU4FWk=; b=QmOwNZmtcIS/Rb5sh5pwHiPJlIDFhLHwEFPuRsN3AblMHg2GyXXLtSS6K8WjtElFMN JLabZ+0nZmgFFggCvUpTha60kyNITurPzcGRZuyiumbSfp7tqH+SVHU97+NsOIn3fn2a UeEk0QbC6YtYTlxA/nKJooKNCJoZaIAIXELbm4Z6svzfcU2ytYfsjNIBq8EQOLAA/Lmb 6yEXodoe5vWzp8a/qCVTolp+qG6jUifsZDSC1kVn6aXcPdTHaXNoo7UbLS5f4OM/Y7I+ QzdkH1UrC2dI/MRa6NCYzWI4CnYi1yqjdIJ5NrccvMghC3pz6gSJ5Alk6YkJq8uqlBXB /ygg== 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=7+vJGKQDKWARDxmTgLZ0+03cAQWD2opfw8uFPgU4FWk=; b=WXLFWuc4yKEFmQaC8b1K5ZDqqqakm6sbj7Bi+ak2QWkk4H4QZnst7TqOY/gZkwIEMF HeBN5WiFuFmBhSIRrA0Z7nJFUlutvBS6h/6sQgkTbeLeUzYFHJ4gY2khst+zgHJyoB16 8WYOEpZp4kKfGZk3k7mEDxUSDv8xNpxfMy+EO8lZ9FEc6me4JJKj7fTNDLynzlpSeS/g ol9QmAJj43ksZw/X+/8v7Sk6/qOYjVS6bY+WZsukUF2Ail+4iT6G16vHdR778OQEnkQh sAQOn9nwlY2BkFke6uPDRlcMtKPAfSWidII48DHC1X1eyKDipZ/O4sp50FJhEaXDYQZr gH2A== X-Gm-Message-State: ANhLgQ2k9wJB/7L3c8FOl5HuJg4yOzpRZmsnJhAzlS9I3csR+Fi1aavn 7vwD28mr5ZBDquDW6lBlolTKwNeE X-Google-Smtp-Source: ADFU+vtBkdXrtxPEvs5qsRvjmxgYzDBBmsX/REmDgU5VK1aUOZ3xPE+iuJR84rrOJ8KUKoTDpssDzA== X-Received: by 2002:a17:90b:24c:: with SMTP id fz12mr10573417pjb.22.1584725748534; Fri, 20 Mar 2020 10:35:48 -0700 (PDT) Received: from localhost.localdomain ([106.215.6.94]) by smtp.gmail.com with ESMTPSA id i187sm6037302pfg.33.2020.03.20.10.35.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Mar 2020 10:35:47 -0700 (PDT) From: Amit Singh Tomar To: u-boot@lists.denx.de Cc: andre.przywara@arm.com, manivannan.sadhasivam@linaro.org, trini@konsulko.com, Amit Singh Tomar Subject: [PATCH v7 05/12] arm: dts: actions: s900: add u-boot specific dtsi file Date: Fri, 20 Mar 2020 23:05:07 +0530 Message-Id: <1584725714-2770-6-git-send-email-amittomer25@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1584725714-2770-1-git-send-email-amittomer25@gmail.com> References: <1584725714-2770-1-git-send-email-amittomer25@gmail.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Devices like uart and clk are needed to be enabled before relocation. This patch adds u-boot.dtsi file that mark these device as dm-pre-reloc. Reviewed-by: Manivannan Sadhasivam Signed-off-by: Amit Singh Tomar --- Changes since v6: * No changes. Changes since v5: * No changes. Changes since v4: * This patch is re-ordered, moved from 08/11 to 04/11. Changes since v3: * Replaced dtsi with dts in subject line along with arm:dts: to the prefix. * Added reviewed-by tag. Changes since v2: * Newly added patch, not there in v2/v1. --- arch/arm/dts/s900-u-boot.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 arch/arm/dts/s900-u-boot.dtsi diff --git a/arch/arm/dts/s900-u-boot.dtsi b/arch/arm/dts/s900-u-boot.dtsi new file mode 100644 index 0000000..a95f2cc --- /dev/null +++ b/arch/arm/dts/s900-u-boot.dtsi @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + */ + +/{ + soc { + u-boot,dm-pre-reloc; + }; +}; + +&uart5 { + u-boot,dm-pre-reloc; +}; + +&cmu { + u-boot,dm-pre-reloc; +}; From patchwork Fri Mar 20 17:35:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Tomer X-Patchwork-Id: 1259124 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=ZX5QRBT8; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48kWDV15dHz9sPk for ; Sat, 21 Mar 2020 04:36:58 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E438681776; Fri, 20 Mar 2020 18:36:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ZX5QRBT8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 744DA8178D; Fri, 20 Mar 2020 18:36:01 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 215BA801D2 for ; Fri, 20 Mar 2020 18:35:54 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=amittomer25@gmail.com Received: by mail-pl1-x644.google.com with SMTP id r3so2791846pls.13 for ; Fri, 20 Mar 2020 10:35:54 -0700 (PDT) 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=ucC00vlb7CWQ1s+mq0tu4KDlE6GSdrI2VUsuApZYf0U=; b=ZX5QRBT83bMfuK010uD9gBo+sdxw2XJBnATaSHYDwS5rhwus3bY1gIaXDQtOSTN6Or qDumDZnsNeAHUJxe2sXgReFk/qHwe+rsGa6YMlSBozTNz6nGv+csSqzP9wMlVwRu4+DP Ai34tDW8W9ENlMT+v0Q5vu3tQDvsXwVM/dcldydBCsLoK6Ga4I1VwtDCmU+r4g2mr83J vw5bpxrNgvsAqhpA0rEBkLuQS4937Gv4D06wqyEigEbRHI3F2yy54N3PdB23H31Rv0KS WU5CeXB437Zj1LxdqVPFc1/OradDhPgEo3qxWCwMQPy+5u7q0AY3sPHiPc29aedMoQPX ORHQ== 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=ucC00vlb7CWQ1s+mq0tu4KDlE6GSdrI2VUsuApZYf0U=; b=kqd7cuqOoQxmXy4jXWeNR2JR/ThsmryLugrd4ZHeDXh4X9rzFHQZ5HInQ7vwqI4MyE HLnrfd9srFk9t1Q8+S3Agjwcee61CETbZVFZS+aOe88Mpkl4Jl86OQPJk0WMf58VQhYS zDpS9CxXGa34wVPjOPulMV6iR2F/a2+f0FnB1PXhhkjSVu4EgwZ0ZhwhDWTyi7Ub7URP DPmE0C7ar87qyvjx4obj79wSTTKdy53IXLlUAb+HHVFK7/zT0VImuBxa0GG2HLk/LjpJ jzIcXyTXKIpbKSjVKPRz32jGoBfGP6RU9Z5U1h9H/do82bAtzx2Qgp3iwhTGZ92yad/S 7SIw== X-Gm-Message-State: ANhLgQ3x/ULv4nhxFxsYN5ZVPdhxUW1HlpQPdjU6jM/4FuZgnvAB2fn5 jLhMTTh0pJP2FTuE7Fs8OdNU1RVJ X-Google-Smtp-Source: ADFU+vtJI3b45ft3xtrs0MnXGMN55ylMBVxY04syF/FymSLmRGIcZz8ABgEtZ+fkBFMJXXzkwsgpFw== X-Received: by 2002:a17:902:e981:: with SMTP id f1mr9875789plb.198.1584725751642; Fri, 20 Mar 2020 10:35:51 -0700 (PDT) Received: from localhost.localdomain ([106.215.6.94]) by smtp.gmail.com with ESMTPSA id i187sm6037302pfg.33.2020.03.20.10.35.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Mar 2020 10:35:50 -0700 (PDT) From: Amit Singh Tomar To: u-boot@lists.denx.de Cc: andre.przywara@arm.com, manivannan.sadhasivam@linaro.org, trini@konsulko.com, Amit Singh Tomar Subject: [PATCH v7 06/12] clk: actions: Add common clock driver Date: Fri, 20 Mar 2020 23:05:08 +0530 Message-Id: <1584725714-2770-7-git-send-email-amittomer25@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1584725714-2770-1-git-send-email-amittomer25@gmail.com> References: <1584725714-2770-1-git-send-email-amittomer25@gmail.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean This patch converts S900 clock driver to something common that can be used for other SoCs, for instance S700(few of clk registers are same). Reviewed-by: Andre Przywara Signed-off-by: Amit Singh Tomar --- Changes since v6: * Fixed the bug that breaks S900(missing break in switch statement). Changes since v5: * No changes. Changes since v4: * This patch is re-ordered, moved from 08/11 to 04/11. Changes since v3: * Replaced dtsi with dts in subject line along with arm:dts: to the prefix. * Added reviewed-by tag. Changes since v2: * Newly added patch, not there in v2/v1. --- arch/arm/Kconfig | 2 + arch/arm/include/asm/arch-owl/clk_s900.h | 57 ----------- arch/arm/include/asm/arch-owl/regs_s700.h | 56 +++++++++++ configs/bubblegum_96_defconfig | 3 - drivers/clk/owl/Kconfig | 8 +- drivers/clk/owl/Makefile | 2 +- drivers/clk/owl/clk_owl.c | 153 ++++++++++++++++++++++++++++++ drivers/clk/owl/clk_owl.h | 65 +++++++++++++ drivers/clk/owl/clk_s900.c | 137 -------------------------- 9 files changed, 279 insertions(+), 204 deletions(-) delete mode 100644 arch/arm/include/asm/arch-owl/clk_s900.h create mode 100644 arch/arm/include/asm/arch-owl/regs_s700.h create mode 100644 drivers/clk/owl/clk_owl.c create mode 100644 drivers/clk/owl/clk_owl.h delete mode 100644 drivers/clk/owl/clk_s900.c diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 1cfdcb6..dba4d8c 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -876,6 +876,8 @@ config ARCH_OWL select DM select DM_SERIAL select OWL_SERIAL + select CLK + select CLK_OWL select OF_CONTROL imply CMD_DM diff --git a/arch/arm/include/asm/arch-owl/clk_s900.h b/arch/arm/include/asm/arch-owl/clk_s900.h deleted file mode 100644 index 88e88f7..0000000 --- a/arch/arm/include/asm/arch-owl/clk_s900.h +++ /dev/null @@ -1,57 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Actions Semi S900 Clock Definitions - * - * Copyright (C) 2015 Actions Semi Co., Ltd. - * Copyright (C) 2018 Manivannan Sadhasivam - * - */ - -#ifndef _OWL_CLK_S900_H_ -#define _OWL_CLK_S900_H_ - -#include - -struct owl_clk_priv { - phys_addr_t base; -}; - -/* BUSCLK register definitions */ -#define CMU_PDBGDIV_8 7 -#define CMU_PDBGDIV_SHIFT 26 -#define CMU_PDBGDIV_DIV (CMU_PDBGDIV_8 << CMU_PDBGDIV_SHIFT) -#define CMU_PERDIV_8 7 -#define CMU_PERDIV_SHIFT 20 -#define CMU_PERDIV_DIV (CMU_PERDIV_8 << CMU_PERDIV_SHIFT) -#define CMU_NOCDIV_2 1 -#define CMU_NOCDIV_SHIFT 19 -#define CMU_NOCDIV_DIV (CMU_NOCDIV_2 << CMU_NOCDIV_SHIFT) -#define CMU_DMMCLK_SRC_APLL 2 -#define CMU_DMMCLK_SRC_SHIFT 10 -#define CMU_DMMCLK_SRC (CMU_DMMCLK_SRC_APLL << CMU_DMMCLK_SRC_SHIFT) -#define CMU_APBCLK_DIV BIT(8) -#define CMU_NOCCLK_SRC BIT(7) -#define CMU_AHBCLK_DIV BIT(4) -#define CMU_CORECLK_MASK 3 -#define CMU_CORECLK_CPLL BIT(1) -#define CMU_CORECLK_HOSC BIT(0) - -/* COREPLL register definitions */ -#define CMU_COREPLL_EN BIT(9) -#define CMU_COREPLL_HOSC_EN BIT(8) -#define CMU_COREPLL_OUT (1104 / 24) - -/* DEVPLL register definitions */ -#define CMU_DEVPLL_CLK BIT(12) -#define CMU_DEVPLL_EN BIT(8) -#define CMU_DEVPLL_OUT (660 / 6) - -/* UARTCLK register definitions */ -#define CMU_UARTCLK_SRC_DEVPLL BIT(16) - -/* DEVCLKEN1 register definitions */ -#define CMU_DEVCLKEN1_UART5 BIT(21) - -#define PLL_STABILITY_WAIT_US 50 - -#endif diff --git a/arch/arm/include/asm/arch-owl/regs_s700.h b/arch/arm/include/asm/arch-owl/regs_s700.h new file mode 100644 index 0000000..2f21c15 --- /dev/null +++ b/arch/arm/include/asm/arch-owl/regs_s700.h @@ -0,0 +1,56 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Actions Semi S700 Register Definitions + * + */ + +#ifndef _OWL_REGS_S700_H_ +#define _OWL_REGS_S700_H_ + +#define CMU_COREPLL 0x0000 +#define CMU_DEVPLL 0x0004 +#define CMU_DDRPLL 0x0008 +#define CMU_NANDPLL 0x000C +#define CMU_DISPLAYPLL 0x0010 +#define CMU_AUDIOPLL 0x0014 +#define CMU_TVOUTPLL 0x0018 +#define CMU_BUSCLK 0x001C +#define CMU_SENSORCLK 0x0020 +#define CMU_LCDCLK 0x0024 +#define CMU_DSIPLLCLK 0x0028 +#define CMU_CSICLK 0x002C +#define CMU_DECLK 0x0030 +#define CMU_SICLK 0x0034 +#define CMU_BUSCLK1 0x0038 +#define CMU_HDECLK 0x003C +#define CMU_VDECLK 0x0040 +#define CMU_VCECLK 0x0044 +#define CMU_NANDCCLK 0x004C +#define CMU_SD0CLK 0x0050 +#define CMU_SD1CLK 0x0054 +#define CMU_SD2CLK 0x0058 +#define CMU_UART0CLK 0x005C +#define CMU_UART1CLK 0x0060 +#define CMU_UART2CLK 0x0064 +#define CMU_UART3CLK 0x0068 +#define CMU_UART4CLK 0x006C +#define CMU_UART5CLK 0x0070 +#define CMU_UART6CLK 0x0074 +#define CMU_PWM0CLK 0x0078 +#define CMU_PWM1CLK 0x007C +#define CMU_PWM2CLK 0x0080 +#define CMU_PWM3CLK 0x0084 +#define CMU_PWM4CLK 0x0088 +#define CMU_PWM5CLK 0x008C +#define CMU_GPU3DCLK 0x0090 +#define CMU_CORECTL 0x009C +#define CMU_DEVCLKEN0 0x00A0 +#define CMU_DEVCLKEN1 0x00A4 +#define CMU_DEVRST0 0x00A8 +#define CMU_DEVRST1 0x00AC +#define CMU_USBPLL 0x00B0 +#define CMU_ETHERNETPLL 0x00B4 +#define CMU_CVBSPLL 0x00B8 +#define CMU_SSTSCLK 0x00C0 + +#endif diff --git a/configs/bubblegum_96_defconfig b/configs/bubblegum_96_defconfig index 8c94def..e76e9a2 100644 --- a/configs/bubblegum_96_defconfig +++ b/configs/bubblegum_96_defconfig @@ -17,6 +17,3 @@ CONFIG_CMD_CACHE=y CONFIG_CMD_TIMER=y CONFIG_DEFAULT_DEVICE_TREE="bubblegum_96" CONFIG_SYS_RELOC_GD_ENV_ADDR=y -CONFIG_CLK=y -CONFIG_CLK_OWL=y -CONFIG_CLK_S900=y diff --git a/drivers/clk/owl/Kconfig b/drivers/clk/owl/Kconfig index 661f198..c6afef9 100644 --- a/drivers/clk/owl/Kconfig +++ b/drivers/clk/owl/Kconfig @@ -3,10 +3,6 @@ config CLK_OWL depends on CLK && ARCH_OWL help Enable support for clock managemet unit present in Actions Semi - OWL SoCs. + Owl series S900/S700 SoCs. + -config CLK_S900 - bool "Actions Semi S900 clock driver" - depends on CLK_OWL && ARM64 - help - Enable support for the clocks in Actions Semi S900 SoC. diff --git a/drivers/clk/owl/Makefile b/drivers/clk/owl/Makefile index 63ab573..5218b6b 100644 --- a/drivers/clk/owl/Makefile +++ b/drivers/clk/owl/Makefile @@ -1,3 +1,3 @@ # SPDX-License-Identifier: GPL-2.0+ -obj-$(CONFIG_CLK_S900) += clk_s900.o +obj-$(CONFIG_CLK_OWL) += clk_owl.o diff --git a/drivers/clk/owl/clk_owl.c b/drivers/clk/owl/clk_owl.c new file mode 100644 index 0000000..9f114c7 --- /dev/null +++ b/drivers/clk/owl/clk_owl.c @@ -0,0 +1,153 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Common clock driver for Actions Semi SoCs. + * + * Copyright (C) 2015 Actions Semi Co., Ltd. + * Copyright (C) 2018 Manivannan Sadhasivam + */ + +#include +#include +#include "clk_owl.h" +#include +#if defined(CONFIG_MACH_S900) +#include +#include +#elif defined(CONFIG_MACH_S700) +#include +#include +#endif + +void owl_clk_init(struct owl_clk_priv *priv) +{ + u32 bus_clk = 0, core_pll, dev_pll; + +#if defined(CONFIG_MACH_S900) + /* Enable ASSIST_PLL */ + setbits_le32(priv->base + CMU_ASSISTPLL, BIT(0)); + udelay(PLL_STABILITY_WAIT_US); +#endif + + /* Source HOSC to DEV_CLK */ + clrbits_le32(priv->base + CMU_DEVPLL, CMU_DEVPLL_CLK); + + /* Configure BUS_CLK */ + bus_clk |= (CMU_PDBGDIV_DIV | CMU_PERDIV_DIV | CMU_NOCDIV_DIV | + CMU_DMMCLK_SRC | CMU_APBCLK_DIV | CMU_AHBCLK_DIV | + CMU_NOCCLK_SRC | CMU_CORECLK_HOSC); + writel(bus_clk, priv->base + CMU_BUSCLK); + + udelay(PLL_STABILITY_WAIT_US); + + /* Configure CORE_PLL */ + core_pll = readl(priv->base + CMU_COREPLL); + core_pll |= (CMU_COREPLL_EN | CMU_COREPLL_HOSC_EN | CMU_COREPLL_OUT); + writel(core_pll, priv->base + CMU_COREPLL); + + udelay(PLL_STABILITY_WAIT_US); + + /* Configure DEV_PLL */ + dev_pll = readl(priv->base + CMU_DEVPLL); + dev_pll |= (CMU_DEVPLL_EN | CMU_DEVPLL_OUT); + writel(dev_pll, priv->base + CMU_DEVPLL); + + udelay(PLL_STABILITY_WAIT_US); + + /* Source CORE_PLL for CORE_CLK */ + clrsetbits_le32(priv->base + CMU_BUSCLK, CMU_CORECLK_MASK, + CMU_CORECLK_CPLL); + + /* Source DEV_PLL for DEV_CLK */ + setbits_le32(priv->base + CMU_DEVPLL, CMU_DEVPLL_CLK); + + udelay(PLL_STABILITY_WAIT_US); +} + +int owl_clk_enable(struct clk *clk) +{ + struct owl_clk_priv *priv = dev_get_priv(clk->dev); + + switch (clk->id) { + case CLK_UART5: + if (priv->soc == S700) + return -EINVAL; + /* Source HOSC for UART5 interface */ + clrbits_le32(priv->base + CMU_UART5CLK, CMU_UARTCLK_SRC_DEVPLL); + /* Enable UART5 interface clock */ + setbits_le32(priv->base + CMU_DEVCLKEN1, CMU_DEVCLKEN1_UART5); + break; + case CLK_UART3: + if (priv->soc == S900) + return -EINVAL; + /* Source HOSC for UART3 interface */ + clrbits_le32(priv->base + CMU_UART3CLK, CMU_UARTCLK_SRC_DEVPLL); + /* Enable UART3 interface clock */ + setbits_le32(priv->base + CMU_DEVCLKEN1, CMU_DEVCLKEN1_UART3); + break; + default: + return -EINVAL; + } + + return 0; +} + +int owl_clk_disable(struct clk *clk) +{ + struct owl_clk_priv *priv = dev_get_priv(clk->dev); + + switch (clk->id) { + case CLK_UART5: + if (priv->soc == S700) + return -EINVAL; + /* Disable UART5 interface clock */ + clrbits_le32(priv->base + CMU_DEVCLKEN1, CMU_DEVCLKEN1_UART5); + break; + case CLK_UART3: + if (priv->soc == S900) + return -EINVAL; + /* Disable UART3 interface clock */ + clrbits_le32(priv->base + CMU_DEVCLKEN1, CMU_DEVCLKEN1_UART3); + break; + default: + return -EINVAL; + } + + return 0; +} + +static int owl_clk_probe(struct udevice *dev) +{ + struct owl_clk_priv *priv = dev_get_priv(dev); + + priv->base = dev_read_addr(dev); + if (priv->base == FDT_ADDR_T_NONE) + return -EINVAL; + + /* setup necessary clocks */ + owl_clk_init(priv); + + return 0; +} + +static const struct clk_ops owl_clk_ops = { + .enable = owl_clk_enable, + .disable = owl_clk_disable, +}; + +static const struct udevice_id owl_clk_ids[] = { +#if defined(CONFIG_MACH_S900) + { .compatible = "actions,s900-cmu", .data = S900 }, +#elif defined(CONFIG_MACH_S700) + { .compatible = "actions,s700-cmu", .data = S700 }, +#endif + { } +}; + +U_BOOT_DRIVER(clk_owl) = { + .name = "clk_owl", + .id = UCLASS_CLK, + .of_match = owl_clk_ids, + .ops = &owl_clk_ops, + .priv_auto_alloc_size = sizeof(struct owl_clk_priv), + .probe = owl_clk_probe, +}; diff --git a/drivers/clk/owl/clk_owl.h b/drivers/clk/owl/clk_owl.h new file mode 100644 index 0000000..8ebf012 --- /dev/null +++ b/drivers/clk/owl/clk_owl.h @@ -0,0 +1,65 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Actions Semi SoCs Clock Definitions + * + * Copyright (C) 2015 Actions Semi Co., Ltd. + * Copyright (C) 2018 Manivannan Sadhasivam + * + */ + +#ifndef _OWL_CLK_H_ +#define _OWL_CLK_H_ + +#include + +enum owl_soc { + S700, + S900, +}; + +struct owl_clk_priv { + phys_addr_t base; + enum owl_soc soc; +}; + +/* BUSCLK register definitions */ +#define CMU_PDBGDIV_8 7 +#define CMU_PDBGDIV_SHIFT 26 +#define CMU_PDBGDIV_DIV (CMU_PDBGDIV_8 << CMU_PDBGDIV_SHIFT) +#define CMU_PERDIV_8 7 +#define CMU_PERDIV_SHIFT 20 +#define CMU_PERDIV_DIV (CMU_PERDIV_8 << CMU_PERDIV_SHIFT) +#define CMU_NOCDIV_2 1 +#define CMU_NOCDIV_SHIFT 19 +#define CMU_NOCDIV_DIV (CMU_NOCDIV_2 << CMU_NOCDIV_SHIFT) +#define CMU_DMMCLK_SRC_APLL 2 +#define CMU_DMMCLK_SRC_SHIFT 10 +#define CMU_DMMCLK_SRC (CMU_DMMCLK_SRC_APLL << CMU_DMMCLK_SRC_SHIFT) +#define CMU_APBCLK_DIV BIT(8) +#define CMU_NOCCLK_SRC BIT(7) +#define CMU_AHBCLK_DIV BIT(4) +#define CMU_CORECLK_MASK 3 +#define CMU_CORECLK_CPLL BIT(1) +#define CMU_CORECLK_HOSC BIT(0) + +/* COREPLL register definitions */ +#define CMU_COREPLL_EN BIT(9) +#define CMU_COREPLL_HOSC_EN BIT(8) +#define CMU_COREPLL_OUT (1104 / 24) + +/* DEVPLL register definitions */ +#define CMU_DEVPLL_CLK BIT(12) +#define CMU_DEVPLL_EN BIT(8) +#define CMU_DEVPLL_OUT (660 / 6) + +/* UARTCLK register definitions */ +#define CMU_UARTCLK_SRC_DEVPLL BIT(16) + +#define PLL_STABILITY_WAIT_US 50 + +#define CMU_DEVCLKEN1_UART5 BIT(21) +#define CMU_DEVCLKEN1_UART3 BIT(11) + +#define CMU_DEVCLKEN1_ETH_S700 BIT(23) + +#endif diff --git a/drivers/clk/owl/clk_s900.c b/drivers/clk/owl/clk_s900.c deleted file mode 100644 index d60f199..0000000 --- a/drivers/clk/owl/clk_s900.c +++ /dev/null @@ -1,137 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Actions Semi S900 clock driver - * - * Copyright (C) 2015 Actions Semi Co., Ltd. - * Copyright (C) 2018 Manivannan Sadhasivam - */ - -#include -#include -#include -#include -#include - -#include - -void owl_clk_init(struct owl_clk_priv *priv) -{ - u32 bus_clk = 0, core_pll, dev_pll; - - /* Enable ASSIST_PLL */ - setbits_le32(priv->base + CMU_ASSISTPLL, BIT(0)); - - udelay(PLL_STABILITY_WAIT_US); - - /* Source HOSC to DEV_CLK */ - clrbits_le32(priv->base + CMU_DEVPLL, CMU_DEVPLL_CLK); - - /* Configure BUS_CLK */ - bus_clk |= (CMU_PDBGDIV_DIV | CMU_PERDIV_DIV | CMU_NOCDIV_DIV | - CMU_DMMCLK_SRC | CMU_APBCLK_DIV | CMU_AHBCLK_DIV | - CMU_NOCCLK_SRC | CMU_CORECLK_HOSC); - writel(bus_clk, priv->base + CMU_BUSCLK); - - udelay(PLL_STABILITY_WAIT_US); - - /* Configure CORE_PLL */ - core_pll = readl(priv->base + CMU_COREPLL); - core_pll |= (CMU_COREPLL_EN | CMU_COREPLL_HOSC_EN | CMU_COREPLL_OUT); - writel(core_pll, priv->base + CMU_COREPLL); - - udelay(PLL_STABILITY_WAIT_US); - - /* Configure DEV_PLL */ - dev_pll = readl(priv->base + CMU_DEVPLL); - dev_pll |= (CMU_DEVPLL_EN | CMU_DEVPLL_OUT); - writel(dev_pll, priv->base + CMU_DEVPLL); - - udelay(PLL_STABILITY_WAIT_US); - - /* Source CORE_PLL for CORE_CLK */ - clrsetbits_le32(priv->base + CMU_BUSCLK, CMU_CORECLK_MASK, - CMU_CORECLK_CPLL); - - /* Source DEV_PLL for DEV_CLK */ - setbits_le32(priv->base + CMU_DEVPLL, CMU_DEVPLL_CLK); - - udelay(PLL_STABILITY_WAIT_US); -} - -void owl_uart_clk_enable(struct owl_clk_priv *priv) -{ - /* Source HOSC for UART5 interface */ - clrbits_le32(priv->base + CMU_UART5CLK, CMU_UARTCLK_SRC_DEVPLL); - - /* Enable UART5 interface clock */ - setbits_le32(priv->base + CMU_DEVCLKEN1, CMU_DEVCLKEN1_UART5); -} - -void owl_uart_clk_disable(struct owl_clk_priv *priv) -{ - /* Disable UART5 interface clock */ - clrbits_le32(priv->base + CMU_DEVCLKEN1, CMU_DEVCLKEN1_UART5); -} - -int owl_clk_enable(struct clk *clk) -{ - struct owl_clk_priv *priv = dev_get_priv(clk->dev); - - switch (clk->id) { - case CLK_UART5: - owl_uart_clk_enable(priv); - break; - default: - return 0; - } - - return 0; -} - -int owl_clk_disable(struct clk *clk) -{ - struct owl_clk_priv *priv = dev_get_priv(clk->dev); - - switch (clk->id) { - case CLK_UART5: - owl_uart_clk_disable(priv); - break; - default: - return 0; - } - - return 0; -} - -static int owl_clk_probe(struct udevice *dev) -{ - struct owl_clk_priv *priv = dev_get_priv(dev); - - priv->base = dev_read_addr(dev); - if (priv->base == FDT_ADDR_T_NONE) - return -EINVAL; - - /* setup necessary clocks */ - owl_clk_init(priv); - - return 0; -} - -static struct clk_ops owl_clk_ops = { - .enable = owl_clk_enable, - .disable = owl_clk_disable, -}; - -static const struct udevice_id owl_clk_ids[] = { - { .compatible = "actions,s900-cmu" }, - { } -}; - -U_BOOT_DRIVER(clk_owl) = { - .name = "clk_s900", - .id = UCLASS_CLK, - .of_match = owl_clk_ids, - .ops = &owl_clk_ops, - .priv_auto_alloc_size = sizeof(struct owl_clk_priv), - .probe = owl_clk_probe, -}; From patchwork Fri Mar 20 17:35:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Amit Tomer X-Patchwork-Id: 1259125 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=nuHuuDLK; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48kWDh5YWNz9sPR for ; Sat, 21 Mar 2020 04:37:08 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 76B7081717; Fri, 20 Mar 2020 18:36:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="nuHuuDLK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 21E2A81829; Fri, 20 Mar 2020 18:36:09 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8F27781737 for ; Fri, 20 Mar 2020 18:35:57 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=amittomer25@gmail.com Received: by mail-pj1-x1042.google.com with SMTP id m15so2798447pje.3 for ; Fri, 20 Mar 2020 10:35:57 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=l7RLzbbvu9GmAJ+0lm7wqVHNszvudw8Fd9NMbVz+bR8=; b=nuHuuDLKig0cxB0fumq2CwjVl/9An5P6cbxLbyNU61Bhhg+KH4s1ixujoFTu+rzQbk d6DU7lNBOxAtmWaBz0sGwH9z16CEw1GGVeONYQ0arsb+yL7H5KIN3lT9IVtUmF446VGY bgqNPqWPiyKhnyAao1cN3qk3oEehZURxVKxl6VCRr/Y3SlAEF8bPoPoCsIYVs8CKDAnZ mZ6xM7Al0jzbmxWtX1oKGf9AdApKxCKXVw+7PWeWuMa8ps6kzwR8vcMd0tqqP3mIy3lK cXsUiyMKmrWvB41bSH6AE9QMBBYAPna1Hx9lVUqbVNIeTuClJ4VM7MJPRauF6t7Tw2BX MoGw== 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:mime-version:content-transfer-encoding; bh=l7RLzbbvu9GmAJ+0lm7wqVHNszvudw8Fd9NMbVz+bR8=; b=psl5p4Pzyfuo17EwJbfVja7egIHXMJqMTKoh8G2b+GhpAOZjEcxhFRqBnRQ4eyIhlq LrxzotZIf1sjTQNt9zgb+MzNGf/EV+RiA/i8xTB8to1Q+B48DQZ9ldByOA1InuH9XHZ3 rmaQMYKS+B2LBG6T/dMprmWv3CKb3PeGr+v7NH/rcViWPrSGL5cadtyanB9QNiOq8Uj3 9oIOfdGNnD0OE1xAqEwjFSskuGj4RXarjh4U0HLioe7EjmnlObT3n6l/qrARgiQvfwTU 9oGgxsthc0bM5+xe+fBDpJf3J2lTNdG5OBxBL3epNd+ifwlijhfJFD4LmBwyWEMcS5FX NfrQ== X-Gm-Message-State: ANhLgQ2+RI4swCG1B86y5URFh7HCAvqLlb5b24EJgV7r5ALmhBomoDPh jXeBPFqQrOgzIwLsQfq3n+MeKXKO X-Google-Smtp-Source: ADFU+vudcQIGTxe93nxd9Y8chHZ9hfhmV7r4+W6IWTsP4fSzLRfvvzjXY33YDE7s5gNCZdvD1tOWfw== X-Received: by 2002:a17:902:6bc8:: with SMTP id m8mr3454379plt.223.1584725755000; Fri, 20 Mar 2020 10:35:55 -0700 (PDT) Received: from localhost.localdomain ([106.215.6.94]) by smtp.gmail.com with ESMTPSA id i187sm6037302pfg.33.2020.03.20.10.35.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Mar 2020 10:35:54 -0700 (PDT) From: Amit Singh Tomar To: u-boot@lists.denx.de Cc: andre.przywara@arm.com, manivannan.sadhasivam@linaro.org, trini@konsulko.com, Amit Singh Tomar Subject: [PATCH v7 07/12] arm: actions: add S700 SoC device tree Date: Fri, 20 Mar 2020 23:05:09 +0530 Message-Id: <1584725714-2770-8-git-send-email-amittomer25@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1584725714-2770-1-git-send-email-amittomer25@gmail.com> References: <1584725714-2770-1-git-send-email-amittomer25@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean This patch adds .dtsi file(sync with Linux 5.5-rc6 with hash "b3a987b0264d") and required binding for S700 SoC that is a 64-bit Quad-core ARM Cortex-A53 cores. It also provisions dts file to be built based on selected platform(CONFIG_MACH_S900/S700). Reviewed-by: Andre Przywara Signed-off-by: Amit Singh Tomar --- Changes since v6: * No changes. Changes since v5: * Added reviwed-by tag. Changes since v4: * Move it to 07/11 from 05/11. Changes since v3: * Updated commit message to the Linux tag to which the dtsi file is synced. Changes since v2: * Synced DTS bindings with Linux 5.5. Changes since v1: * Moved the u-boot specific changes to s700-u-boot.dtsi, now s700.dtsi is in complete sync with Linux 4.20. --- arch/arm/dts/Makefile | 6 +- arch/arm/dts/s700.dtsi | 248 +++++++++++++++++++++++++ include/dt-bindings/clock/actions,s700-cmu.h | 118 ++++++++++++ include/dt-bindings/reset/actions,s700-reset.h | 34 ++++ 4 files changed, 404 insertions(+), 2 deletions(-) create mode 100644 arch/arm/dts/s700.dtsi create mode 100644 include/dt-bindings/clock/actions,s700-cmu.h create mode 100644 include/dt-bindings/reset/actions,s700-reset.h diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 9c593b2..308c76b 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -64,8 +64,10 @@ dtb-$(CONFIG_KIRKWOOD) += \ kirkwood-pogo_e02.dtb \ kirkwood-sheevaplug.dtb -dtb-$(CONFIG_ARCH_OWL) += \ - bubblegum_96.dtb +dtb-$(CONFIG_MACH_S900) += \ + bubblegum_96.dtb +dtb-$(CONFIG_MACH_S700) += \ + s700-cubieboard7.dtb dtb-$(CONFIG_ROCKCHIP_PX30) += \ px30-evb.dtb \ diff --git a/arch/arm/dts/s700.dtsi b/arch/arm/dts/s700.dtsi new file mode 100644 index 0000000..2006ad5 --- /dev/null +++ b/arch/arm/dts/s700.dtsi @@ -0,0 +1,248 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2017 Andreas Färber + */ + +#include +#include +#include + +/ { + compatible = "actions,s700"; + interrupt-parent = <&gic>; + #address-cells = <2>; + #size-cells = <2>; + + cpus { + #address-cells = <2>; + #size-cells = <0>; + + cpu0: cpu@0 { + device_type = "cpu"; + compatible = "arm,cortex-a53"; + reg = <0x0 0x0>; + enable-method = "psci"; + }; + + cpu1: cpu@1 { + device_type = "cpu"; + compatible = "arm,cortex-a53"; + reg = <0x0 0x1>; + enable-method = "psci"; + }; + + cpu2: cpu@2 { + device_type = "cpu"; + compatible = "arm,cortex-a53"; + reg = <0x0 0x2>; + enable-method = "psci"; + }; + + cpu3: cpu@3 { + device_type = "cpu"; + compatible = "arm,cortex-a53"; + reg = <0x0 0x3>; + enable-method = "psci"; + }; + }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + secmon@1f000000 { + reg = <0x0 0x1f000000 0x0 0x1000000>; + no-map; + }; + }; + + psci { + compatible = "arm,psci-0.2"; + method = "smc"; + }; + + arm-pmu { + compatible = "arm,cortex-a53-pmu"; + interrupts = , + , + , + ; + interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupts = , + , + , + ; + }; + + hosc: hosc { + compatible = "fixed-clock"; + clock-frequency = <24000000>; + #clock-cells = <0>; + }; + + losc: losc { + compatible = "fixed-clock"; + clock-frequency = <32768>; + #clock-cells = <0>; + }; + + soc { + compatible = "simple-bus"; + #address-cells = <2>; + #size-cells = <2>; + ranges; + + gic: interrupt-controller@e00f1000 { + compatible = "arm,gic-400"; + reg = <0x0 0xe00f1000 0x0 0x1000>, + <0x0 0xe00f2000 0x0 0x2000>, + <0x0 0xe00f4000 0x0 0x2000>, + <0x0 0xe00f6000 0x0 0x2000>; + interrupts = ; + interrupt-controller; + #interrupt-cells = <3>; + }; + + uart0: serial@e0120000 { + compatible = "actions,s900-uart", "actions,owl-uart"; + reg = <0x0 0xe0120000 0x0 0x2000>; + clocks = <&cmu CLK_UART0>; + interrupts = ; + status = "disabled"; + }; + + uart1: serial@e0122000 { + compatible = "actions,s900-uart", "actions,owl-uart"; + reg = <0x0 0xe0122000 0x0 0x2000>; + clocks = <&cmu CLK_UART1>; + interrupts = ; + status = "disabled"; + }; + + uart2: serial@e0124000 { + compatible = "actions,s900-uart", "actions,owl-uart"; + reg = <0x0 0xe0124000 0x0 0x2000>; + clocks = <&cmu CLK_UART2>; + interrupts = ; + status = "disabled"; + }; + + uart3: serial@e0126000 { + compatible = "actions,s900-uart", "actions,owl-uart"; + reg = <0x0 0xe0126000 0x0 0x2000>; + clocks = <&cmu CLK_UART3>; + interrupts = ; + status = "disabled"; + }; + + uart4: serial@e0128000 { + compatible = "actions,s900-uart", "actions,owl-uart"; + reg = <0x0 0xe0128000 0x0 0x2000>; + clocks = <&cmu CLK_UART4>; + interrupts = ; + status = "disabled"; + }; + + uart5: serial@e012a000 { + compatible = "actions,s900-uart", "actions,owl-uart"; + reg = <0x0 0xe012a000 0x0 0x2000>; + clocks = <&cmu CLK_UART5>; + interrupts = ; + status = "disabled"; + }; + + uart6: serial@e012c000 { + compatible = "actions,s900-uart", "actions,owl-uart"; + reg = <0x0 0xe012c000 0x0 0x2000>; + clocks = <&cmu CLK_UART6>; + interrupts = ; + status = "disabled"; + }; + + cmu: clock-controller@e0168000 { + compatible = "actions,s700-cmu"; + reg = <0x0 0xe0168000 0x0 0x1000>; + clocks = <&hosc>, <&losc>; + #clock-cells = <1>; + #reset-cells = <1>; + }; + + i2c0: i2c@e0170000 { + compatible = "actions,s700-i2c"; + reg = <0 0xe0170000 0 0x1000>; + clocks = <&cmu CLK_I2C0>; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c1: i2c@e0174000 { + compatible = "actions,s700-i2c"; + reg = <0 0xe0174000 0 0x1000>; + clocks = <&cmu CLK_I2C1>; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c2: i2c@e0178000 { + compatible = "actions,s700-i2c"; + reg = <0 0xe0178000 0 0x1000>; + clocks = <&cmu CLK_I2C2>; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c3: i2c@e017c000 { + compatible = "actions,s700-i2c"; + reg = <0 0xe017c000 0 0x1000>; + clocks = <&cmu CLK_I2C3>; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + sps: power-controller@e01b0100 { + compatible = "actions,s700-sps"; + reg = <0x0 0xe01b0100 0x0 0x100>; + #power-domain-cells = <1>; + }; + + timer: timer@e024c000 { + compatible = "actions,s700-timer"; + reg = <0x0 0xe024c000 0x0 0x4000>; + interrupts = ; + interrupt-names = "timer1"; + }; + + pinctrl: pinctrl@e01b0000 { + compatible = "actions,s700-pinctrl"; + reg = <0x0 0xe01b0000 0x0 0x1000>; + clocks = <&cmu CLK_GPIO>; + gpio-controller; + gpio-ranges = <&pinctrl 0 0 136>; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupts = , + , + , + , + ; + }; + }; +}; diff --git a/include/dt-bindings/clock/actions,s700-cmu.h b/include/dt-bindings/clock/actions,s700-cmu.h new file mode 100644 index 0000000..3e19429 --- /dev/null +++ b/include/dt-bindings/clock/actions,s700-cmu.h @@ -0,0 +1,118 @@ +/* SPDX-License-Identifier: GPL-2.0 + * + * Device Tree binding constants for Actions Semi S700 Clock Management Unit + * + * Copyright (c) 2014 Actions Semi Inc. + * Author: David Liu + * + * Author: Pathiban Nallathambi + * Author: Saravanan Sekar + */ + +#ifndef __DT_BINDINGS_CLOCK_S700_H +#define __DT_BINDINGS_CLOCK_S700_H + +#define CLK_NONE 0 + +/* pll clocks */ +#define CLK_CORE_PLL 1 +#define CLK_DEV_PLL 2 +#define CLK_DDR_PLL 3 +#define CLK_NAND_PLL 4 +#define CLK_DISPLAY_PLL 5 +#define CLK_TVOUT_PLL 6 +#define CLK_CVBS_PLL 7 +#define CLK_AUDIO_PLL 8 +#define CLK_ETHERNET_PLL 9 + +/* system clock */ +#define CLK_CPU 10 +#define CLK_DEV 11 +#define CLK_AHB 12 +#define CLK_APB 13 +#define CLK_DMAC 14 +#define CLK_NOC0_CLK_MUX 15 +#define CLK_NOC1_CLK_MUX 16 +#define CLK_HP_CLK_MUX 17 +#define CLK_HP_CLK_DIV 18 +#define CLK_NOC1_CLK_DIV 19 +#define CLK_NOC0 20 +#define CLK_NOC1 21 +#define CLK_SENOR_SRC 22 + +/* peripheral device clock */ +#define CLK_GPIO 23 +#define CLK_TIMER 24 +#define CLK_DSI 25 +#define CLK_CSI 26 +#define CLK_SI 27 +#define CLK_DE 28 +#define CLK_HDE 29 +#define CLK_VDE 30 +#define CLK_VCE 31 +#define CLK_NAND 32 +#define CLK_SD0 33 +#define CLK_SD1 34 +#define CLK_SD2 35 + +#define CLK_UART0 36 +#define CLK_UART1 37 +#define CLK_UART2 38 +#define CLK_UART3 39 +#define CLK_UART4 40 +#define CLK_UART5 41 +#define CLK_UART6 42 + +#define CLK_PWM0 43 +#define CLK_PWM1 44 +#define CLK_PWM2 45 +#define CLK_PWM3 46 +#define CLK_PWM4 47 +#define CLK_PWM5 48 +#define CLK_GPU3D 49 + +#define CLK_I2C0 50 +#define CLK_I2C1 51 +#define CLK_I2C2 52 +#define CLK_I2C3 53 + +#define CLK_SPI0 54 +#define CLK_SPI1 55 +#define CLK_SPI2 56 +#define CLK_SPI3 57 + +#define CLK_USB3_480MPLL0 58 +#define CLK_USB3_480MPHY0 59 +#define CLK_USB3_5GPHY 60 +#define CLK_USB3_CCE 61 +#define CLK_USB3_MAC 62 + +#define CLK_LCD 63 +#define CLK_HDMI_AUDIO 64 +#define CLK_I2SRX 65 +#define CLK_I2STX 66 + +#define CLK_SENSOR0 67 +#define CLK_SENSOR1 68 + +#define CLK_HDMI_DEV 69 + +#define CLK_ETHERNET 70 +#define CLK_RMII_REF 71 + +#define CLK_USB2H0_PLLEN 72 +#define CLK_USB2H0_PHY 73 +#define CLK_USB2H0_CCE 74 +#define CLK_USB2H1_PLLEN 75 +#define CLK_USB2H1_PHY 76 +#define CLK_USB2H1_CCE 77 + +#define CLK_TVOUT 78 + +#define CLK_THERMAL_SENSOR 79 + +#define CLK_IRC_SWITCH 80 +#define CLK_PCM1 81 +#define CLK_NR_CLKS (CLK_PCM1 + 1) + +#endif /* __DT_BINDINGS_CLOCK_S700_H */ diff --git a/include/dt-bindings/reset/actions,s700-reset.h b/include/dt-bindings/reset/actions,s700-reset.h new file mode 100644 index 0000000..5e3b16b --- /dev/null +++ b/include/dt-bindings/reset/actions,s700-reset.h @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT) +// +// Device Tree binding constants for Actions Semi S700 Reset Management Unit +// +// Copyright (c) 2018 Linaro Ltd. + +#ifndef __DT_BINDINGS_ACTIONS_S700_RESET_H +#define __DT_BINDINGS_ACTIONS_S700_RESET_H + +#define RESET_AUDIO 0 +#define RESET_CSI 1 +#define RESET_DE 2 +#define RESET_DSI 3 +#define RESET_GPIO 4 +#define RESET_I2C0 5 +#define RESET_I2C1 6 +#define RESET_I2C2 7 +#define RESET_I2C3 8 +#define RESET_KEY 9 +#define RESET_LCD0 10 +#define RESET_SI 11 +#define RESET_SPI0 12 +#define RESET_SPI1 13 +#define RESET_SPI2 14 +#define RESET_SPI3 15 +#define RESET_UART0 16 +#define RESET_UART1 17 +#define RESET_UART2 18 +#define RESET_UART3 19 +#define RESET_UART4 20 +#define RESET_UART5 21 +#define RESET_UART6 22 + +#endif /* __DT_BINDINGS_ACTIONS_S700_RESET_H */ From patchwork Fri Mar 20 17:35:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Tomer X-Patchwork-Id: 1259127 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=drOZvSO0; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48kWF46ztnz9sPR for ; Sat, 21 Mar 2020 04:37:28 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 81E5681843; Fri, 20 Mar 2020 18:36:33 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="drOZvSO0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EC7638183A; Fri, 20 Mar 2020 18:36:12 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CF90F81813 for ; Fri, 20 Mar 2020 18:35:59 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=amittomer25@gmail.com Received: by mail-pf1-x443.google.com with SMTP id f206so3635731pfa.10 for ; Fri, 20 Mar 2020 10:35:59 -0700 (PDT) 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=85Gg9/A9P/15acldT3qZd7Zr47Bbk/dL51yWNRZdF50=; b=drOZvSO0UJ7AwycrRYdf6NO3UMeuFW6c2LNrrvPEXJKWt+Uv8U1vd/jDsT6IttRoqk yMd5+J0OJjEgRED6Sf13W5s/032fdqw9I+rJvsgkxQ8wRupJfTnhqDsx6pPXfdARvYfJ JNSns5HUGx6j4GwI5BM6zWB1dDoV4PmQwVYsfSLHJv6X0IiVq/1txdxV+N0s14mvYMCr sK2DmzoXAVcStx+xAFJrkCL4Vz4dY2R0bjz6AJi2TUiA6t4YlXuuaQkfLdSNqfaNzpe6 UCpuMoEOhs6NhfDjykJ/8PvCHmiwjtDVUBM2ly8wnPA2jL2Z43jXPbX7MeM6p/nh+40j 7xRA== 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=85Gg9/A9P/15acldT3qZd7Zr47Bbk/dL51yWNRZdF50=; b=kLPhLPCg74O1ONrc2P4HkuFXzy1aFCW9mL9iDf4Hk1j0j12tzuwR9USpYcNqHJ2R0w hs8c91nLZfqO+keoarb7sdaUBia56mmkps5w+gm5QeR9jT1fSAh9lFufbP71Cm0/PJ1z h2616TqnuZXNX8qPN9tQR+JtGOCtffPUk4UaVF34pD5VaR0GVA1wyMeNS5mg8zLRdOtf t58Om7L4vXYOYsdCSw75XWwC5S1dZIijkRSOKCbXBVd8rcmTxe2m3qy/jo3hTujdbQ0g tOsM64ZRTCNDgJrOC9USZyd3S1OoUcnakBS0sXd5owv4fmedLgChdmFUHnhkYJ+pIyzO DwSQ== X-Gm-Message-State: ANhLgQ2pBuOls9k8v7oc8B98BWwPlWrl0RSvQuEgo2NmR/VCwzFX2v8G yZqqN0YTm6q2CtkqjxFkI3M/ZoK/ X-Google-Smtp-Source: ADFU+vsa/Pl1aqyPLBm7LnP0WVJmJjMV62u1+xwZHiHWBbL6qdqA9Ptgfusl9EpA9dkxsZ64BF7Faw== X-Received: by 2002:a65:60d7:: with SMTP id r23mr5583466pgv.321.1584725757883; Fri, 20 Mar 2020 10:35:57 -0700 (PDT) Received: from localhost.localdomain ([106.215.6.94]) by smtp.gmail.com with ESMTPSA id i187sm6037302pfg.33.2020.03.20.10.35.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Mar 2020 10:35:57 -0700 (PDT) From: Amit Singh Tomar To: u-boot@lists.denx.de Cc: andre.przywara@arm.com, manivannan.sadhasivam@linaro.org, trini@konsulko.com, Amit Singh Tomar Subject: [PATCH v7 08/12] arm: dts: actions: s700: add u-boot specific dtsi file Date: Fri, 20 Mar 2020 23:05:10 +0530 Message-Id: <1584725714-2770-9-git-send-email-amittomer25@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1584725714-2770-1-git-send-email-amittomer25@gmail.com> References: <1584725714-2770-1-git-send-email-amittomer25@gmail.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Devices like uart and clk are needed to be enabled before relocation. this patch adds u-boot.dtsi file that mark these device as dm-pre-reloc. Reviewed-by: Andre Przywara Signed-off-by: Amit Singh Tomar --- Changes since v6: * No changes. Changes since v5: * Added reviwed-by tag. Changes since v4: * Moved it to 08/11 to 06/11. Changes since v3: * Replaced dtsi with dts in subject line along with arm:dts: to the prefix. Changes since v2: * Added License. Changes since v1: * This is newly added file that was *not* present in v1 and contains u-boot specific changes. --- arch/arm/dts/s700-u-boot.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 arch/arm/dts/s700-u-boot.dtsi diff --git a/arch/arm/dts/s700-u-boot.dtsi b/arch/arm/dts/s700-u-boot.dtsi new file mode 100644 index 0000000..a527ccc --- /dev/null +++ b/arch/arm/dts/s700-u-boot.dtsi @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2020 Amit Singh Tomar + */ + +/{ + soc { + u-boot,dm-pre-reloc; + }; +}; + +&uart3 { + u-boot,dm-pre-reloc; +}; + +&cmu { + u-boot,dm-pre-reloc; +}; From patchwork Fri Mar 20 17:35:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Tomer X-Patchwork-Id: 1259128 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=I5Jyae2G; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48kWFH05VPz9sPR for ; Sat, 21 Mar 2020 04:37:38 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7838781795; Fri, 20 Mar 2020 18:36:37 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="I5Jyae2G"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5D61881836; Fri, 20 Mar 2020 18:36:14 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1C6D9817D0 for ; Fri, 20 Mar 2020 18:36:03 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=amittomer25@gmail.com Received: by mail-pf1-x444.google.com with SMTP id i13so3651576pfe.3 for ; Fri, 20 Mar 2020 10:36:03 -0700 (PDT) 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=F+98kEhvoDB16lsgVZQ8IKUMJ68ZZ0/c6Pooy8XGL9o=; b=I5Jyae2G4MNCSrawG4zT3UOInWDZzdPItije8Y8EfmN5duYfkBDj21Pmcw6XZmv07R RcUrRdZbPLRQlMIiTee6cpqUzpW4n7Ix7/qQftrJpokdSHxCeFOmM73P1y/40r4pgvAY SabRcgTnwU6cMH9qfZNgu5dKNI7c7nNXskfA//NB1ZZwKL2o3xO5gVsglf0WmlWugqbc TSySSlPgJfPgvKwz0BQEvw54IldWrT29YAAYrqOCiqCAc8JjG1D93k03oiUWjd2xZCfV c7SSvjz2qxtcMoFPkI0gjxKsALETUGMH050T20QxQ3tZT4ZjNz3La1gTHnuR28iVpex7 waFA== 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=F+98kEhvoDB16lsgVZQ8IKUMJ68ZZ0/c6Pooy8XGL9o=; b=TFVnpAg30gNd1UXWHamS7e58kpwgBG5SvLXFTN3HukurAMtNXpirgJj+dFvHKDx8HM EmPXlHCqC5Oxgonx6rhe1OY4dHRmrHHdiAuo5R2PZJrMeDBireu2jTFPNXv2MSaZsjPm OLe4MBjeiNiD+7NjKv6ADZUnNuLMy+gfIgv1HUvL0t2fIVZiqufeeoLA6+pDu6HwkoBh EpfegKXwzvD/EJb2EMfpkZTsLGzRsDUcHbglBqHbmy/a7chwLmR0WW9kugKW6JjsW1EO 8OKjlL8f+CWEJzt9SoyQ4VngGXBWhRGx+/2FFII8j4gMbZqdXhlAIhXpH2jNODCQiwC6 R+jw== X-Gm-Message-State: ANhLgQ0Pnb10zs4acaFf0A4qLaVRKPCn4xmEX+ySK3iH0c92tI8W4OJ6 Sjv7toE6bS0CcK1DDkBVYVMCk7Hf X-Google-Smtp-Source: ADFU+vtBDxP8F6FBEUFUFdT6Zjggt3i390hLeoPYKgivrdZLXDbZZ1PN8hockcO2Q/JuFhPZfftfZg== X-Received: by 2002:a63:7159:: with SMTP id b25mr763374pgn.72.1584725760957; Fri, 20 Mar 2020 10:36:00 -0700 (PDT) Received: from localhost.localdomain ([106.215.6.94]) by smtp.gmail.com with ESMTPSA id i187sm6037302pfg.33.2020.03.20.10.35.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Mar 2020 10:36:00 -0700 (PDT) From: Amit Singh Tomar To: u-boot@lists.denx.de Cc: andre.przywara@arm.com, manivannan.sadhasivam@linaro.org, trini@konsulko.com, Amit Singh Tomar Subject: [PATCH v7 09/12] arm: add support Actions Semi S700 Date: Fri, 20 Mar 2020 23:05:11 +0530 Message-Id: <1584725714-2770-10-git-send-email-amittomer25@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1584725714-2770-1-git-send-email-amittomer25@gmail.com> References: <1584725714-2770-1-git-send-email-amittomer25@gmail.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean This patch adds basic support for Actions Semi based S700 SoC, which is driven by common owl framework. Reviewed-by: Andre Przywara Signed-off-by: Amit Singh Tomar --- Changes since v6: * No changes. Changes since v5: * Added reviewed-by tag. Changes since v4: * Moved it to 09/11 to 04/11. Changes since v3: * Added "SoC" keyword to Actions Semi S700. Changes since v2: * Fixed the commit message. * Checked for the clk->id. * Added a .data member with SoC type. * Removed #ifdefs from few places. Changes since v1: * Moved CLK and CLK_OWL symbols from defconfig to arch/arm/Kconfig. --- arch/arm/mach-owl/Kconfig | 6 ++++++ include/configs/s700.h | 13 +++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 include/configs/s700.h diff --git a/arch/arm/mach-owl/Kconfig b/arch/arm/mach-owl/Kconfig index d0be2b5..1d59d8f 100644 --- a/arch/arm/mach-owl/Kconfig +++ b/arch/arm/mach-owl/Kconfig @@ -8,6 +8,10 @@ config MACH_S900 bool "Actions Semi S900 SoC" select ARM64 +config MACH_S700 + bool "Actions Semi S700 SoC" + select ARM64 + endchoice config SYS_TEXT_BASE @@ -15,8 +19,10 @@ config SYS_TEXT_BASE config SYS_CONFIG_NAME default "s900" if MACH_S900 + default "s700" if MACH_S700 config SYS_SOC default "s900" if MACH_S900 + default "s700" if MACH_S700 endif diff --git a/include/configs/s700.h b/include/configs/s700.h new file mode 100644 index 0000000..fab0d04 --- /dev/null +++ b/include/configs/s700.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + */ + +#ifndef _CONFIG_S700_H_ +#define _CONFIG_S700_H_ + +/* + * Include common owl configuration where most the settings are + */ +#include + +#endif From patchwork Fri Mar 20 17:35:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Tomer X-Patchwork-Id: 1259126 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=fGlKp5Ll; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48kWDv17D6z9sPR for ; Sat, 21 Mar 2020 04:37:19 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5F40F81813; Fri, 20 Mar 2020 18:36:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="fGlKp5Ll"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C2C1481829; Fri, 20 Mar 2020 18:36:15 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E55578178D for ; Fri, 20 Mar 2020 18:36:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=amittomer25@gmail.com Received: by mail-pl1-x644.google.com with SMTP id a23so2821354plm.1 for ; Fri, 20 Mar 2020 10:36:05 -0700 (PDT) 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=UNNeu9i2i7pt9D/897gdbOYejyGDxZIwggNRmq4mhEo=; b=fGlKp5Llh1iyb8vnS9iT3y9yfmC2gLS8aQatlMM+G8qTaLdV/JbZjtSx/kIV5COZDY pG3+5e4Mza/s9c74l4wabwizWmH89ZZUaxwzqMZ4PoEwjlCTh9oh/+wt6lCX6DzR7JjP SYY8otx2BbDKAT34LNob6jJjxj3KJHgssybdK1v1x2AA4MHNyThN/MY8xsWlnCcl5eQ6 FQYsjmejegfYVG5oob2UcapSPOsmAH36O2X6mbwwcIwmUrhYRlLS8ifBv2gmMzmBAnE9 SmgeFNSRhul4EvLWMcihi4VtnTqDYqre1d+Wm3A2IUsRF+/q7NFTo2B69u+zbH93JIso /Jdg== 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=UNNeu9i2i7pt9D/897gdbOYejyGDxZIwggNRmq4mhEo=; b=tPIcG9z3H0tmH/U1u1U/Uoy3ilYNeVDFBU8TeNTYf9iYPeuNMvXhhplAQ+Ff896QHH VCylzpxp4grwecv+GXtRkBGsqygi8xCwWtY5OqPwvZETTB60Gy+h9xYAKFGJbuUiP6aQ vHUiO9W5qGnHqEl+ne3zBhxp2gHt8qhTC8gV6OkMleSXnbsl/SruQ3SFAyoWxXdRStdp HQ9clifqgla1ruoDc4rNcEh7nTpIgd1j48UqGSkrnRm3VbeT63XtSb+py2M3vDVTEm9A rPL1J08WmgriZjBGGM4zsvoiKcVRgpcrmcbtxg28XuJOI1IyGggrj2rAQFkyjXjMtf6V T8Rw== X-Gm-Message-State: ANhLgQ1yjz4AnXZdC5zv/i8vwe8qQmQLO/fB8uDFinJM0nKiIjwq6+Ii 7ktRlbsnYuNpAUqqPnlvyfl8Mhk9 X-Google-Smtp-Source: ADFU+vuyugkUXB4OZyfT/jKWFqYabtPDHRjOJvRhWoyoJrVEHFQaJqIzTY0Z1LVyIi28L4x1B8Fl1A== X-Received: by 2002:a17:90a:d081:: with SMTP id k1mr11270794pju.57.1584725763942; Fri, 20 Mar 2020 10:36:03 -0700 (PDT) Received: from localhost.localdomain ([106.215.6.94]) by smtp.gmail.com with ESMTPSA id i187sm6037302pfg.33.2020.03.20.10.36.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Mar 2020 10:36:03 -0700 (PDT) From: Amit Singh Tomar To: u-boot@lists.denx.de Cc: andre.przywara@arm.com, manivannan.sadhasivam@linaro.org, trini@konsulko.com, Amit Singh Tomar Subject: [PATCH v7 10/12] actions: Move defconfig options to Kconfig Date: Fri, 20 Mar 2020 23:05:12 +0530 Message-Id: <1584725714-2770-11-git-send-email-amittomer25@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1584725714-2770-1-git-send-email-amittomer25@gmail.com> References: <1584725714-2770-1-git-send-email-amittomer25@gmail.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean This patch moves some of the config options from bubblegum_96_defconfig to platform specific Kconfig file. Reviewed-by: Andre Przywara Signed-off-by: Amit Singh Tomar --- Changes since v6: * remove unnecessary string from SYS_PROMPT. Changes since v5: * Newly added patch, was not there in earlier versions. --- arch/arm/mach-owl/Kconfig | 15 +++++++++++++++ configs/bubblegum_96_defconfig | 5 ----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-owl/Kconfig b/arch/arm/mach-owl/Kconfig index 1d59d8f..8344081 100644 --- a/arch/arm/mach-owl/Kconfig +++ b/arch/arm/mach-owl/Kconfig @@ -25,4 +25,19 @@ config SYS_SOC default "s900" if MACH_S900 default "s700" if MACH_S700 +config DISTRO_DEFAULTS + default y + +config NR_DRAM_BANKS + default 1 + +config SYS_RELOC_GD_ENV_ADDR + default y + +config SYS_PROMPT + default "U-Boot => " + +config DISPLAY_BOARDINFO + default n + endif diff --git a/configs/bubblegum_96_defconfig b/configs/bubblegum_96_defconfig index e76e9a2..0883167 100644 --- a/configs/bubblegum_96_defconfig +++ b/configs/bubblegum_96_defconfig @@ -1,19 +1,14 @@ CONFIG_ARM=y CONFIG_ARCH_OWL=y CONFIG_ENV_SIZE=0x2000 -CONFIG_NR_DRAM_BANKS=1 CONFIG_MACH_S900=y CONFIG_IDENT_STRING="\nBubblegum-96" -CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTDELAY=5 CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyOWL5,115200n8" # CONFIG_DISPLAY_CPUINFO is not set -# CONFIG_DISPLAY_BOARDINFO is not set -CONFIG_SYS_PROMPT="U-Boot => " CONFIG_CMD_MD5SUM=y CONFIG_CMD_MEMINFO=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIMER=y CONFIG_DEFAULT_DEVICE_TREE="bubblegum_96" -CONFIG_SYS_RELOC_GD_ENV_ADDR=y From patchwork Fri Mar 20 17:35:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Amit Tomer X-Patchwork-Id: 1259129 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=eGYbou2A; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48kWFT2JLxz9sPR for ; Sat, 21 Mar 2020 04:37:49 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D515381834; Fri, 20 Mar 2020 18:36:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="eGYbou2A"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8E2F881813; Fri, 20 Mar 2020 18:36:18 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8914D81737 for ; Fri, 20 Mar 2020 18:36:09 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=amittomer25@gmail.com Received: by mail-pg1-x543.google.com with SMTP id 7so3453067pgr.2 for ; Fri, 20 Mar 2020 10:36:09 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=ePuoWBvaML9jff/BAO/ziefrDfpWXqCKTrAEcIgnVbo=; b=eGYbou2Akex/NwaoYOT6uAM948zHIgmP3lwBQYHjMdjj4y0JYwq1aUt1CmniB0WXeP CSlMpri1HNpGqwv6gLfCbHkVDOe/JtS6NQkyCXl51V/aaZRCbEOtyXJnTPeqa0hlB+n+ rftn7P+0/BAaw81pWU4Po5upJ0k5MKwZt5LuY4MFeb/KzoUo8vMh7cp7ipAL3lpLy7Q/ 8RIkfFQ7kdCgN2cQqy9+WFhPvfdV/vLNZeTpav1Aq/idbeCLEh0NyuVPkfGiBUWIdv1/ Z0Bic6bjZAokhQPYGb/e5j2nSkpPN31gNqx4+vrm4Z23QAgsUuIxrzH/VvT43y6ZjC2p 3OeA== 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:mime-version:content-transfer-encoding; bh=ePuoWBvaML9jff/BAO/ziefrDfpWXqCKTrAEcIgnVbo=; b=Cost3O3Ir/eg46u572SSqgWKkUKYj9sQo3yOKI2n5bBerTxMApfzbzir93Sx/wzPGf g46wtcpu3q+W8merqpls5gQL0Aag/hNG8oa8djcVN6buvba9MYTDEV4Jbw+rrBqhVDqv RxAb1Nc4iNeq2upoFgiV58NszH4oXegdGkoD9e33FiQ2b0puAtNUUMCzHHHniuPPYQmk 66bHjWJQ/DoFiZIXFhkn3AENVXMR/+F9iEuKgHWpKtftXgIbZuXmn+ZhKLKSrdzpSPlG h1mVNCwWyXx/PtCN+Jg55LjrqUCiDx7kUT33uEVFB0ho4eoM+fcuAWG3muPlHjIv7BUh p9Nw== X-Gm-Message-State: ANhLgQ3Yzy+IKfLhQdQdDmbbksez35/qHM4wu3IZimp0Ofjsq97O87Zc +WbMWlNTjf+kG0HplXPUspdictFp X-Google-Smtp-Source: ADFU+vsvjoTUeuwUP8shiihF8qQAPnzUO2joDiIWdUILC7y/XS8fVumQ4UGLGr9khefI8xRWcCiqtQ== X-Received: by 2002:a62:7ad7:: with SMTP id v206mr10541204pfc.181.1584725767157; Fri, 20 Mar 2020 10:36:07 -0700 (PDT) Received: from localhost.localdomain ([106.215.6.94]) by smtp.gmail.com with ESMTPSA id i187sm6037302pfg.33.2020.03.20.10.36.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Mar 2020 10:36:06 -0700 (PDT) From: Amit Singh Tomar To: u-boot@lists.denx.de Cc: andre.przywara@arm.com, manivannan.sadhasivam@linaro.org, trini@konsulko.com, Amit Singh Tomar Subject: [PATCH v7 11/12] arm: add Cubieboard7 board support Date: Fri, 20 Mar 2020 23:05:13 +0530 Message-Id: <1584725714-2770-12-git-send-email-amittomer25@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1584725714-2770-1-git-send-email-amittomer25@gmail.com> References: <1584725714-2770-1-git-send-email-amittomer25@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean The Cubieboard is a single board computer containing a Actions S700 SoC(with 4 ARMv8 Cortex-A53 cores). This patch adds respective defconfig alongwith .dts(copied from Linux v5.5-rc6 with hash "b3a987b0264d"). Reviewed-by: Andre Przywara Signed-off-by: Amit Singh Tomar --- Changes since v6: * Added Reviewed-by tag. Changes since v5: * Trimmed of the cubieboard7_defconfig. Changes since v4: * No changes. Changes since v3: * added reviewed-by: tag. Changes since v2: * No changes. Changes since v1: * No changes. --- arch/arm/dts/s700-cubieboard7.dts | 92 +++++++++++++++++++++++++++++++++++++++ configs/cubieboard7_defconfig | 9 ++++ 2 files changed, 101 insertions(+) create mode 100644 arch/arm/dts/s700-cubieboard7.dts create mode 100644 configs/cubieboard7_defconfig diff --git a/arch/arm/dts/s700-cubieboard7.dts b/arch/arm/dts/s700-cubieboard7.dts new file mode 100644 index 0000000..63e375c --- /dev/null +++ b/arch/arm/dts/s700-cubieboard7.dts @@ -0,0 +1,92 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2017 Andreas Färber + */ + +/dts-v1/; + +#include "s700.dtsi" + +/ { + compatible = "cubietech,cubieboard7", "actions,s700"; + model = "CubieBoard7"; + + aliases { + serial3 = &uart3; + }; + + chosen { + stdout-path = "serial3:115200n8"; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x0 0x0 0x80000000>; + }; + + memory@1,e0000000 { + device_type = "memory"; + reg = <0x1 0xe0000000 0x0 0x0>; + }; +}; + +&i2c0 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_default>; +}; + +&i2c1 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_default>; +}; + +&i2c2 { + status = "disabled"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_default>; +}; + +&pinctrl { + i2c0_default: i2c0_default { + pinmux { + groups = "i2c0_mfp"; + function = "i2c0"; + }; + pinconf { + pins = "i2c0_sclk", "i2c0_sdata"; + bias-pull-up; + }; + }; + + i2c1_default: i2c1_default { + pinmux { + groups = "i2c1_dummy"; + function = "i2c1"; + }; + pinconf { + pins = "i2c1_sclk", "i2c1_sdata"; + bias-pull-up; + }; + }; + + i2c2_default: i2c2_default { + pinmux { + groups = "i2c2_dummy"; + function = "i2c2"; + }; + pinconf { + pins = "i2c2_sclk", "i2c2_sdata"; + bias-pull-up; + }; + }; +}; + +&timer { + clocks = <&hosc>; +}; + +&uart3 { + status = "okay"; +}; diff --git a/configs/cubieboard7_defconfig b/configs/cubieboard7_defconfig new file mode 100644 index 0000000..d12c293 --- /dev/null +++ b/configs/cubieboard7_defconfig @@ -0,0 +1,9 @@ +CONFIG_ARM=y +CONFIG_ARCH_OWL=y +CONFIG_MACH_S700=y +CONFIG_IDENT_STRING="\ncubieboard7" +CONFIG_BOOTDELAY=5 +CONFIG_USE_BOOTARGS=y +CONFIG_BOOTARGS="console=ttyOWL3,115200n8" +# CONFIG_DISPLAY_CPUINFO is not set +CONFIG_DEFAULT_DEVICE_TREE="s700-cubieboard7" From patchwork Fri Mar 20 17:35:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Tomer X-Patchwork-Id: 1259130 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=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=GNAa3680; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48kWFf6WgMz9sPR for ; Sat, 21 Mar 2020 04:37:58 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C20FD81850; Fri, 20 Mar 2020 18:36:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="GNAa3680"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F06658176E; Fri, 20 Mar 2020 18:36:22 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0EC4781827 for ; Fri, 20 Mar 2020 18:36:13 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=amittomer25@gmail.com Received: by mail-pf1-x42d.google.com with SMTP id c19so3626753pfo.13 for ; Fri, 20 Mar 2020 10:36:12 -0700 (PDT) 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=fbZQ4uuXledxevBW+rgvBcTMhbxHY8XZIbyPt/XFQsw=; b=GNAa368095c8j5rbdOXYZDkcpcqwsxNWILDBHQmTdSuLvz4OOWO2q42qfYt2/2T7Rq Ae1T5PzP8o0Z8p81qaJWLMwzLTUEuHKkG2g6jteWQlzhvDM+BRLyn/EcX8nEDuGPRCCu i4kvDt4y8FQ0ea43RfcfFnLZdbBu7PqRup8E82Dch2bXG5xQPoEcnfqbB1ffAXdDffBs HLilUQjzlGvCYGpvGdZi2juLAW136NuBqdvO3ioJY5sLFZOVeZh65sdEfsCNqBl15R7r sCQYdkFh9h8cTh9Qnh7+fT9pMc0J+5dUj4k0cli/6xs7OqzWAAerVfD+ThTtvZrS8NDP nXYQ== 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=fbZQ4uuXledxevBW+rgvBcTMhbxHY8XZIbyPt/XFQsw=; b=JUEfvYRwDLDtPMH5UP5xeNfuDVX8NvR96Yw+4ektRzhco9CPivzg7lPiHq4l2ubu+z fXzmwx3PeQW6+R7APdZjd9nIQ7vP4NoCh+Ty9weokfR3lY2oqBvV5IGS0qVQbW/282Qb uW2siognPPW/md+B6Y1TcogUY+x61j9z4srDLiqtZSro8+h7H5sMuq/XmeYQE+vE7Kpe wqJvEZWb+2NmLlOzYL8QEetQrRxwnvTf9I9XRjusgomQ5p1/wyb3GVEok2XTF48aKFem OB+y1tDz/Som1Q6CEGeWT/U9piA0TDyxmZw5K0ijDk7O5AKZcmoEONUs7PLf1wD80nRb kouQ== X-Gm-Message-State: ANhLgQ0TuPB8UeVqIryJBTHAAJeG2Ixl9yXGegLedkgVB8MDx05ucCE1 4ca6ip0iBWwzuojFbLZVDOc8oL4A X-Google-Smtp-Source: ADFU+vv3nzo0b8m+tdPqSrtV8YAvFMW8x3JIDgfFYXC/dkroQe8Yf3SKmqtZYp3CWi9ZBUqfFJEETw== X-Received: by 2002:a62:1894:: with SMTP id 142mr11229989pfy.27.1584725770929; Fri, 20 Mar 2020 10:36:10 -0700 (PDT) Received: from localhost.localdomain ([106.215.6.94]) by smtp.gmail.com with ESMTPSA id i187sm6037302pfg.33.2020.03.20.10.36.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Mar 2020 10:36:09 -0700 (PDT) From: Amit Singh Tomar To: u-boot@lists.denx.de Cc: andre.przywara@arm.com, manivannan.sadhasivam@linaro.org, trini@konsulko.com, Amit Singh Tomar Subject: [PATCH v7 12/12] doc: boards: add Cubieboard7 documentation Date: Fri, 20 Mar 2020 23:05:14 +0530 Message-Id: <1584725714-2770-13-git-send-email-amittomer25@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1584725714-2770-1-git-send-email-amittomer25@gmail.com> References: <1584725714-2770-1-git-send-email-amittomer25@gmail.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean This adds build and flash steps for Actions S700 based Cubieboard7 board. Signed-off-by: Amit Singh Tomar --- Changes since v6: * No changes. Changes since v5: * No changes. Changes since v4: * No changes. Changes since v3: * Convert plain text documentation to reStructuredText format. Changes since v2: * No Change. Changes since v1: * No Change. --- doc/board/actions/cubieboard7.rst | 115 ++++++++++++++++++++++++++++++++++++++ doc/board/actions/index.rst | 10 ++++ doc/board/index.rst | 1 + 3 files changed, 126 insertions(+) create mode 100644 doc/board/actions/cubieboard7.rst create mode 100644 doc/board/actions/index.rst diff --git a/doc/board/actions/cubieboard7.rst b/doc/board/actions/cubieboard7.rst new file mode 100644 index 0000000..ce39e6b --- /dev/null +++ b/doc/board/actions/cubieboard7.rst @@ -0,0 +1,115 @@ +.. SPDX-License-Identifier: GPL-2.0+ +.. Copyright (C) 2020 Amit Singh Tomar + +ACTIONS +======== + +About this +---------- + +This document describes build and flash steps for Actions S700 SoC based Cubieboard7 +board. + +Cubieboard7 initial configuration +--------------------------------- + +Default Cubieboard7 comes with pre-installed Android where U-Boot is configured with +a bootdelay of 0, entering a prompt by pressing keys does not seem to work. + +Though, one can enter ADFU mode and flash debian image(from host machine) where +getting into u-boot prompt is easy. + +Enter ADFU Mode +---------------- + +Before write the firmware, let the development board entering the ADFU mode: insert +one end of the USB cable to the PC, press and hold the ADFU button, and then connect +the other end of the USB cable to the Mini USB port of the development board, release +the ADFU button, after connecting it will enter the ADFU mode. + +Check whether entered ADFU Mode +-------------------------------- + +The user needs to run the following command on the PC side to check if the ADFU +device is detected. ID realted to "Actions Semiconductor Co., Ltd" means that +the PC side has been correctly detected ADFU device, the development board +also enter into the ADFU mode. + +.. code-block:: none + + $ lsusb + Bus 001 Device 005: ID 04f2:b2eb Chicony Electronics Co., Ltd + Bus 001 Device 004: ID 0a5c:21e6 Broadcom Corp. BCM20702 Bluetooth 4.0 [ThinkPad] + Bus 001 Device 003: ID 046d:c534 Logitech, Inc. Unifying Receiver + Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub + Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub + Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub + Bus 003 Device 013: ID 10d6:10d6 Actions Semiconductor Co., Ltd + Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub + +Flashing debian image +--------------------- + +.. code-block:: none + + $ sudo ./ActionsFWU.py --fw=debian-stretch-desktop-cb7-emmc-v2.0.fw + ActionsFWU.py : 1.0.150828.0830 + libScript.so : 2.3.150825.0951 + libFileSystem.so: 2.3.150825.0952 + libProduction.so: 2.3.150915.1527 + =====burn all partition==== + FW_VER: 3.10.37.180608 + 3% DOWNLOAD ADFUDEC ... + 5% DOWNLOAD BOOT PARA ... + 7% SWITCH ADFUDEC ... + 12% DOWNLOAD BL31 ... + 13% DOWNLOAD BL32 ... + 15% DOWNLOAD VMLINUX ... + 20% DOWNLOAD INITRD ... + 24% DOWNLOAD FDT ... + 27% DOWNLOAD ADFUS ... + 30% SWITCH ADFUS ... + 32% DOWNLOAD MBR ... + 35% DOWNLOAD PARTITIONS ... + WRITE_MBRC_PARTITION + 35% write p0 size = 2048 : ok + WRITE_BOOT_PARTITION + 35% write p1 size = 2048 : ok + WRITE_MISC_PARTITION + 36% write p2 size = 98304 : ok + WRITE_SYSTEM_PARTITION + 94% write p3 size = 4608000 : ok + FORMAT_SWAP_PARTITION + 94% write p4 size = 20480 : ok + 95% TRANSFER OVER ... + Firmware upgrade successfully! + +Debian image can be downloaded from here[1]. + +Once debian image is flashed, one can get into u-boot prompt by pressing any key and from +there run ums command(make sure, usb cable is connected between host and target): + +.. code-block:: none + + owl> ums 0 mmc 1 + +Above command would mount debian image partition on host machine. + +Building U-BOOT proper image +---------------------------- + +.. code-block:: none + + $ make clean + $ export CROSS_COMPILE=aarch64-linux-gnu- + $ make ARCH=arm cubieboard7_defconfig + $ make -j16 + $ mkimage -A arm -T firmware -C none -O u-boot -a 0x11000000 -e 0x11000000 -d u-boot-dtb.bin u-boot-dtb.img >/dev/null + +u-boot-dtb.img can now be flashed to debian image partition mounted on host machine. + +.. code-block:: none + + $ sudo dd if=u-boot-dtb.img of=/dev/sdb bs=1024 seek=3072 + +[1]: https://pan.baidu.com/s/1uawPr0Jao2HgWFLZCLzHAg#list/path=%2FCubieBoard_Download%2FBoard%2FCubieBoard7%2F%E6%96%B9%E7%B3%96%E6%96%B9%E6%A1%88%E5%BC%80%E5%8F%91%E8%B5%84%E6%96%99%2FImage%2FDebian%2FV2.1-test&parentPath=%2F diff --git a/doc/board/actions/index.rst b/doc/board/actions/index.rst new file mode 100644 index 0000000..c596879 --- /dev/null +++ b/doc/board/actions/index.rst @@ -0,0 +1,10 @@ +.. SPDX-License-Identifier: GPL-2.0+ +.. Copyright (C) 2020 Amit Singh Tomar + +Actions +======== + +.. toctree:: + :maxdepth: 2 + + cubieboard7 diff --git a/doc/board/index.rst b/doc/board/index.rst index 51a2ae6..01b233f 100644 --- a/doc/board/index.rst +++ b/doc/board/index.rst @@ -6,6 +6,7 @@ Board-specific doc .. toctree:: :maxdepth: 2 + actions/index AndesTech/index atmel/index coreboot/index