From patchwork Thu Jun 30 08:36:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Murzin X-Patchwork-Id: 12901420 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1FD1FC43334 for ; Thu, 30 Jun 2022 08:38:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pbUfx2xO8+W074QjY0r040WJp+lLiQ7hx+NDL2baoIo=; b=pqVcv+5SIpzlVj +xY7euwlHo41CF51G28VmzrHJ9DzKn/f9L69QEYoob4vK7f0i9AL9uebRL/lBaY/oj2yGLWKHu66x 2dl9MwZyySPgWHmuTiAl2UdoV/QJwqdAOudE5/eRp8qz9giZ8HvtdFj2S0pcM7NX8kQb/ph3yYfe2 Goi+mWpnefT8EdDxHGxEC4+D7tNq8EcdjDpcaIdxQ6+x/rcl1Hrl4FEC+1Qx5Bu/ER2kocKdxXFgT /+8BOClaw1XS+Z3bm7rPhG0tR/ICQAdxYtByp3ZZvOKahW4jOY5Ug7KV1HVGArhGp3Jnpu00SXbPa rxTFzCTG3S9LrWfNk1ew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6pg5-00G3a9-J3; Thu, 30 Jun 2022 08:37:33 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6pfc-00G3RB-FG for linux-arm-kernel@lists.infradead.org; Thu, 30 Jun 2022 08:37:07 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 959BB1BCB; Thu, 30 Jun 2022 01:37:00 -0700 (PDT) Received: from login2.euhpc.arm.com (login2.euhpc.arm.com [10.6.27.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id AFEF53F66F; Thu, 30 Jun 2022 01:36:59 -0700 (PDT) From: Vladimir Murzin To: linux-arm-kernel@lists.infradead.org Cc: arnd@arndb.de, ayan.kumar.halder@xilinx.com, stefanos@xilinx.com Subject: [RFC PATCH 1/3] ARM: Introduce ARM_SINGLE_ARMV7R for ARMv7-R platforms Date: Thu, 30 Jun 2022 09:36:39 +0100 Message-Id: <20220630083641.21835-2-vladimir.murzin@arm.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20220630083641.21835-1-vladimir.murzin@arm.com> References: <20220630083641.21835-1-vladimir.murzin@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220630_013704_667338_80B8B1AE X-CRM114-Status: GOOD ( 11.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Similar to ARM_SINGLE_ARMV7M introduce the new config symbol ARM_SINGLE_ARMV7R which groups config symbols required by ARMv7-R (and above) platforms. This would allow supporting multiple ARMv7-R platforms in one kernel image. However, to be bootable such kernel image requires to share the same main memory layout. Signed-off-by: Vladimir Murzin --- arch/arm/Kconfig | 19 ++++++++++++++++++- arch/arm/Kconfig.debug | 6 ++++-- arch/arm/Makefile | 2 ++ arch/arm/kernel/devtree.c | 3 ++- 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 7630ba9cb6cc..0dda6523724d 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -304,8 +304,13 @@ config MMU Select if you want MMU-based virtualised addressing space support by paged memory management. If unsure, say 'Y'. +choice + prompt "ARM system type" + depends on !MMU + default ARM_SINGLE_ARMV7M + config ARM_SINGLE_ARMV7M - def_bool !MMU + bool "ARM Cortex-M based platforms" select ARM_NVIC select AUTO_ZRELADDR select TIMER_OF @@ -315,6 +320,18 @@ config ARM_SINGLE_ARMV7M select SPARSE_IRQ select USE_OF +config ARM_SINGLE_ARMV7R + bool "ARM Cortex-R based platforms" + select AUTO_ZRELADDR + select TIMER_OF + select COMMON_CLK + select CPU_V7 + select NO_IOPORT_MAP + select SPARSE_IRQ + select USE_OF + +endchoice + config ARCH_MMAP_RND_BITS_MIN default 8 diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 9b0aa4822d69..832d624203b8 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -1904,7 +1904,8 @@ config DEBUG_UART_8250_PALMCHIP config DEBUG_UNCOMPRESS bool "Enable decompressor debugging via DEBUG_LL output" - depends on ARCH_MULTIPLATFORM || PLAT_SAMSUNG || ARM_SINGLE_ARMV7M + depends on ARCH_MULTIPLATFORM || PLAT_SAMSUNG || ARM_SINGLE_ARMV7M || \ + ARM_SINGLE_ARMV7R depends on DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \ (!DEBUG_TEGRA_UART || !ZBOOT_ROM) && \ !DEBUG_BRCMSTB_UART && !DEBUG_SEMIHOSTING @@ -1922,7 +1923,8 @@ config DEBUG_UNCOMPRESS config UNCOMPRESS_INCLUDE string default "debug/uncompress.h" if ARCH_MULTIPLATFORM || ARCH_MSM || \ - PLAT_SAMSUNG || ARM_SINGLE_ARMV7M + PLAT_SAMSUNG || ARM_SINGLE_ARMV7M || \ + ARM_SINGLE_ARMV7R default "mach/uncompress.h" config EARLY_PRINTK diff --git a/arch/arm/Makefile b/arch/arm/Makefile index c8e3633f5434..985df6b00b49 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -245,9 +245,11 @@ platdirs := $(patsubst %,arch/arm/plat-%/,$(sort $(plat-y))) ifneq ($(CONFIG_ARCH_MULTIPLATFORM),y) ifneq ($(CONFIG_ARM_SINGLE_ARMV7M),y) +ifneq ($(CONFIG_ARM_SINGLE_ARMV7R),y) KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs) $(platdirs)) endif endif +endif export TEXT_OFFSET GZFLAGS MMUEXT diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c index 02839d8b6202..ce2c67c9301e 100644 --- a/arch/arm/kernel/devtree.c +++ b/arch/arm/kernel/devtree.c @@ -194,7 +194,8 @@ const struct machine_desc * __init setup_machine_fdt(void *dt_virt) { const struct machine_desc *mdesc, *mdesc_best = NULL; -#if defined(CONFIG_ARCH_MULTIPLATFORM) || defined(CONFIG_ARM_SINGLE_ARMV7M) +#if defined(CONFIG_ARCH_MULTIPLATFORM) || defined(CONFIG_ARM_SINGLE_ARMV7M) || \ + defined(CONFIG_ARM_SINGLE_ARMV7R) DT_MACHINE_START(GENERIC_DT, "Generic DT based system") .l2c_aux_val = 0x0, .l2c_aux_mask = ~0x0, From patchwork Thu Jun 30 08:36:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Murzin X-Patchwork-Id: 12901419 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 80160C43334 for ; Thu, 30 Jun 2022 08:38:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3JK8e0LlLjCmFrXI1y4AGR2kf7oQ1vcjGw4lLB+OmeA=; b=ftlNL1tXANLW65 M1k6HU1juRlNpcoQrAF+bkmBdSY1nfkqN9c2DZ9JsTbUf1ifp0gqAbo9Ftbfti1f33cnxq3s0AU8X 34CFc6ZSJJx5uaGprcpLQsXY1OwliAXP1Y8Zc/yuACN6moItiUcWoieyTbVeRidQJJcmvr0wrJcnh CCnGZzVe7eLaif28S5FJmaemIPJAwDO0sXhHPaed8qiygmPJhA4Ny82llFTiw+w7cfKkQF9dP0AUa rvPXLVMtC+7ryEnQt/uerjYEX0uD2yvZFHgplHf7KghbRW/XESn1cRaGrl6pxzm6if8+6aMmMdsFl RvZSOZ9yPeFdZE4IFEgQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6pfv-00G3XR-Iu; Thu, 30 Jun 2022 08:37:23 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6pfd-00G3RI-8b for linux-arm-kernel@lists.infradead.org; Thu, 30 Jun 2022 08:37:07 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6EDB81BD0; Thu, 30 Jun 2022 01:37:01 -0700 (PDT) Received: from login2.euhpc.arm.com (login2.euhpc.arm.com [10.6.27.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 8993B3F66F; Thu, 30 Jun 2022 01:37:00 -0700 (PDT) From: Vladimir Murzin To: linux-arm-kernel@lists.infradead.org Cc: arnd@arndb.de, ayan.kumar.halder@xilinx.com, stefanos@xilinx.com Subject: [RFC PATCH 2/3] ARM: mps2: Split into ARCH/MACH options Date: Thu, 30 Jun 2022 09:36:40 +0100 Message-Id: <20220630083641.21835-3-vladimir.murzin@arm.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20220630083641.21835-1-vladimir.murzin@arm.com> References: <20220630083641.21835-1-vladimir.murzin@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220630_013705_392000_D9BBF9BB X-CRM114-Status: UNSURE ( 8.82 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org We are about to add MPS2 compatible R-class platform, so we'd need fine grain control over what should go under M-calss. Signed-off-by: Vladimir Murzin --- arch/arm/Kconfig | 12 ------------ arch/arm/mach-versatile/Kconfig | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 0dda6523724d..7fa06db2d9e5 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -631,18 +631,6 @@ config ARCH_LPC18XX Support for NXP's LPC18xx Cortex-M3 and LPC43xx Cortex-M4 high performance microcontrollers. -config ARCH_MPS2 - bool "ARM MPS2 platform" - depends on ARM_SINGLE_ARMV7M - select ARM_AMBA - select CLKSRC_MPS2 - help - Support for Cortex-M Prototyping System (or V2M-MPS2) which comes - with a range of available cores like Cortex-M3/M4/M7. - - Please, note that depends which Application Note is used memory map - for the platform may vary, so adjustment of RAM base might be needed. - # Definitions to make life easier config ARCH_ACORN bool diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig index 2ef226194c3a..18643af4f3e1 100644 --- a/arch/arm/mach-versatile/Kconfig +++ b/arch/arm/mach-versatile/Kconfig @@ -325,3 +325,35 @@ config ARCH_VEXPRESS_TC2_PM with a TC2 (A15x2 A7x3) big.LITTLE core tile. endif + +menuconfig ARCH_MPS2 + bool "ARM MPS2 family" + depends on ARM_SINGLE_ARMV7M + select ARM_AMBA + select CLKSRC_MPS2 + help + Support for Cortex-M Prototyping System (or V2M-MPS2) which comes + with a range of available cores like Cortex-M3/M4/M7. + + Please, note that depends which Application Note is used memory map + for the platform may vary, so adjustment of RAM base might be needed. + +if ARCH_MPS2 + +config MACH_MPS2_AN385 + bool "ARM MPS2 Application Note 385" + default y + +config MACH_MPS2_AN385 + bool "ARM MPS2 Application Note 385" + default y + +config MACH_MPS2_AN399 + bool "ARM MPS2 Application Note 399" + default y + +config MACH_MPS2_AN400 + bool "ARM MPS2 Application Note 400" + default y + +endif # MPS2 From patchwork Thu Jun 30 08:36:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Murzin X-Patchwork-Id: 12901421 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3A42AC433EF for ; Thu, 30 Jun 2022 08:38:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Y0CrUsK9C/uQELPVD1y2m2euTqj7iIGilbAHOdjoYsw=; b=vmyAOb4D+OHP15 tkvoIkuuZoxLGkSiRGl3X7YI9s20S7EFdmNFn/k5687uRjHV1eRGkO1N0k5chcj8SncgQ715wpzGc jvpdxDZp2JPAso0She4ZGzFDd/yxQfdsJ6BLI5yhM0ORXFSiCLluFFAl72rl7b91AannsVcNYVsH9 tFDUJx33GshcS/7PKZCDte4P+iPyTvp3x+rLchqNSMVkighKe5Rj+KVwVxzNEhHhZNy7aqMEaIl9Q ibykOiwYrF+BkE3Qfz4WfH2m132tKpd/j5nGlcOfghZMkx2y3l7fqHxX96ErJk0b91LFWyOdBUgXr oHaQqJ5ovG/7dSgA3mrw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6pgN-00G3fq-IV; Thu, 30 Jun 2022 08:37:51 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6pfc-00G3RV-7u for linux-arm-kernel@lists.infradead.org; Thu, 30 Jun 2022 08:37:08 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4A6291BF3; Thu, 30 Jun 2022 01:37:02 -0700 (PDT) Received: from login2.euhpc.arm.com (login2.euhpc.arm.com [10.6.27.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 65C503F66F; Thu, 30 Jun 2022 01:37:01 -0700 (PDT) From: Vladimir Murzin To: linux-arm-kernel@lists.infradead.org Cc: arnd@arndb.de, ayan.kumar.halder@xilinx.com, stefanos@xilinx.com Subject: [RFC PATCH 3/3] ARM: Introduce MPS3 AN536 Date: Thu, 30 Jun 2022 09:36:41 +0100 Message-Id: <20220630083641.21835-4-vladimir.murzin@arm.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20220630083641.21835-1-vladimir.murzin@arm.com> References: <20220630083641.21835-1-vladimir.murzin@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220630_013704_485450_F608D85F X-CRM114-Status: GOOD ( 17.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Application Note 536 FPGA image implements the dual Cortex-R52 system which is extended with interconnect and peripherals to provide an example design. Unfortunately, design does't support exclusive access to shareable memory which is show stopper for SMP support - we enforce shareable attribute via MPU. Signed-off-by: Vladimir Murzin --- arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/mps3-an536.dts | 135 +++++++++++++++++++++++++++++ arch/arm/mach-versatile/Kconfig | 27 ++++-- arch/arm/mach-versatile/v2m-mps2.c | 3 +- 4 files changed, 160 insertions(+), 8 deletions(-) create mode 100644 arch/arm/boot/dts/mps3-an536.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 5112f493f494..831401e5d021 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -400,7 +400,8 @@ dtb-$(CONFIG_ARCH_MMP) += \ mmp3-dell-ariel.dtb dtb-$(CONFIG_ARCH_MPS2) += \ mps2-an385.dtb \ - mps2-an399.dtb + mps2-an399.dtb \ + mps3-an536.dtb dtb-$(CONFIG_ARCH_MOXART) += \ moxart-uc7112lx.dtb dtb-$(CONFIG_ARCH_SD5203) += \ diff --git a/arch/arm/boot/dts/mps3-an536.dts b/arch/arm/boot/dts/mps3-an536.dts new file mode 100644 index 000000000000..240c5bb46471 --- /dev/null +++ b/arch/arm/boot/dts/mps3-an536.dts @@ -0,0 +1,135 @@ +// SPDX-License-Identifier: GPL-2.0 or MIT +/* + * Copyright (c) 2022, Arm Limited. All rights reserved. + * + * Author: Vladimir Murzin + */ + +#include + +/dts-v1/; + + +/ { + model = "ARM MPS3 Application Note 536"; + compatible = "arm,mps3","arm,mps2"; + interrupt-parent = <&gic>; + #address-cells = <1>; + #size-cells = <1>; + + aliases { + serial0 = &uart0; + serial1 = &uart1; + }; + + chosen { + bootargs = "earlycon"; + stdout-path = "serial0:115200n8"; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + compatible = "arm,armv8"; + reg = <0>; + }; + }; + + memory@20000000 { + device_type = "memory"; + reg = <0x20000000 0x20000000>; + }; + + clk-osc0 { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24000000>; + }; + + sysclk: clk-osc1 { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <50000000>; + }; + + gic: interrupt-controller@f0000000 { + compatible = "arm,gic-v3"; + #interrupt-cells = <3>; + interrupt-controller; + reg = <0xf0000000 0x10000>, // GICD + <0xf0100000 0x40000>; // GICR + interrupts = ; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupts = , + ; + interrupt-names = "phys", "virt"; + }; + + + soc { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + uart0: serial@e0205000 { + compatible = "arm,mps2-uart"; + reg = <0xe0205000 0x1000>; + interrupts = , + , + ; + clocks = <&sysclk>; + }; + + uart1: serial@e0206000 { + compatible = "arm,mps2-uart"; + reg = <0xe0206000 0x1000>; + interrupts = , + , + ; + clocks = <&sysclk>; + }; + + }; + + fpga@e0200000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0xe0200000 0x3000>; + + fpgaio@2000 { + compatible = "syscon", "simple-mfd"; + reg = <0x2000 0x10>; + ranges = <0x0 0x2000 0x10>; + #address-cells = <1>; + #size-cells = <1>; + + led0,0 { + compatible = "register-bit-led"; + reg = <0x00 0x04>; + offset = <0x00>; + mask = <0x01>; + label = "userled:0"; + linux,default-trigger = "heartbeat"; + default-state = "on"; + }; + + led0,1 { + compatible = "register-bit-led"; + reg = <0x00 0x04>; + offset = <0x00>; + mask = <0x02>; + label = "userled:1"; + linux,default-trigger = "usr"; + default-state = "off"; + }; + }; + }; +}; diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig index 18643af4f3e1..94c26bd7d3b9 100644 --- a/arch/arm/mach-versatile/Kconfig +++ b/arch/arm/mach-versatile/Kconfig @@ -327,19 +327,21 @@ config ARCH_VEXPRESS_TC2_PM endif menuconfig ARCH_MPS2 - bool "ARM MPS2 family" - depends on ARM_SINGLE_ARMV7M + bool "ARM MPS2/MPS3 family" + depends on ARM_SINGLE_ARMV7M || ARM_SINGLE_ARMV7R select ARM_AMBA select CLKSRC_MPS2 help - Support for Cortex-M Prototyping System (or V2M-MPS2) which comes - with a range of available cores like Cortex-M3/M4/M7. + Support for ARM MPS2/MPS3 paltform which comes with a range + of available cores from Cortex-M and Cortex-R families. - Please, note that depends which Application Note is used memory map - for the platform may vary, so adjustment of RAM base might be needed. + Please, note that depends which Application Note is used memory map + for the platform may vary, so adjustment of RAM base might be needed. if ARCH_MPS2 +if ARM_SINGLE_ARMV7M + config MACH_MPS2_AN385 bool "ARM MPS2 Application Note 385" default y @@ -356,4 +358,17 @@ config MACH_MPS2_AN400 bool "ARM MPS2 Application Note 400" default y +endif # ARMv7-M + +if ARM_SINGLE_ARMV7R + +config MACH_MPS3_AN536 + bool "ARM MPS3 Application Note 536" + default y + select ARM_GIC_V3 + select HAVE_ARM_ARCH_TIMER + +endif # ARMv7-R + + endif # MPS2 diff --git a/arch/arm/mach-versatile/v2m-mps2.c b/arch/arm/mach-versatile/v2m-mps2.c index 5b50d8e95cd7..3a6c3bdfefd0 100644 --- a/arch/arm/mach-versatile/v2m-mps2.c +++ b/arch/arm/mach-versatile/v2m-mps2.c @@ -9,9 +9,10 @@ static const char *const mps2_compat[] __initconst = { "arm,mps2", + "arm,mps3", NULL }; -DT_MACHINE_START(MPS2DT, "MPS2 (Device Tree Support)") +DT_MACHINE_START(MPS2DT, "MPS2/MPS3 (Device Tree Support)") .dt_compat = mps2_compat, MACHINE_END