From patchwork Thu May 7 16:48:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joachim Eastwood X-Patchwork-Id: 6359481 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CD2A1BEEE1 for ; Thu, 7 May 2015 16:52:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C71FC2034E for ; Thu, 7 May 2015 16:52:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C43942034B for ; Thu, 7 May 2015 16:52:33 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YqOzc-0006MO-An; Thu, 07 May 2015 16:49:48 +0000 Received: from mail-lb0-x232.google.com ([2a00:1450:4010:c04::232]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YqOz2-0005w3-IW for linux-arm-kernel@lists.infradead.org; Thu, 07 May 2015 16:49:14 +0000 Received: by lbcga7 with SMTP id ga7so35507531lbc.1 for ; Thu, 07 May 2015 09:48:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LYOabTNtuO0HL/H2KCfj5462vcsFDkpdX52039GAjgw=; b=ldfANzFYaXndzsvPFYzUA/iuT/wQZeO5el2lcWFh+D0V+SaL2pBTVDbG0gLT3jpNUA Cz1EsQv9LzrZEb7uiKpL4QYvPJpqHjlXthw6CVXnxw/R0UgmQkX9jE3JYU9kAOdbI9Zh j4hqIH2RKtcwCJfTdSTEiqQA9mUXMV5pJ8YjObwGLsyA/8V+tXb8jr93xuwz3yY4oOeX cV79kVjCd8scoNqT2f64XdIAqjeIBOEmbeDtCh3mUWviNHucdpzPmO5tR6CizejGOOsz R0MFeSnlv9S/SX4FmyNS9T8Fsl/t8cLjivBk7VzbVSIzhqLw0jyP9mLZbqD5F0Ifx/gZ a0Fg== X-Received: by 10.112.219.70 with SMTP id pm6mr3735672lbc.41.1431017328192; Thu, 07 May 2015 09:48:48 -0700 (PDT) Received: from localhost.localdomain (183.90-149-48.nextgentel.com. [90.149.48.183]) by mx.google.com with ESMTPSA id pn1sm573323lbc.6.2015.05.07.09.48.47 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 07 May 2015 09:48:47 -0700 (PDT) From: Joachim Eastwood To: arnd@arndb.de, olof@lixom.net, arm@kernel.org, daniel.lezcano@linaro.org, tglx@linutronix.de Subject: [PATCH v3 1/7] ARM: lpc18xx: add basic support for NXP LPC18xx/43xx SoCs Date: Thu, 7 May 2015 18:48:31 +0200 Message-Id: <1431017317-23740-2-git-send-email-manabian@gmail.com> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1431017317-23740-1-git-send-email-manabian@gmail.com> References: <1431017317-23740-1-git-send-email-manabian@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150507_094912_877367_50185B4B X-CRM114-Status: GOOD ( 14.28 ) X-Spam-Score: -0.8 (/) Cc: Joachim Eastwood , ezequiel@vanguardiasur.com.ar, linux-arm-kernel@lists.infradead.org, ariel.dalessandro@gmail.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add support for NXP's LPC18xx (Cortex-M3) and LPC43xx (Cortex-M4) SoCs. These SoCs are NXP's high preformance MCU line and can run at clock speeds up to 180 MHz for LPC18xx and 204 MHz for LPC43xx. LPC43xx is more or less a LPC18xx with a Cortex-M4F core and a few extra peripherals. The LPC43xx series also features one or two Cortex-M0 cores that can be used to offload the main M4 core. Signed-off-by: Joachim Eastwood Reviewed-by: Ezequiel Garcia --- arch/arm/Kconfig | 20 ++++++++++++++++++++ arch/arm/Kconfig.debug | 3 ++- arch/arm/Makefile | 1 + arch/arm/mach-lpc18xx/Makefile | 1 + arch/arm/mach-lpc18xx/Makefile.boot | 3 +++ arch/arm/mach-lpc18xx/board-dt.c | 22 ++++++++++++++++++++++ 6 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 arch/arm/mach-lpc18xx/Makefile create mode 100644 arch/arm/mach-lpc18xx/Makefile.boot create mode 100644 arch/arm/mach-lpc18xx/board-dt.c diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 45df48ba0b12..fba149165229 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -586,6 +586,26 @@ config ARCH_W90X900 +config ARCH_LPC18XX + bool "NXP LPC18xx/LPC43xx" + depends on !MMU + select ARCH_HAS_RESET_CONTROLLER + select ARCH_REQUIRE_GPIOLIB + select ARM_AMBA + select ARM_NVIC + select AUTO_ZRELADDR + select CLKSRC_OF + select COMMON_CLK + select CPU_V7M + select GENERIC_CLOCKEVENTS + select NO_IOPORT_MAP + select PINCTRL + select SPARSE_IRQ + select USE_OF + help + Support for NXP's LPC18xx Cortex-M3 and LPC43xx Cortex-M4 + high performance microcontrollers. + config ARCH_LPC32XX bool "NXP LPC32XX" select ARCH_REQUIRE_GPIOLIB diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 0c12ffb155a2..b3b6469350c1 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -1359,6 +1359,7 @@ config DEBUG_UART_PHYS default 0x20201000 if DEBUG_BCM2835 default 0x3e000000 if DEBUG_BCM_KONA_UART default 0x4000e400 if DEBUG_LL_UART_EFM32 + default 0x40081000 if ARCH_LPC18XX default 0x40090000 if ARCH_LPC32XX default 0x40100000 if DEBUG_PXA_UART1 default 0x42000000 if ARCH_GEMINI @@ -1562,7 +1563,7 @@ config UNCOMPRESS_INCLUDE string default "debug/uncompress.h" if ARCH_MULTIPLATFORM || ARCH_MSM || \ PLAT_SAMSUNG || ARCH_EFM32 || \ - ARCH_SHMOBILE_LEGACY + ARCH_SHMOBILE_LEGACY || ARCH_LPC18XX default "mach/uncompress.h" config EARLY_PRINTK diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 985227cbbd1b..90ddf851aece 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -167,6 +167,7 @@ machine-$(CONFIG_ARCH_IOP33X) += iop33x machine-$(CONFIG_ARCH_IXP4XX) += ixp4xx machine-$(CONFIG_ARCH_KEYSTONE) += keystone machine-$(CONFIG_ARCH_KS8695) += ks8695 +machine-$(CONFIG_ARCH_LPC18XX) += lpc18xx machine-$(CONFIG_ARCH_LPC32XX) += lpc32xx machine-$(CONFIG_ARCH_MESON) += meson machine-$(CONFIG_ARCH_MMP) += mmp diff --git a/arch/arm/mach-lpc18xx/Makefile b/arch/arm/mach-lpc18xx/Makefile new file mode 100644 index 000000000000..bd0b7b5d6e9d --- /dev/null +++ b/arch/arm/mach-lpc18xx/Makefile @@ -0,0 +1 @@ +obj-y += board-dt.o diff --git a/arch/arm/mach-lpc18xx/Makefile.boot b/arch/arm/mach-lpc18xx/Makefile.boot new file mode 100644 index 000000000000..eacfc3f5c33e --- /dev/null +++ b/arch/arm/mach-lpc18xx/Makefile.boot @@ -0,0 +1,3 @@ +# Empty file waiting for deletion once Makefile.boot isn't needed any more. +# Patch waits for application at +# http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7889/1 . diff --git a/arch/arm/mach-lpc18xx/board-dt.c b/arch/arm/mach-lpc18xx/board-dt.c new file mode 100644 index 000000000000..fdcee78d1bc4 --- /dev/null +++ b/arch/arm/mach-lpc18xx/board-dt.c @@ -0,0 +1,22 @@ +/* + * Device Tree board file for NXP LPC18xx/43xx + * + * Copyright (C) 2015 Joachim Eastwood + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#include + +static const char *const lpc18xx_43xx_compat[] __initconst = { + "nxp,lpc1850", + "nxp,lpc4350", + "nxp,lpc4370", + NULL +}; + +DT_MACHINE_START(LPC18XXDT, "NXP LPC18xx/43xx (Device Tree)") + .dt_compat = lpc18xx_43xx_compat, +MACHINE_END