From ace9429bb58fd418f0c81d4c2835699bddf6bde6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 11 Apr 2024 10:27:49 +0200 Subject: Adding upstream version 6.6.15. Signed-off-by: Daniel Baumann --- arch/arm/mach-pxa/Kconfig | 174 +++++++ arch/arm/mach-pxa/Makefile | 32 ++ arch/arm/mach-pxa/addr-map.h | 61 +++ arch/arm/mach-pxa/am200epd.c | 395 +++++++++++++++ arch/arm/mach-pxa/am300epd.c | 296 +++++++++++ arch/arm/mach-pxa/devices.c | 723 ++++++++++++++++++++++++++ arch/arm/mach-pxa/devices.h | 69 +++ arch/arm/mach-pxa/generic.c | 113 +++++ arch/arm/mach-pxa/generic.h | 54 ++ arch/arm/mach-pxa/gumstix.c | 239 +++++++++ arch/arm/mach-pxa/gumstix.h | 89 ++++ arch/arm/mach-pxa/irq.c | 270 ++++++++++ arch/arm/mach-pxa/irqs.h | 109 ++++ arch/arm/mach-pxa/mfp-pxa25x.h | 193 +++++++ arch/arm/mach-pxa/mfp-pxa27x.h | 472 +++++++++++++++++ arch/arm/mach-pxa/mfp-pxa2xx.c | 434 ++++++++++++++++ arch/arm/mach-pxa/mfp-pxa2xx.h | 143 ++++++ arch/arm/mach-pxa/mfp-pxa300.h | 572 +++++++++++++++++++++ arch/arm/mach-pxa/mfp-pxa320.h | 458 +++++++++++++++++ arch/arm/mach-pxa/mfp-pxa3xx.c | 55 ++ arch/arm/mach-pxa/mfp-pxa3xx.h | 159 ++++++ arch/arm/mach-pxa/mfp.h | 18 + arch/arm/mach-pxa/pm.c | 115 +++++ arch/arm/mach-pxa/pm.h | 29 ++ arch/arm/mach-pxa/pxa-dt.c | 51 ++ arch/arm/mach-pxa/pxa-regs.h | 52 ++ arch/arm/mach-pxa/pxa25x.c | 256 ++++++++++ arch/arm/mach-pxa/pxa25x.h | 10 + arch/arm/mach-pxa/pxa27x-udc.h | 260 ++++++++++ arch/arm/mach-pxa/pxa27x.c | 359 +++++++++++++ arch/arm/mach-pxa/pxa27x.h | 23 + arch/arm/mach-pxa/pxa2xx-regs.h | 149 ++++++ arch/arm/mach-pxa/pxa2xx.c | 50 ++ arch/arm/mach-pxa/pxa300.c | 97 ++++ arch/arm/mach-pxa/pxa300.h | 8 + arch/arm/mach-pxa/pxa320.c | 88 ++++ arch/arm/mach-pxa/pxa320.h | 9 + arch/arm/mach-pxa/pxa3xx-regs.h | 134 +++++ arch/arm/mach-pxa/pxa3xx.c | 434 ++++++++++++++++ arch/arm/mach-pxa/pxa3xx.h | 9 + arch/arm/mach-pxa/regs-ost.h | 37 ++ arch/arm/mach-pxa/regs-rtc.h | 24 + arch/arm/mach-pxa/reset.c | 107 ++++ arch/arm/mach-pxa/reset.h | 22 + arch/arm/mach-pxa/sharpsl_pm.c | 941 ++++++++++++++++++++++++++++++++++ arch/arm/mach-pxa/sharpsl_pm.h | 108 ++++ arch/arm/mach-pxa/sleep.S | 172 +++++++ arch/arm/mach-pxa/smemc.c | 81 +++ arch/arm/mach-pxa/smemc.h | 72 +++ arch/arm/mach-pxa/spitz.c | 1071 +++++++++++++++++++++++++++++++++++++++ arch/arm/mach-pxa/spitz.h | 185 +++++++ arch/arm/mach-pxa/spitz_pm.c | 255 ++++++++++ arch/arm/mach-pxa/standby.S | 111 ++++ arch/arm/mach-pxa/udc.h | 8 + 54 files changed, 10455 insertions(+) create mode 100644 arch/arm/mach-pxa/Kconfig create mode 100644 arch/arm/mach-pxa/Makefile create mode 100644 arch/arm/mach-pxa/addr-map.h create mode 100644 arch/arm/mach-pxa/am200epd.c create mode 100644 arch/arm/mach-pxa/am300epd.c create mode 100644 arch/arm/mach-pxa/devices.c create mode 100644 arch/arm/mach-pxa/devices.h create mode 100644 arch/arm/mach-pxa/generic.c create mode 100644 arch/arm/mach-pxa/generic.h create mode 100644 arch/arm/mach-pxa/gumstix.c create mode 100644 arch/arm/mach-pxa/gumstix.h create mode 100644 arch/arm/mach-pxa/irq.c create mode 100644 arch/arm/mach-pxa/irqs.h create mode 100644 arch/arm/mach-pxa/mfp-pxa25x.h create mode 100644 arch/arm/mach-pxa/mfp-pxa27x.h create mode 100644 arch/arm/mach-pxa/mfp-pxa2xx.c create mode 100644 arch/arm/mach-pxa/mfp-pxa2xx.h create mode 100644 arch/arm/mach-pxa/mfp-pxa300.h create mode 100644 arch/arm/mach-pxa/mfp-pxa320.h create mode 100644 arch/arm/mach-pxa/mfp-pxa3xx.c create mode 100644 arch/arm/mach-pxa/mfp-pxa3xx.h create mode 100644 arch/arm/mach-pxa/mfp.h create mode 100644 arch/arm/mach-pxa/pm.c create mode 100644 arch/arm/mach-pxa/pm.h create mode 100644 arch/arm/mach-pxa/pxa-dt.c create mode 100644 arch/arm/mach-pxa/pxa-regs.h create mode 100644 arch/arm/mach-pxa/pxa25x.c create mode 100644 arch/arm/mach-pxa/pxa25x.h create mode 100644 arch/arm/mach-pxa/pxa27x-udc.h create mode 100644 arch/arm/mach-pxa/pxa27x.c create mode 100644 arch/arm/mach-pxa/pxa27x.h create mode 100644 arch/arm/mach-pxa/pxa2xx-regs.h create mode 100644 arch/arm/mach-pxa/pxa2xx.c create mode 100644 arch/arm/mach-pxa/pxa300.c create mode 100644 arch/arm/mach-pxa/pxa300.h create mode 100644 arch/arm/mach-pxa/pxa320.c create mode 100644 arch/arm/mach-pxa/pxa320.h create mode 100644 arch/arm/mach-pxa/pxa3xx-regs.h create mode 100644 arch/arm/mach-pxa/pxa3xx.c create mode 100644 arch/arm/mach-pxa/pxa3xx.h create mode 100644 arch/arm/mach-pxa/regs-ost.h create mode 100644 arch/arm/mach-pxa/regs-rtc.h create mode 100644 arch/arm/mach-pxa/reset.c create mode 100644 arch/arm/mach-pxa/reset.h create mode 100644 arch/arm/mach-pxa/sharpsl_pm.c create mode 100644 arch/arm/mach-pxa/sharpsl_pm.h create mode 100644 arch/arm/mach-pxa/sleep.S create mode 100644 arch/arm/mach-pxa/smemc.c create mode 100644 arch/arm/mach-pxa/smemc.h create mode 100644 arch/arm/mach-pxa/spitz.c create mode 100644 arch/arm/mach-pxa/spitz.h create mode 100644 arch/arm/mach-pxa/spitz_pm.c create mode 100644 arch/arm/mach-pxa/standby.S create mode 100644 arch/arm/mach-pxa/udc.h (limited to 'arch/arm/mach-pxa') diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig new file mode 100644 index 0000000000..10e472f4fa --- /dev/null +++ b/arch/arm/mach-pxa/Kconfig @@ -0,0 +1,174 @@ +# SPDX-License-Identifier: GPL-2.0-only +menuconfig ARCH_PXA + bool "PXA2xx/PXA3xx-based" + depends on ARCH_MULTI_V5 + depends on CPU_LITTLE_ENDIAN + select ARM_CPU_SUSPEND if PM + select CLKSRC_PXA + select CLKSRC_MMIO + select TIMER_OF + select CPU_XSCALE if !CPU_XSC3 + select GPIO_PXA + select GPIOLIB + select PLAT_PXA + help + Support for Intel/Marvell's PXA2xx/PXA3xx processor line. + +if ARCH_PXA + +config MACH_PXA25X_DT + bool "Support PXA25x platforms from device tree" + select PINCTRL + select POWER_SUPPLY + select PXA25x + select USE_OF + help + Include support for Marvell PXA25x based platforms using + the device tree. Needn't select any other machine while + MACH_PXA25x_DT is enabled. + +config MACH_PXA27X_DT + bool "Support PXA27x platforms from device tree" + select PINCTRL + select POWER_SUPPLY + select PXA27x + select USE_OF + help + Include support for Marvell PXA27x based platforms using + the device tree. Needn't select any other machine while + MACH_PXA27X_DT is enabled. + +config MACH_PXA3XX_DT + bool "Support PXA3xx platforms from device tree" + select CPU_PXA300 + select CPU_PXA310 + select CPU_PXA320 + select PINCTRL + select POWER_SUPPLY + select PXA3xx + select USE_OF + help + Include support for Marvell PXA3xx based platforms using + the device tree. Needn't select any other machine while + MACH_PXA3XX_DT is enabled. + +if ATAGS + +comment "Legacy board files" + +config ARCH_GUMSTIX + bool "Gumstix XScale 255 boards" + select PXA25x + help + Say Y here if you intend to run this kernel on + Basix, Connex, ws-200ax, ws-400ax systems + +choice + prompt "Gumstix Carrier/Expansion Board" + depends on ARCH_GUMSTIX + +config GUMSTIX_AM200EPD + bool "Enable AM200EPD board support" + +config GUMSTIX_AM300EPD + bool "Enable AM300EPD board support" + +endchoice + +config PXA_SHARPSL + bool "SHARP Zaurus SL-5600, SL-C7xx and SL-Cxx00 Models" + select SHARP_PARAM + select SHARP_SCOOP + help + Say Y here if you intend to run this kernel on a + Sharp Zaurus SL-5600 (Poodle), SL-C700 (Corgi), + SL-C750 (Shepherd), SL-C760 (Husky), SL-C1000 (Akita), + SL-C3000 (Spitz), SL-C3100 (Borzoi) or SL-C6000x (Tosa) + handheld computer. + +config PXA_SHARPSL_DETECT_MACH_ID + bool "Detect machine ID at run-time in the decompressor" + depends on PXA_SHARPSL + help + Say Y here if you want the zImage decompressor to detect + the Zaurus machine ID at run-time. For latest kexec-based + boot loader, this is not necessary. + +config MACH_AKITA + bool "Enable Sharp SL-1000 (Akita) Support" + depends on PXA_SHARPSL + select I2C + select I2C_PXA + select MACH_SPITZ + select PXA27x + select PXA_SHARP_Cxx00 + +config MACH_SPITZ + bool "Enable Sharp Zaurus SL-3000 (Spitz) Support" + depends on PXA_SHARPSL + select PXA27x + select PXA_SHARP_Cxx00 + +config MACH_BORZOI + bool "Enable Sharp Zaurus SL-3100 (Borzoi) Support" + depends on PXA_SHARPSL + select PXA27x + select PXA_SHARP_Cxx00 + +endif # ATAGS + +config PXA25x + bool + select CPU_XSCALE + help + Select code specific to PXA21x/25x/26x variants + +config PXA27x + bool + select CPU_XSCALE + help + Select code specific to PXA27x variants + +config PXA3xx + bool + select CPU_XSC3 + help + Select code specific to PXA3xx variants + +config CPU_PXA300 + bool + select PXA3xx + help + PXA300 (codename Monahans-L) + +config CPU_PXA310 + bool + select CPU_PXA300 + help + PXA310 (codename Monahans-LV) + +config CPU_PXA320 + bool + select PXA3xx + help + PXA320 (codename Monahans-P) + +config PXA_SHARP_Cxx00 + bool + select SHARPSL_PM + help + Enable common support for Sharp Cxx00 models + +config SHARPSL_PM + bool + select APM_EMULATION + select SHARPSL_PM_MAX1111 + +config SHARPSL_PM_MAX1111 + bool + select HWMON + select SENSORS_MAX1111 + select SPI + select SPI_MASTER + +endif diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile new file mode 100644 index 0000000000..faccdd3564 --- /dev/null +++ b/arch/arm/mach-pxa/Makefile @@ -0,0 +1,32 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Makefile for the linux kernel. +# + +# Common support (must be linked before board specific support) +obj-y += devices.o generic.o irq.o reset.o +obj-$(CONFIG_PM) += pm.o sleep.o standby.o + +# Generic drivers that other drivers may depend upon + +# SoC-specific code +obj-$(CONFIG_PXA25x) += mfp-pxa2xx.o pxa2xx.o pxa25x.o +obj-$(CONFIG_PXA27x) += mfp-pxa2xx.o pxa2xx.o pxa27x.o +obj-$(CONFIG_PXA3xx) += mfp-pxa3xx.o pxa3xx.o smemc.o +obj-$(CONFIG_CPU_PXA300) += pxa300.o +obj-$(CONFIG_CPU_PXA320) += pxa320.o + +# NOTE: keep the order of boards in accordance to their order in Kconfig + +# Device Tree support +obj-$(CONFIG_MACH_PXA25X_DT) += pxa-dt.o +obj-$(CONFIG_MACH_PXA27X_DT) += pxa-dt.o +obj-$(CONFIG_MACH_PXA3XX_DT) += pxa-dt.o + +# 3rd Party Dev Platforms +obj-$(CONFIG_ARCH_GUMSTIX) += gumstix.o +obj-$(CONFIG_GUMSTIX_AM200EPD) += am200epd.o +obj-$(CONFIG_GUMSTIX_AM300EPD) += am300epd.o + +# End-user Products +obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o sharpsl_pm.o spitz_pm.o diff --git a/arch/arm/mach-pxa/addr-map.h b/arch/arm/mach-pxa/addr-map.h new file mode 100644 index 0000000000..93cfe7dbfe --- /dev/null +++ b/arch/arm/mach-pxa/addr-map.h @@ -0,0 +1,61 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __ASM_MACH_ADDR_MAP_H +#define __ASM_MACH_ADDR_MAP_H + +/* + * Chip Selects + */ +#define PXA_CS0_PHYS 0x00000000 +#define PXA_CS1_PHYS 0x04000000 +#define PXA_CS2_PHYS 0x08000000 +#define PXA_CS3_PHYS 0x0C000000 +#define PXA_CS4_PHYS 0x10000000 +#define PXA_CS5_PHYS 0x14000000 + +#define PXA300_CS0_PHYS 0x00000000 /* PXA300/PXA310 _only_ */ +#define PXA300_CS1_PHYS 0x30000000 /* PXA300/PXA310 _only_ */ +#define PXA3xx_CS2_PHYS 0x10000000 +#define PXA3xx_CS3_PHYS 0x14000000 + +/* + * Peripheral Bus + */ +#define PERIPH_PHYS 0x40000000 +#define PERIPH_VIRT IOMEM(0xf2000000) +#define PERIPH_SIZE 0x02000000 + +/* + * Static Memory Controller (w/ SDRAM controls on PXA25x/PXA27x) + */ +#define PXA2XX_SMEMC_PHYS 0x48000000 +#define PXA3XX_SMEMC_PHYS 0x4a000000 +#define SMEMC_VIRT IOMEM(0xf6000000) +#define SMEMC_SIZE 0x00100000 + +/* + * Dynamic Memory Controller (only on PXA3xx) + */ +#define DMEMC_PHYS 0x48100000 +#define DMEMC_VIRT IOMEM(0xf6100000) +#define DMEMC_SIZE 0x00100000 + +/* + * Reserved space for low level debug virtual addresses within + * 0xf6200000..0xf6201000 + */ + +/* + * DFI Bus for NAND, PXA3xx only + */ +#define NAND_PHYS 0x43100000 +#define NAND_VIRT IOMEM(0xf6300000) +#define NAND_SIZE 0x00100000 + +/* + * Internal Memory Controller (PXA27x and later) + */ +#define IMEMC_PHYS 0x58000000 +#define IMEMC_VIRT IOMEM(0xfe000000) +#define IMEMC_SIZE 0x00100000 + +#endif /* __ASM_MACH_ADDR_MAP_H */ diff --git a/arch/arm/mach-pxa/am200epd.c b/arch/arm/mach-pxa/am200epd.c new file mode 100644 index 0000000000..cac0bb09db --- /dev/null +++ b/arch/arm/mach-pxa/am200epd.c @@ -0,0 +1,395 @@ +/* + * am200epd.c -- Platform device for AM200 EPD kit + * + * Copyright (C) 2008, Jaya Kumar + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file COPYING in the main directory of this archive for + * more details. + * + * Layout is based on skeletonfb.c by James Simmons and Geert Uytterhoeven. + * + * This work was made possible by help and equipment support from E-Ink + * Corporation. http://support.eink.com/community + * + * This driver is written to be used with the Metronome display controller. + * on the AM200 EPD prototype kit/development kit with an E-Ink 800x600 + * Vizplex EPD on a Gumstix board using the Lyre interface board. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "pxa25x.h" +#include "gumstix.h" +#include + +#include "generic.h" + +#include