2 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU General Public License version 2 as published
4 * by the Free Software Foundation.
6 * Copyright (C) 2010 John Crispin <blogic@openwrt.org>
9 #include <linux/init.h>
10 #include <linux/platform_device.h>
11 #include <linux/mtd/mtd.h>
12 #include <linux/mtd/partitions.h>
13 #include <linux/mtd/physmap.h>
14 #include <linux/input.h>
15 #include <linux/phy.h>
16 #include <linux/spi/spi.h>
17 #include <linux/spi/flash.h>
19 #include <lantiq_soc.h>
22 #include "../machtypes.h"
24 #include "dev-dwc_otg.h"
26 static struct ltq_pci_data ltq_pci_data = {
27 .clock = PCI_CLOCK_INT,
28 .gpio = PCI_GNT1 | PCI_REQ1,
30 [14] = INT_NUM_IM0_IRL0 + 22,
34 static struct ltq_eth_data ltq_eth_data = {
35 .mii_mode = PHY_INTERFACE_MODE_MII,
38 static struct mtd_partition easy98000_nor_partitions[] =
48 .size = 0x40000, /* 2 sectors for redundant env. */
53 .size = 0xF80000, /* map only 16 MiB */
57 static struct flash_platform_data easy98000_spi_flash_platform_data = {
59 .parts = easy98000_nor_partitions,
60 .nr_parts = ARRAY_SIZE(easy98000_nor_partitions)
63 static struct spi_board_info spi_info __initdata = {
67 .max_speed_hz = 10 * 1000 * 1000,
69 .platform_data = &easy98000_spi_flash_platform_data
72 struct ltq_spi_platform_data ltq_spi_data = {
76 static void __init dgn3500_init(void)
78 ltq_register_pci(<q_pci_data);
79 ltq_register_etop(<q_eth_data);
80 ltq_register_spi(<q_spi_data, &spi_info, 1);
81 /* The usb power is always enabled, protected by a fuse */
82 xway_register_dwc(-1);
85 MIPS_MACHINE(LANTIQ_MACH_DGN3500B,