Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) // SPDX-License-Identifier: GPL-2.0-only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3)  *  linux/arch/arm/mach-pxa/littleton.c
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  *  Support for the Marvell Littleton Development Platform.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7)  *  Author:	Jason Chagas (largely modified code)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8)  *  Created:	Nov 20, 2006
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9)  *  Copyright:	(C) Copyright 2006 Marvell International Ltd.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11)  *  2007-11-22  modified to align with latest kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12)  *              eric miao <eric.miao@marvell.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) #include <linux/init.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) #include <linux/interrupt.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) #include <linux/delay.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) #include <linux/platform_device.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) #include <linux/clk.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) #include <linux/gpio/machine.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) #include <linux/spi/spi.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) #include <linux/spi/pxa2xx_spi.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) #include <linux/smc91x.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) #include <linux/i2c.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) #include <linux/leds.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) #include <linux/mfd/da903x.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) #include <linux/platform_data/max732x.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) #include <linux/platform_data/i2c-pxa.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) #include <asm/types.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) #include <asm/setup.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) #include <asm/memory.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) #include <asm/mach-types.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) #include <mach/hardware.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) #include <asm/irq.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) #include <asm/mach/arch.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) #include <asm/mach/map.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) #include <asm/mach/irq.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) #include "pxa300.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) #include "devices.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) #include <linux/platform_data/video-pxafb.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) #include <linux/platform_data/mmc-pxamci.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) #include <linux/platform_data/keypad-pxa27x.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) #include "littleton.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) #include <linux/platform_data/mtd-nand-pxa3xx.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) #include "generic.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) /* Littleton MFP configurations */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) static mfp_cfg_t littleton_mfp_cfg[] __initdata = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 	/* LCD */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 	GPIO54_LCD_LDD_0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 	GPIO55_LCD_LDD_1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 	GPIO56_LCD_LDD_2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 	GPIO57_LCD_LDD_3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 	GPIO58_LCD_LDD_4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 	GPIO59_LCD_LDD_5,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 	GPIO60_LCD_LDD_6,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 	GPIO61_LCD_LDD_7,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 	GPIO62_LCD_LDD_8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 	GPIO63_LCD_LDD_9,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 	GPIO64_LCD_LDD_10,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 	GPIO65_LCD_LDD_11,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 	GPIO66_LCD_LDD_12,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 	GPIO67_LCD_LDD_13,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 	GPIO68_LCD_LDD_14,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 	GPIO69_LCD_LDD_15,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 	GPIO70_LCD_LDD_16,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 	GPIO71_LCD_LDD_17,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 	GPIO72_LCD_FCLK,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 	GPIO73_LCD_LCLK,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 	GPIO74_LCD_PCLK,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 	GPIO75_LCD_BIAS,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 	/* SSP2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 	GPIO25_SSP2_SCLK,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 	GPIO27_SSP2_TXD,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 	GPIO17_GPIO,	/* SFRM as chip-select */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 	/* Debug Ethernet */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 	GPIO90_GPIO,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 	/* Keypad */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 	GPIO107_KP_DKIN_0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 	GPIO108_KP_DKIN_1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 	GPIO115_KP_MKIN_0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 	GPIO116_KP_MKIN_1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 	GPIO117_KP_MKIN_2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 	GPIO118_KP_MKIN_3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 	GPIO119_KP_MKIN_4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 	GPIO120_KP_MKIN_5,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 	GPIO121_KP_MKOUT_0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 	GPIO122_KP_MKOUT_1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 	GPIO123_KP_MKOUT_2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 	GPIO124_KP_MKOUT_3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 	GPIO125_KP_MKOUT_4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	/* MMC1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 	GPIO3_MMC1_DAT0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 	GPIO4_MMC1_DAT1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 	GPIO5_MMC1_DAT2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 	GPIO6_MMC1_DAT3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 	GPIO7_MMC1_CLK,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 	GPIO8_MMC1_CMD,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 	GPIO15_GPIO, /* card detect */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 	/* UART3 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 	GPIO107_UART3_CTS,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 	GPIO108_UART3_RTS,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 	GPIO109_UART3_TXD,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 	GPIO110_UART3_RXD,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) static struct resource smc91x_resources[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 	[0] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 		.start	= (LITTLETON_ETH_PHYS + 0x300),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 		.end	= (LITTLETON_ETH_PHYS + 0xfffff),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 		.flags	= IORESOURCE_MEM,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 	[1] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 		.start	= PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO90)),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 		.end	= PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO90)),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) static struct smc91x_platdata littleton_smc91x_info = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 	.flags	= SMC91X_USE_8BIT | SMC91X_USE_16BIT |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 		  SMC91X_NOWAIT | SMC91X_USE_DMA,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) static struct platform_device smc91x_device = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 	.name		= "smc91x",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 	.id		= 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 	.num_resources	= ARRAY_SIZE(smc91x_resources),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 	.resource	= smc91x_resources,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 	.dev		= {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 		.platform_data = &littleton_smc91x_info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) static struct pxafb_mode_info tpo_tdo24mtea1_modes[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 	[0] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 		/* VGA */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 		.pixclock	= 38250,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 		.xres		= 480,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 		.yres		= 640,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 		.bpp		= 16,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 		.hsync_len	= 8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 		.left_margin	= 8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 		.right_margin	= 24,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 		.vsync_len	= 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 		.upper_margin	= 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 		.lower_margin	= 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 		.sync		= 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 	[1] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 		/* QVGA */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 		.pixclock	= 153000,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 		.xres		= 240,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 		.yres		= 320,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 		.bpp		= 16,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 		.hsync_len	= 8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 		.left_margin	= 8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 		.right_margin	= 88,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 		.vsync_len	= 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 		.upper_margin	= 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 		.lower_margin	= 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 		.sync		= 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) static struct pxafb_mach_info littleton_lcd_info = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 	.modes			= tpo_tdo24mtea1_modes,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 	.num_modes		= 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 	.lcd_conn		= LCD_COLOR_TFT_16BPP,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) static void __init littleton_init_lcd(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 	pxa_set_fb_info(NULL, &littleton_lcd_info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) static inline void littleton_init_lcd(void) {};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) #endif /* CONFIG_FB_PXA || CONFIG_FB_PXA_MODULE */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) #if defined(CONFIG_SPI_PXA2XX) || defined(CONFIG_SPI_PXA2XX_MODULE)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) static struct pxa2xx_spi_controller littleton_spi_info = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 	.num_chipselect		= 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) static struct pxa2xx_spi_chip littleton_tdo24m_chip = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 	.rx_threshold	= 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 	.tx_threshold	= 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 	.gpio_cs	= LITTLETON_GPIO_LCD_CS,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) static struct spi_board_info littleton_spi_devices[] __initdata = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 		.modalias	= "tdo24m",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 		.max_speed_hz	= 1000000,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 		.bus_num	= 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 		.chip_select	= 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 		.controller_data= &littleton_tdo24m_chip,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) static void __init littleton_init_spi(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 	pxa2xx_set_spi_info(2, &littleton_spi_info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 	spi_register_board_info(ARRAY_AND_SIZE(littleton_spi_devices));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) static inline void littleton_init_spi(void) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) #if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) static const unsigned int littleton_matrix_key_map[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 	/* KEY(row, col, key_code) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 	KEY(1, 3, KEY_0), KEY(0, 0, KEY_1), KEY(1, 0, KEY_2), KEY(2, 0, KEY_3),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 	KEY(0, 1, KEY_4), KEY(1, 1, KEY_5), KEY(2, 1, KEY_6), KEY(0, 2, KEY_7),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 	KEY(1, 2, KEY_8), KEY(2, 2, KEY_9),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) 	KEY(0, 3, KEY_KPASTERISK), 	/* * */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) 	KEY(2, 3, KEY_KPDOT), 		/* # */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) 	KEY(5, 4, KEY_ENTER),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) 	KEY(5, 0, KEY_UP),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) 	KEY(5, 1, KEY_DOWN),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) 	KEY(5, 2, KEY_LEFT),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) 	KEY(5, 3, KEY_RIGHT),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) 	KEY(3, 2, KEY_HOME),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) 	KEY(4, 1, KEY_END),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) 	KEY(3, 3, KEY_BACK),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) 	KEY(4, 0, KEY_SEND),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) 	KEY(4, 2, KEY_VOLUMEUP),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) 	KEY(4, 3, KEY_VOLUMEDOWN),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) 	KEY(3, 0, KEY_F22),	/* soft1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) 	KEY(3, 1, KEY_F23),	/* soft2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) static struct matrix_keymap_data littleton_matrix_keymap_data = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) 	.keymap			= littleton_matrix_key_map,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) 	.keymap_size		= ARRAY_SIZE(littleton_matrix_key_map),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) static struct pxa27x_keypad_platform_data littleton_keypad_info = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) 	.matrix_key_rows	= 6,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) 	.matrix_key_cols	= 5,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) 	.matrix_keymap_data	= &littleton_matrix_keymap_data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) 	.enable_rotary0		= 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) 	.rotary0_up_key		= KEY_UP,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) 	.rotary0_down_key	= KEY_DOWN,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) 	.debounce_interval	= 30,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) static void __init littleton_init_keypad(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) 	pxa_set_keypad_info(&littleton_keypad_info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) static inline void littleton_init_keypad(void) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) #if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) static struct pxamci_platform_data littleton_mci_platform_data = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) 	.detect_delay_ms	= 200,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) 	.ocr_mask		= MMC_VDD_32_33 | MMC_VDD_33_34,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) static struct gpiod_lookup_table littleton_mci_gpio_table = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) 	.dev_id = "pxa2xx-mci.0",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) 	.table = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) 		/* Card detect on MFP (gpio-pxa) GPIO 15 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) 		GPIO_LOOKUP("gpio-pxa", MFP_PIN_GPIO15,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) 			    "cd", GPIO_ACTIVE_LOW),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) 		{ },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) static void __init littleton_init_mmc(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) 	gpiod_add_lookup_table(&littleton_mci_gpio_table);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) 	pxa_set_mci_info(&littleton_mci_platform_data);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) static inline void littleton_init_mmc(void) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) #if IS_ENABLED(CONFIG_MTD_NAND_MARVELL)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) static struct mtd_partition littleton_nand_partitions[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) 	[0] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) 		.name        = "Bootloader",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) 		.offset      = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) 		.size        = 0x060000,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) 		.mask_flags  = MTD_WRITEABLE, /* force read-only */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) 	[1] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) 		.name        = "Kernel",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) 		.offset      = 0x060000,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) 		.size        = 0x200000,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) 		.mask_flags  = MTD_WRITEABLE, /* force read-only */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) 	[2] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) 		.name        = "Filesystem",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) 		.offset      = 0x0260000,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) 		.size        = 0x3000000,     /* 48M - rootfs */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) 	[3] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) 		.name        = "MassStorage",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) 		.offset      = 0x3260000,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) 		.size        = 0x3d40000,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) 	[4] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) 		.name        = "BBT",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) 		.offset      = 0x6FA0000,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) 		.size        = 0x80000,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) 		.mask_flags  = MTD_WRITEABLE,  /* force read-only */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) 	/* NOTE: we reserve some blocks at the end of the NAND flash for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) 	 * bad block management, and the max number of relocation blocks
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) 	 * differs on different platforms. Please take care with it when
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) 	 * defining the partition table.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) 	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) static struct pxa3xx_nand_platform_data littleton_nand_info = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) 	.parts		= littleton_nand_partitions,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) 	.nr_parts	= ARRAY_SIZE(littleton_nand_partitions),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) static void __init littleton_init_nand(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) 	pxa3xx_set_nand_info(&littleton_nand_info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) static inline void littleton_init_nand(void) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345) #endif /* IS_ENABLED(CONFIG_MTD_NAND_MARVELL) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) #if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) static struct led_info littleton_da9034_leds[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) 	[0] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350) 		.name	= "littleton:keypad1",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) 		.flags	= DA9034_LED_RAMP,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353) 	[1] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354) 		.name	= "littleton:keypad2",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) 		.flags	= DA9034_LED_RAMP,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) 	[2] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358) 		.name	= "littleton:vibra",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) 		.flags	= 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363) static struct da9034_touch_pdata littleton_da9034_touch = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) 	.x_inverted     = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) 	.interval_ms    = 20,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) static struct da903x_subdev_info littleton_da9034_subdevs[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370) 		.name		= "da903x-led",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) 		.id		= DA9034_ID_LED_1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) 		.platform_data	= &littleton_da9034_leds[0],
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373) 	}, {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) 		.name		= "da903x-led",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) 		.id		= DA9034_ID_LED_2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376) 		.platform_data	= &littleton_da9034_leds[1],
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377) 	}, {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) 		.name		= "da903x-led",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379) 		.id		= DA9034_ID_VIBRA,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) 		.platform_data	= &littleton_da9034_leds[2],
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) 	}, {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382) 		.name		= "da903x-backlight",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383) 		.id		= DA9034_ID_WLED,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) 	}, {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385) 		.name		= "da9034-touch",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386) 		.id		= DA9034_ID_TOUCH,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387) 		.platform_data	= &littleton_da9034_touch,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391) static struct da903x_platform_data littleton_da9034_info = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392) 	.num_subdevs	= ARRAY_SIZE(littleton_da9034_subdevs),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393) 	.subdevs	= littleton_da9034_subdevs,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396) static struct max732x_platform_data littleton_max7320_info = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397) 	.gpio_base	= EXT0_GPIO_BASE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400) static struct i2c_board_info littleton_i2c_info[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401) 	[0] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402) 		.type		= "da9034",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403) 		.addr		= 0x34,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404) 		.platform_data	= &littleton_da9034_info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405) 		.irq		= PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO18)),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407) 	[1] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408) 		.type		= "max7320",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409) 		.addr		= 0x50,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410) 		.platform_data	= &littleton_max7320_info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 412) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 413) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 414) static void __init littleton_init_i2c(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 415) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 416) 	pxa_set_i2c_info(NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 417) 	i2c_register_board_info(0, ARRAY_AND_SIZE(littleton_i2c_info));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 418) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 419) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 420) static inline void littleton_init_i2c(void) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 421) #endif /* CONFIG_I2C_PXA || CONFIG_I2C_PXA_MODULE */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 422) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 423) static void __init littleton_init(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 424) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 425) 	/* initialize MFP configurations */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 426) 	pxa3xx_mfp_config(ARRAY_AND_SIZE(littleton_mfp_cfg));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 427) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 428) 	pxa_set_ffuart_info(NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 429) 	pxa_set_btuart_info(NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 430) 	pxa_set_stuart_info(NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 431) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 432) 	/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 433) 	 * Note: we depend bootloader set the correct
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 434) 	 * value to MSC register for SMC91x.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 435) 	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 436) 	platform_device_register(&smc91x_device);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 437) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 438) 	littleton_init_spi();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 439) 	littleton_init_i2c();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 440) 	littleton_init_mmc();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 441) 	littleton_init_lcd();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 442) 	littleton_init_keypad();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 443) 	littleton_init_nand();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 444) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 445) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 446) MACHINE_START(LITTLETON, "Marvell Form Factor Development Platform (aka Littleton)")
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 447) 	.atag_offset	= 0x100,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 448) 	.map_io		= pxa3xx_map_io,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 449) 	.nr_irqs	= LITTLETON_NR_IRQS,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 450) 	.init_irq	= pxa3xx_init_irq,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 451) 	.handle_irq	= pxa3xx_handle_irq,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 452) 	.init_time	= pxa_timer_init,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 453) 	.init_machine	= littleton_init,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 454) 	.restart	= pxa_restart,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 455) MACHINE_END