ARM: lpc18xx: add basic support for NXP LPC18xx/43xx SoCs
authorJoachim Eastwood <manabian@gmail.com>
Mon, 11 May 2015 22:00:47 +0000 (00:00 +0200)
committerArnd Bergmann <arnd@arndb.de>
Fri, 15 May 2015 19:43:56 +0000 (21:43 +0200)
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 <manabian@gmail.com>
Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm/Kconfig
arch/arm/Kconfig.debug
arch/arm/Makefile
arch/arm/mach-lpc18xx/Makefile [new file with mode: 0644]
arch/arm/mach-lpc18xx/Makefile.boot [new file with mode: 0644]
arch/arm/mach-lpc18xx/board-dt.c [new file with mode: 0644]

index 99544479ab0140ffa6bd9982f15d4d43f009f162..16b47afb60f1b11c253d3f20e42b1c9ba7c7f4be 100644 (file)
@@ -586,6 +586,26 @@ config ARCH_W90X900
          <http://www.nuvoton.com/hq/enu/ProductAndSales/ProductLines/
                ConsumerElectronicsIC/ARMMicrocontroller/ARMMicrocontroller>
 
+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_LPC32XX
+       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
index 7ed976a719b3400154f638974235eded41c180c2..8e354a710d0b40aa35569be76acf3a9737d559b6 100644 (file)
@@ -1368,6 +1368,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
@@ -1574,7 +1575,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
index d7af1922f56f5cde454f5af5e0c50f4025f4c765..16bfd585585cd5ded6cb4c602d493e86e71a04c8 100644 (file)
@@ -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 (file)
index 0000000..bd0b7b5
--- /dev/null
@@ -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 (file)
index 0000000..eacfc3f
--- /dev/null
@@ -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 (file)
index 0000000..fdcee78
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Device Tree board file for NXP LPC18xx/43xx
+ *
+ * Copyright (C) 2015 Joachim Eastwood <manabian@gmail.com>
+ *
+ * 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 <asm/mach/arch.h>
+
+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