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) 2011 Andrej Vlašić
7 * Copyright (C) 2011 Luka Perkov
11 #include <linux/init.h>
12 #include <linux/platform_device.h>
13 #include <linux/leds.h>
14 #include <linux/gpio.h>
15 #include <linux/gpio_buttons.h>
16 #include <linux/mtd/mtd.h>
17 #include <linux/mtd/partitions.h>
18 #include <linux/mtd/physmap.h>
19 #include <linux/input.h>
20 #include <linux/ath5k_platform.h>
21 #include <linux/pci.h>
22 #include <linux/phy.h>
26 #include <lantiq_soc.h>
27 #include <lantiq_platform.h>
29 #include "../machtypes.h"
30 #include "../dev-leds-gpio.h"
32 #include "dev-dwc_otg.h"
34 static struct mtd_partition gigasx76x_partitions
[] =
37 .name
= "secondary_env",
42 .name
= "secondary_boot",
57 .name
= "board_config",
63 static struct gpio_led
64 gigasx76x_leds_gpio
[] __initdata
= {
65 { .name
= "soc:green:usb", .gpio
= 202, },
66 { .name
= "soc:green:wlan", .gpio
= 203, },
67 { .name
= "soc:green:phone2", .gpio
= 204, },
68 { .name
= "soc:green:phone1", .gpio
= 205, },
69 { .name
= "soc:green:line", .gpio
= 206, },
70 { .name
= "soc:green:online", .gpio
= 207, },
74 static struct physmap_flash_data gigasx76x_flash_data
= {
75 .nr_parts
= ARRAY_SIZE(gigasx76x_partitions
),
76 .parts
= gigasx76x_partitions
,
79 static struct ltq_pci_data ltq_pci_data
= {
80 .clock
= PCI_CLOCK_INT
,
81 .gpio
= PCI_GNT1
| PCI_REQ1
,
83 [14] = INT_NUM_IM0_IRL0
+ 22,
87 static struct ltq_eth_data ltq_eth_data
= {
88 .mii_mode
= PHY_INTERFACE_MODE_MII
,
94 #define GIGASX76X_USB 29
96 ltq_register_gpio_stp();
97 ltq_register_nor(&gigasx76x_flash_data
);
98 ltq_register_pci(<q_pci_data
);
99 ltq_register_etop(<q_eth_data
);
100 xway_register_dwc(GIGASX76X_USB
);
102 ltq_register_madwifi_eep();
103 ltq_add_device_leds_gpio(-1, ARRAY_SIZE(gigasx76x_leds_gpio
), gigasx76x_leds_gpio
);
106 MIPS_MACHINE(LANTIQ_MACH_GIGASX76X
,
108 "GIGASX76X - Gigaset SX761,SX762,SX763",