|
@@ -635,3 +635,130 @@ static struct platform_device isp116x_device = {
|
|
|
/* MTD */
|
|
|
static struct resource mtd_resources[] = {
|
|
|
[0] = { /* RedBoot config + filesystem flash */
|
|
|
+ .start = VIPER_FLASH_PHYS,
|
|
|
+ .end = VIPER_FLASH_PHYS + SZ_32M - 1,
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
+ },
|
|
|
+ [1] = { /* Boot flash */
|
|
|
+ .start = VIPER_BOOT_PHYS,
|
|
|
+ .end = VIPER_BOOT_PHYS + SZ_1M - 1,
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
+ },
|
|
|
+ [2] = { /*
|
|
|
+ * SRAM size is actually 256KB, 8bits, with a sparse mapping
|
|
|
+ * (each byte is on a 16bit boundary).
|
|
|
+ */
|
|
|
+ .start = _VIPER_SRAM_BASE,
|
|
|
+ .end = _VIPER_SRAM_BASE + SZ_512K - 1,
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+static struct mtd_partition viper_boot_flash_partition = {
|
|
|
+ .name = "RedBoot",
|
|
|
+ .size = SZ_1M,
|
|
|
+ .offset = 0,
|
|
|
+ .mask_flags = MTD_WRITEABLE, /* force R/O */
|
|
|
+};
|
|
|
+
|
|
|
+static struct physmap_flash_data viper_flash_data[] = {
|
|
|
+ [0] = {
|
|
|
+ .width = 2,
|
|
|
+ .parts = NULL,
|
|
|
+ .nr_parts = 0,
|
|
|
+ },
|
|
|
+ [1] = {
|
|
|
+ .width = 2,
|
|
|
+ .parts = &viper_boot_flash_partition,
|
|
|
+ .nr_parts = 1,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device viper_mtd_devices[] = {
|
|
|
+ [0] = {
|
|
|
+ .name = "physmap-flash",
|
|
|
+ .id = 0,
|
|
|
+ .dev = {
|
|
|
+ .platform_data = &viper_flash_data[0],
|
|
|
+ },
|
|
|
+ .resource = &mtd_resources[0],
|
|
|
+ .num_resources = 1,
|
|
|
+ },
|
|
|
+ [1] = {
|
|
|
+ .name = "physmap-flash",
|
|
|
+ .id = 1,
|
|
|
+ .dev = {
|
|
|
+ .platform_data = &viper_flash_data[1],
|
|
|
+ },
|
|
|
+ .resource = &mtd_resources[1],
|
|
|
+ .num_resources = 1,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device *viper_devs[] __initdata = {
|
|
|
+ &smc91x_device,
|
|
|
+ &i2c_bus_device,
|
|
|
+ &serial_device,
|
|
|
+ &isp116x_device,
|
|
|
+ &viper_mtd_devices[0],
|
|
|
+ &viper_mtd_devices[1],
|
|
|
+ &viper_backlight_device,
|
|
|
+ &viper_pcmcia_device,
|
|
|
+};
|
|
|
+
|
|
|
+static mfp_cfg_t viper_pin_config[] __initdata = {
|
|
|
+ /* Chip selects */
|
|
|
+ GPIO15_nCS_1,
|
|
|
+ GPIO78_nCS_2,
|
|
|
+ GPIO79_nCS_3,
|
|
|
+ GPIO80_nCS_4,
|
|
|
+ GPIO33_nCS_5,
|
|
|
+
|
|
|
+ /* AC97 */
|
|
|
+ GPIO28_AC97_BITCLK,
|
|
|
+ GPIO29_AC97_SDATA_IN_0,
|
|
|
+ GPIO30_AC97_SDATA_OUT,
|
|
|
+ GPIO31_AC97_SYNC,
|
|
|
+
|
|
|
+ /* FP Backlight */
|
|
|
+ GPIO9_GPIO, /* VIPER_BCKLIGHT_EN_GPIO */
|
|
|
+ GPIO10_GPIO, /* VIPER_LCD_EN_GPIO */
|
|
|
+ GPIO16_PWM0_OUT,
|
|
|
+
|
|
|
+ /* Ethernet PHY Ready */
|
|
|
+ GPIO18_RDY,
|
|
|
+
|
|
|
+ /* Serial shutdown */
|
|
|
+ GPIO12_GPIO | MFP_LPM_DRIVE_HIGH, /* VIPER_UART_SHDN_GPIO */
|
|
|
+
|
|
|
+ /* Compact-Flash / PC104 */
|
|
|
+ GPIO48_nPOE,
|
|
|
+ GPIO49_nPWE,
|
|
|
+ GPIO50_nPIOR,
|
|
|
+ GPIO51_nPIOW,
|
|
|
+ GPIO52_nPCE_1,
|
|
|
+ GPIO53_nPCE_2,
|
|
|
+ GPIO54_nPSKTSEL,
|
|
|
+ GPIO55_nPREG,
|
|
|
+ GPIO56_nPWAIT,
|
|
|
+ GPIO57_nIOIS16,
|
|
|
+ GPIO8_GPIO, /* VIPER_CF_RDY_GPIO */
|
|
|
+ GPIO32_GPIO, /* VIPER_CF_CD_GPIO */
|
|
|
+ GPIO82_GPIO, /* VIPER_CF_POWER_GPIO */
|
|
|
+
|
|
|
+ /* Integrated UPS control */
|
|
|
+ GPIO20_GPIO, /* VIPER_UPS_GPIO */
|
|
|
+
|
|
|
+ /* Vcc regulator control */
|
|
|
+ GPIO6_GPIO, /* VIPER_PSU_DATA_GPIO */
|
|
|
+ GPIO11_GPIO, /* VIPER_PSU_CLK_GPIO */
|
|
|
+ GPIO19_GPIO, /* VIPER_PSU_nCS_LD_GPIO */
|
|
|
+
|
|
|
+ /* i2c busses */
|
|
|
+ GPIO26_GPIO, /* VIPER_TPM_I2C_SDA_GPIO */
|
|
|
+ GPIO27_GPIO, /* VIPER_TPM_I2C_SCL_GPIO */
|
|
|
+ GPIO83_GPIO, /* VIPER_RTC_I2C_SDA_GPIO */
|
|
|
+ GPIO84_GPIO, /* VIPER_RTC_I2C_SCL_GPIO */
|
|
|
+
|
|
|
+ /* PC/104 Interrupt */
|
|
|
+ GPIO1_GPIO | WAKEUP_ON_EDGE_RISE, /* VIPER_CPLD_GPIO */
|