^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/pcm027.c
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) * Support for the Phytec phyCORE-PXA270 CPU card (aka PCM-027).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) * Refer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) * http://www.phytec.com/products/sbc/ARM-XScale/phyCORE-XScale-PXA270.html
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) * for additional hardware info
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) * Author: Juergen Kilb
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) * Created: April 05, 2005
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) * Copyright: Phytec Messtechnik GmbH
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) * e-Mail: armlinux@phytec.de
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) * based on Intel Mainstone Board
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) * Copyright 2007 Juergen Beisert @ Pengutronix (j.beisert@pengutronix.de)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) #include <linux/irq.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #include <linux/platform_device.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) #include <linux/mtd/physmap.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) #include <linux/spi/spi.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) #include <linux/spi/max7301.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) #include <linux/spi/pxa2xx_spi.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) #include <linux/leds.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) #include <asm/mach-types.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) #include <asm/mach/arch.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) #include "pxa27x.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) #include "pcm027.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) #include "generic.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) * ABSTRACT:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) * The PXA270 processor comes with a bunch of hardware on its silicon.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) * Not all of this hardware can be used at the same time and not all
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) * is routed to module's connectors. Also it depends on the baseboard, what
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) * kind of hardware can be used in which way.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) * -> So this file supports the main devices on the CPU card only!
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) * Refer pcm990-baseboard.c how to extend this features to get a full
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) * blown system with many common interfaces.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) * The PCM-027 supports the following interfaces through its connectors and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) * will be used in pcm990-baseboard.c:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) * - LCD support
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) * - MMC support
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) * - IDE/CF card
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) * - FFUART
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) * - BTUART
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) * - IRUART
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) * - AC97
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) * - SSP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) * - SSP3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) * Claimed GPIOs:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) * GPIO0 -> IRQ input from RTC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) * GPIO2 -> SYS_ENA*)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) * GPIO3 -> PWR_SCL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) * GPIO4 -> PWR_SDA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) * GPIO5 -> PowerCap0*)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) * GPIO6 -> PowerCap1*)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) * GPIO7 -> PowerCap2*)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) * GPIO8 -> PowerCap3*)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) * GPIO15 -> /CS1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) * GPIO20 -> /CS2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) * GPIO21 -> /CS3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) * GPIO33 -> /CS5 network controller select
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) * GPIO52 -> IRQ from network controller
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) * GPIO78 -> /CS2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) * GPIO80 -> /CS4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) * GPIO90 -> LED0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) * GPIO91 -> LED1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) * GPIO114 -> IRQ from CAN controller
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) * GPIO117 -> SCL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) * GPIO118 -> SDA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) * *) CPU internal use only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) static unsigned long pcm027_pin_config[] __initdata = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) /* Chip Selects */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) GPIO20_nSDCS_2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) GPIO21_nSDCS_3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) GPIO15_nCS_1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) GPIO78_nCS_2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) GPIO80_nCS_4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) GPIO33_nCS_5, /* Ethernet */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) /* I2C */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) GPIO117_I2C_SCL,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) GPIO118_I2C_SDA,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) /* GPIO */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) GPIO52_GPIO, /* IRQ from network controller */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) #ifdef CONFIG_LEDS_GPIO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) GPIO90_GPIO, /* PCM027_LED_CPU */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) GPIO91_GPIO, /* PCM027_LED_HEART_BEAT */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) GPIO114_GPIO, /* IRQ from CAN controller */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) * SMC91x network controller specific stuff
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) static struct resource smc91x_resources[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) [0] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) .start = PCM027_ETH_PHYS + 0x300,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) .end = PCM027_ETH_PHYS + PCM027_ETH_SIZE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) .flags = IORESOURCE_MEM,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) [1] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) .start = PCM027_ETH_IRQ,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) .end = PCM027_ETH_IRQ,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) /* note: smc91x's driver doesn't use the trigger bits yet */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) .flags = IORESOURCE_IRQ | PCM027_ETH_IRQ_EDGE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) static struct platform_device smc91x_device = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) .name = "smc91x",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) .id = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) .num_resources = ARRAY_SIZE(smc91x_resources),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) .resource = smc91x_resources,
^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) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) * SPI host and devices
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) static struct pxa2xx_spi_controller pxa_ssp_master_info = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) .num_chipselect = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) static struct max7301_platform_data max7301_info = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) .base = -1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) /* bus_num must match id in pxa2xx_set_spi_info() call */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) static struct spi_board_info spi_board_info[] __initdata = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) .modalias = "max7301",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) .platform_data = &max7301_info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) .max_speed_hz = 13000000,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) .bus_num = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) .chip_select = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) .mode = SPI_MODE_0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) * NOR flash
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) static struct physmap_flash_data pcm027_flash_data = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) .width = 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) static struct resource pcm027_flash_resource = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) .start = PCM027_FLASH_PHYS,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) .end = PCM027_FLASH_PHYS + PCM027_FLASH_SIZE - 1 ,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) .flags = IORESOURCE_MEM,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) static struct platform_device pcm027_flash = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) .name = "physmap-flash",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) .id = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) .dev = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) .platform_data = &pcm027_flash_data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) .resource = &pcm027_flash_resource,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) .num_resources = 1,
^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) #ifdef CONFIG_LEDS_GPIO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) static struct gpio_led pcm027_led[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) .name = "led0:red", /* FIXME */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) .gpio = PCM027_LED_CPU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) .name = "led1:green", /* FIXME */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) .gpio = PCM027_LED_HEARD_BEAT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) static struct gpio_led_platform_data pcm027_led_data = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) .num_leds = ARRAY_SIZE(pcm027_led),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) .leds = pcm027_led
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) static struct platform_device pcm027_led_dev = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) .name = "leds-gpio",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) .id = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) .dev = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) .platform_data = &pcm027_led_data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) },
^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) #endif /* CONFIG_LEDS_GPIO */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) * declare the available device resources on this board
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) static struct platform_device *devices[] __initdata = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) &smc91x_device,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) &pcm027_flash,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) #ifdef CONFIG_LEDS_GPIO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) &pcm027_led_dev
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) * pcm027_init - breath some life into the board
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) static void __init pcm027_init(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) /* system bus arbiter setting
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) * - Core_Park
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) * - LCD_wt:DMA_wt:CORE_Wt = 2:3:4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) ARB_CNTRL = ARB_CORE_PARK | 0x234;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) pxa2xx_mfp_config(pcm027_pin_config, ARRAY_SIZE(pcm027_pin_config));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) pxa_set_ffuart_info(NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) pxa_set_btuart_info(NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) pxa_set_stuart_info(NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) platform_add_devices(devices, ARRAY_SIZE(devices));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) /* at last call the baseboard to initialize itself */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) #ifdef CONFIG_MACH_PCM990_BASEBOARD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) pcm990_baseboard_init();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) pxa2xx_set_spi_info(1, &pxa_ssp_master_info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) static void __init pcm027_map_io(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) pxa27x_map_io();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) /* initialize sleep mode regs (wake-up sources, etc) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) PGSR0 = 0x01308000;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) PGSR1 = 0x00CF0002;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) PGSR2 = 0x0E294000;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) PGSR3 = 0x0000C000;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) PWER = 0x40000000 | PWER_GPIO0 | PWER_GPIO1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) PRER = 0x00000000;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) PFER = 0x00000003;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) MACHINE_START(PCM027, "Phytec Messtechnik GmbH phyCORE-PXA270")
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) /* Maintainer: Pengutronix */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) .atag_offset = 0x100,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) .map_io = pcm027_map_io,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) .nr_irqs = PCM027_NR_IRQS,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) .init_irq = pxa27x_init_irq,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) .handle_irq = pxa27x_handle_irq,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) .init_time = pxa_timer_init,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) .init_machine = pcm027_init,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) .restart = pxa_restart,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) MACHINE_END