arm: Add Initial TI-Nspire support
Subsystems (4)
PATCH v2 1/2 arm: Add Initial TI-Nspire support
This patch adds support for the TI-Nspire platform.
Changes between v1 and v2:
* Added GENERIC_IRQ_CHIP to platform Kconfig
Signed-off-by Daniel Tang <[email protected]>
--- arch/arm/Kconfig | 2 + arch/arm/Kconfig.debug | 16 +++++ arch/arm/Makefile | 1 + arch/arm/include/debug/nspire.S | 28 +++++++++ arch/arm/mach-nspire/Kconfig | 16 +++++ arch/arm/mach-nspire/Makefile | 2 + arch/arm/mach-nspire/Makefile.boot | 0 arch/arm/mach-nspire/clcd.c | 119 +++++++++++++++++++++++++++++++++++++ arch/arm/mach-nspire/clcd.h | 14 +++++ arch/arm/mach-nspire/mmio.h | 20 +++++++ arch/arm/mach-nspire/nspire.c | 89 +++++++++++++++++++++++++++ 11 files changed, 307 insertions(+) create mode 100644 arch/arm/include/debug/nspire.S create mode 100644 arch/arm/mach-nspire/Kconfig create mode 100644 arch/arm/mach-nspire/Makefile create mode 100644 arch/arm/mach-nspire/Makefile.boot create mode 100644 arch/arm/mach-nspire/clcd.c create mode 100644 arch/arm/mach-nspire/clcd.h create mode 100644 arch/arm/mach-nspire/mmio.h create mode 100644 arch/arm/mach-nspire/nspire.c
arch/arm/Kconfig +2 -0
@@ -964,6 +964,8 @@ source "arch/arm/mach-netx/Kconfig" source "arch/arm/mach-nomadik/Kconfig" +source "arch/arm/mach-nspire/Kconfig" + source "arch/arm/plat-omap/Kconfig" source "arch/arm/mach-omap1/Kconfig"
arch/arm/Kconfig.debug +16 -0
@@ -309,6 +309,20 @@ choice Say Y here if you want kernel low-level debugging support on MVEBU based platforms. + config DEBUG_NSPIRE_CLASSIC_UART + bool "Kernel low-level debugging via TI-NSPIRE 8250 UART" + depends on ARCH_NSPIRE + help + Say Y here if you want kernel low-level debugging support + on TI-NSPIRE classic models. + + config DEBUG_NSPIRE_CX_UART + bool "Kernel low-level debugging via TI-NSPIRE PL011 UART" + depends on ARCH_NSPIRE + help + Say Y here if you want kernel low-level debugging support + on TI-NSPIRE CX models. + config DEBUG_NOMADIK_UART bool "Kernel low-level debugging messages via NOMADIK UART" depends on ARCH_NOMADIK
@@ -633,6 +647,8 @@ config DEBUG_LL_INCLUDE DEBUG_IMX53_UART ||\ DEBUG_IMX6Q_UART default "debug/mvebu.S" if DEBUG_MVEBU_UART + default "debug/nspire.S" if DEBUG_NSPIRE_CX_UART || \ + DEBUG_NSPIRE_CLASSIC_UART default "debug/mxs.S" if DEBUG_IMX23_UART || DEBUG_IMX28_UART default "debug/nomadik.S" if DEBUG_NOMADIK_UART default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART
arch/arm/Makefile +1 -0
@@ -164,6 +164,7 @@ machine-$(CONFIG_ARCH_MXS) += mxs machine-$(CONFIG_ARCH_MVEBU) += mvebu machine-$(CONFIG_ARCH_NETX) += netx machine-$(CONFIG_ARCH_NOMADIK) += nomadik +machine-$(CONFIG_ARCH_NSPIRE) += nspire machine-$(CONFIG_ARCH_OMAP1) += omap1 machine-$(CONFIG_ARCH_OMAP2PLUS) += omap2 machine-$(CONFIG_ARCH_ORION5X) += orion5x
arch/arm/include/debug/nspire.S new file +28 -0
@@ -0,0 +1,28 @@ +/* + * linux/arch/arm/include/debug/nspire.S + * + * Copyright (C) 2013 Daniel Tang <[email protected]> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2, as + * published by the Free Software Foundation. + * + */ + +#define NSPIRE_EARLY_UART_PHYS_BASE 0x90020000 +#define NSPIRE_EARLY_UART_VIRT_BASE 0xfee20000 + +.macro addruart, rp, rv, tmp + ldr \rp, =(NSPIRE_EARLY_UART_PHYS_BASE) @ physical base address + ldr \rv, =(NSPIRE_EARLY_UART_VIRT_BASE) @ virtual base address +.endm + + +#ifdef CONFIG_DEBUG_NSPIRE_CX_UART +#include <asm/hardware/debug-pl01x.S> +#endif + +#ifdef CONFIG_DEBUG_NSPIRE_CLASSIC_UART +#define UART_SHIFT 2 +#include <asm/hardware/debug-8250.S> +#endif
arch/arm/mach-nspire/Kconfig new file +16 -0
@@ -0,0 +1,16 @@ +config ARCH_NSPIRE + bool "TI-NSPIRE based" + depends on ARCH_MULTI_V4_V5 + depends on MMU + select CPU_ARM926T + select COMMON_CLK + select GENERIC_CLOCKEVENTS + select GENERIC_IRQ_CHIP + select SPARSE_IRQ + select ARM_AMBA + select ARM_VIC + select ARM_TIMER_SP804 + select USE_OF + select CLKSRC_OF + help + This enables support for systems using the TI-NSPIRE CPU
arch/arm/mach-nspire/Makefile new file +2 -0
@@ -0,0 +1,2 @@ +obj-y += nspire.o +obj-y += clcd.o
arch/arm/mach-nspire/Makefile.boot new file +0 -0
arch/arm/mach-nspire/clcd.c new file +119 -0
119 lines not on this page · raw message
arch/arm/mach-nspire/clcd.h new file +14 -0
@@ -0,0 +1,14 @@ +/* +* linux/arch/arm/mach-nspire/clcd.h +* +* Copyright (C) 2013 Daniel Tang <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2, as +* published by the Free Software Foundation. +* +*/ + +int nspire_clcd_setup (struct clcd_fb *fb); +int nspire_clcd_mmap (struct clcd_fb *fb,struct vm_area_struct *vma); +void nspire_clcd_remove (struct clcd_fb *fb);
arch/arm/mach-nspire/mmio.h new file +20 -0
@@ -0,0 +1,20 @@ +/* +* linux/arch/arm/mach-nspire/mmio.h +* +* Copyright (C) 2013 Daniel Tang <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2, as +* published by the Free Software Foundation. +* +*/ + +#define NSPIRE_MISC_PHYS_BASE 0x900A0000 +#define NSPIRE_MISC_HWRESET 0x08 + +#define NSPIRE_PWR_PHYS_BASE 0x900B0000 +#define NSPIRE_PWR_VIRT_BASE 0xFEEB0000 +#define NSPIRE_PWR_BUS_DISABLE1 0x18 +#define NSPIRE_PWR_BUS_DISABLE2 0x20 + +#define NSPIRE_LCD_PHYS_BASE 0xC0000000
arch/arm/mach-nspire/nspire.c new file +89 -0
89 lines not on this page · raw message
Signature · 1 line
1.8.1.3
PATCH v2 2/2 arm: Add device trees for TI-Nspire hardware
This patch adds device trees for describing the TI-Nspire hardware.
Changes between v1 and v2:
* Change "keymap" binding to the standard "linux,keymap" binding.
Signed-off-by Daniel Tang <[email protected]>
--- Documentation/devicetree/bindings/arm/nspire.txt | 14 ++ .../devicetree/bindings/vendor-prefixes.txt | 1 + arch/arm/boot/dts/Makefile | 3 + arch/arm/boot/dts/nspire-classic.dtsi | 74 +++++++++ arch/arm/boot/dts/nspire-clp.dts | 45 ++++++ arch/arm/boot/dts/nspire-cx.dts | 112 +++++++++++++ arch/arm/boot/dts/nspire-tp.dts | 44 ++++++ arch/arm/boot/dts/nspire.dtsi | 175 +++++++++++++++++++++ 8 files changed, 468 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/nspire.txt create mode 100644 arch/arm/boot/dts/nspire-classic.dtsi create mode 100644 arch/arm/boot/dts/nspire-clp.dts create mode 100644 arch/arm/boot/dts/nspire-cx.dts create mode 100644 arch/arm/boot/dts/nspire-tp.dts create mode 100644 arch/arm/boot/dts/nspire.dtsi
Documentation/devicetree/bindings/arm/nspire.txt new file +14 -0
@@ -0,0 +1,14 @@ +TI-NSPIRE calculators + +Required properties: +- compatible: Compatible property value should contain "ti,nspire". + CX models should have "ti,nspire-cx" + Touchpad models should have "ti,nspire-tp" + Clickpad models should have "ti,nspire-clp" + +Example: + +/ { + model = "TI-NSPIRE CX"; + compatible = "ti,nspire-cx"; + ...
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
@@ -31,6 +31,7 @@ idt Integrated Device Technologies, Inc. img Imagination Technologies Ltd. intercontrol Inter Control Group linux Linux-specific binding +lsi LSI Corp. (LSI Logic) marvell Marvell Technology Group Ltd. maxim Maxim Integrated Products mosaixtech Mosaix Technologies, Inc.
arch/arm/boot/dts/Makefile +3 -0
@@ -135,6 +135,9 @@ dtb-$(CONFIG_ARCH_MXS) += imx23-evk.dtb \ imx28-sps1.dtb \ imx28-tx28.dtb dtb-$(CONFIG_ARCH_NOMADIK) += ste-nomadik-s8815.dtb +dtb-$(CONFIG_ARCH_NSPIRE) += nspire-cx.dtb \ + nspire-tp.dtb \ + nspire-clp.dtb dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \ omap3430-sdp.dtb \ omap3-beagle.dtb \
arch/arm/boot/dts/nspire-classic.dtsi new file +74 -0
74 lines not on this page · raw message
arch/arm/boot/dts/nspire-clp.dts new file +45 -0
45 lines not on this page · raw message
arch/arm/boot/dts/nspire-cx.dts new file +112 -0
112 lines not on this page · raw message
arch/arm/boot/dts/nspire-tp.dts new file +44 -0
44 lines not on this page · raw message
arch/arm/boot/dts/nspire.dtsi new file +175 -0
175 lines not on this page · raw message
Signature · 1 line
1.8.1.3