From patchwork Fri Dec 8 14:11:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ludovic BARRE X-Patchwork-Id: 10102599 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 541D960360 for ; Fri, 8 Dec 2017 14:13:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4365328CE4 for ; Fri, 8 Dec 2017 14:13:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 37F7E28CEB; Fri, 8 Dec 2017 14:13:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0D6BA28CE4 for ; Fri, 8 Dec 2017 14:13:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Nl6s7GMYH3033hDekcTzS9d7Q+xCh4HDd1O7iWq0bjA=; b=ANshN17Gi7oOoY Ismk6q1GeUZ5I+NPlzwiFKRdzLebNRRo2A/70ZqI4vT1NloRViEMrsrrjp26s3L4VyLlaekfgPh7u Wf5D+B1dtsiuYjMJE0jwVy5DpBlId31IZKRDgDQUVCeWUv24B5nAEKqxzfnbHBuLtjhATEw4bPRqA zbJgPwRNFdg8TbzluxgTFsnJHzgGkTKmvVVN5djXKk7HFDXrwTkSOaNxTQVmkSeovpmZ+p/0Q5pyg LAkGuDuAowzyNZroT6KPKk+hwu3NHsoWaUVQktvNBdWEfSaVf3b4h3O7MNPUq+YGLxp7lczBY3Vvd slsLGDx9vkDtlOumRYBg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eNJPD-0006iK-TD; Fri, 08 Dec 2017 14:13:35 +0000 Received: from mx07-00178001.pphosted.com ([62.209.51.94]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eNJNl-0005JX-VY for linux-arm-kernel@lists.infradead.org; Fri, 08 Dec 2017 14:12:10 +0000 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vB8E9Rcp009525; Fri, 8 Dec 2017 15:11:24 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2eqn7n25b3-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 08 Dec 2017 15:11:24 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id C6B0831; Fri, 8 Dec 2017 14:11:23 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas23.st.com [10.75.90.46]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 99459503F; Fri, 8 Dec 2017 14:11:23 +0000 (GMT) Received: from SAFEX1HUBCAS24.st.com (10.75.90.95) by SAFEX1HUBCAS23.st.com (10.75.90.46) with Microsoft SMTP Server (TLS) id 14.3.352.0; Fri, 8 Dec 2017 15:11:23 +0100 Received: from lmecxl0923.lme.st.com (10.48.0.237) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.352.0; Fri, 8 Dec 2017 15:11:22 +0100 From: Ludovic Barre To: Russell King , Rob Herring , Linus Walleij , Arnd Bergmann Subject: [PATCH 2/6] ARM: stm32: add initial support for STM32MP157 Date: Fri, 8 Dec 2017 15:11:13 +0100 Message-ID: <1512742277-28205-3-git-send-email-ludovic.Barre@st.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512742277-28205-1-git-send-email-ludovic.Barre@st.com> References: <1512742277-28205-1-git-send-email-ludovic.Barre@st.com> MIME-Version: 1.0 X-Originating-IP: [10.48.0.237] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-12-08_08:, , signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171208_061206_516675_35F554EB X-CRM114-Status: GOOD ( 14.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Alexandre Torgue , linux-kernel@vger.kernel.org, Ludovic Barre , Maxime Coquelin , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ludovic Barre This patch adds initial support of STM32MP157 microprocessor (MPU) based on Arm Cortex-A7. Under new ARCH_STM32_MPU flag we select the needed Cortex-A infrastructure (like gic, timer,...) Signed-off-by: Ludovic Barre --- Documentation/arm/stm32/stm32mp157-overview.txt | 12 ++++++++++++ Documentation/devicetree/bindings/arm/stm32.txt | 1 + arch/arm/mach-stm32/Kconfig | 22 ++++++++++++++++++++-- arch/arm/mach-stm32/Makefile | 1 + arch/arm/mach-stm32/board-mpu-dt.c | 16 ++++++++++++++++ 5 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 Documentation/arm/stm32/stm32mp157-overview.txt create mode 100644 arch/arm/mach-stm32/board-mpu-dt.c diff --git a/Documentation/arm/stm32/stm32mp157-overview.txt b/Documentation/arm/stm32/stm32mp157-overview.txt new file mode 100644 index 0000000..8a3e7cb --- /dev/null +++ b/Documentation/arm/stm32/stm32mp157-overview.txt @@ -0,0 +1,12 @@ + STM32MP157 Overview + =================== + + Introduction + ------------ + The STM32MP157 is a Cortex-A MPU aimed at various applications. + It features: + - Dual core Cortex-A7 application core + - 2D/3D image composition with GPU + - Standard memories interface support + - Standard connectivity, widely inherited from the STM32 MCU family + - Comprehensive security support diff --git a/Documentation/devicetree/bindings/arm/stm32.txt b/Documentation/devicetree/bindings/arm/stm32.txt index 05762b0..6808ed9 100644 --- a/Documentation/devicetree/bindings/arm/stm32.txt +++ b/Documentation/devicetree/bindings/arm/stm32.txt @@ -7,3 +7,4 @@ using one of the following compatible strings: st,stm32f469 st,stm32f746 st,stm32h743 + st,stm32mp157 diff --git a/arch/arm/mach-stm32/Kconfig b/arch/arm/mach-stm32/Kconfig index c8059ea..2b227c7 100644 --- a/arch/arm/mach-stm32/Kconfig +++ b/arch/arm/mach-stm32/Kconfig @@ -1,12 +1,12 @@ menuconfig ARCH_STM32 - bool "STMicrolectronics STM32 family" if ARM_SINGLE_ARMV7M + bool "STMicrolectronics STM32 family" if ARM_SINGLE_ARMV7M || ARCH_MULTI_V7 select ARCH_HAS_RESET_CONTROLLER select CLKSRC_STM32 select PINCTRL select RESET_CONTROLLER select STM32_EXTI help - Support for STMicroelectronics STM32 MCU family + Support for STMicroelectronics STM32 MCU/MPU family if ARCH_STM32 @@ -40,4 +40,22 @@ config MACH_STM32H743 endif +if ARCH_MULTI_V7 + +config ARCH_STM32_MPU + bool "STMicrolectronics STM32 MPU" + default y + select ARM_GIC + select HAVE_ARM_ARCH_TIMER + select ARM_PSCI + help + Support for STMicroelectronics STM32 Microprocessors. + +config MACH_STM32MP157 + bool "STMicrolectronics STM32MP157" + depends on ARCH_STM32_MPU + default y + +endif + endif diff --git a/arch/arm/mach-stm32/Makefile b/arch/arm/mach-stm32/Makefile index 90c1b71..a405eb6 100644 --- a/arch/arm/mach-stm32/Makefile +++ b/arch/arm/mach-stm32/Makefile @@ -1 +1,2 @@ obj-$(CONFIG_ARCH_STM32_MCU) += board-mcu-dt.o +obj-$(CONFIG_ARCH_STM32_MPU) += board-mpu-dt.o diff --git a/arch/arm/mach-stm32/board-mpu-dt.c b/arch/arm/mach-stm32/board-mpu-dt.c new file mode 100644 index 0000000..9e18405 --- /dev/null +++ b/arch/arm/mach-stm32/board-mpu-dt.c @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) STMicroelectronics 2017 - All Rights Reserved + * Author: Ludovic Barre for STMicroelectronics. + */ +#include +#include + +static const char *const stm32mp_compat[] __initconst = { + "st,stm32mp157", + NULL +}; + +DT_MACHINE_START(STM32MPDT, "STM32 MP (Device Tree Support)") + .dt_compat = stm32mp_compat, +MACHINE_END