2010-12-13 00:57:16 +02:00
|
|
|
--- a/arch/mips/lantiq/xway/Kconfig
|
|
|
|
+++ b/arch/mips/lantiq/xway/Kconfig
|
2011-06-04 16:35:55 +03:00
|
|
|
@@ -6,6 +6,10 @@ config LANTIQ_MACH_EASY50712
|
2011-05-30 00:19:26 +03:00
|
|
|
bool "Easy50712 - Danube"
|
2010-12-13 00:57:16 +02:00
|
|
|
default y
|
|
|
|
|
|
|
|
+config LANTIQ_MACH_ARV45XX
|
|
|
|
+ bool "ARV45XX"
|
|
|
|
+ default y
|
|
|
|
+
|
|
|
|
endmenu
|
|
|
|
|
|
|
|
endif
|
|
|
|
--- a/arch/mips/lantiq/xway/Makefile
|
|
|
|
+++ b/arch/mips/lantiq/xway/Makefile
|
2011-06-04 16:35:55 +03:00
|
|
|
@@ -5,3 +5,4 @@ obj-$(CONFIG_SOC_AMAZON_SE) += clk-ase.o
|
2011-05-30 00:19:26 +03:00
|
|
|
|
2010-12-13 00:57:16 +02:00
|
|
|
obj-$(CONFIG_LANTIQ_MACH_EASY50712) += mach-easy50712.o
|
2011-05-30 00:19:26 +03:00
|
|
|
obj-$(CONFIG_LANTIQ_MACH_EASY50601) += mach-easy50601.o
|
2010-12-13 00:57:16 +02:00
|
|
|
+obj-$(CONFIG_LANTIQ_MACH_ARV45XX) += mach-arv45xx.o
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/arch/mips/lantiq/xway/mach-arv45xx.c
|
2011-05-30 00:19:26 +03:00
|
|
|
@@ -0,0 +1,504 @@
|
2010-12-13 00:57:16 +02:00
|
|
|
+/*
|
|
|
|
+ * This program is free software; you can redistribute it and/or modify it
|
|
|
|
+ * under the terms of the GNU General Public License version 2 as published
|
|
|
|
+ * by the Free Software Foundation.
|
|
|
|
+ *
|
|
|
|
+ * Copyright (C) 2010 John Crispin <blogic@openwrt.org>
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+#include <linux/init.h>
|
|
|
|
+#include <linux/platform_device.h>
|
|
|
|
+#include <linux/leds.h>
|
|
|
|
+#include <linux/gpio.h>
|
|
|
|
+#include <linux/gpio_buttons.h>
|
|
|
|
+#include <linux/mtd/mtd.h>
|
|
|
|
+#include <linux/mtd/partitions.h>
|
|
|
|
+#include <linux/mtd/physmap.h>
|
|
|
|
+#include <linux/input.h>
|
|
|
|
+#include <linux/etherdevice.h>
|
2011-02-05 00:49:52 +02:00
|
|
|
+#include <linux/ath5k_platform.h>
|
|
|
|
+#include <linux/pci.h>
|
2010-12-13 00:57:16 +02:00
|
|
|
+
|
2011-05-30 00:19:26 +03:00
|
|
|
+#include <lantiq_soc.h>
|
2010-12-13 00:57:16 +02:00
|
|
|
+#include <lantiq_platform.h>
|
|
|
|
+
|
2011-05-30 00:19:26 +03:00
|
|
|
+#include "../machtypes.h"
|
2010-12-13 00:57:16 +02:00
|
|
|
+#include "devices.h"
|
2011-05-30 00:19:26 +03:00
|
|
|
+#include "dev-leds-gpio.h"
|
2011-01-23 21:16:33 +02:00
|
|
|
+#include "dev-dwc_otg.h"
|
2010-12-13 00:57:16 +02:00
|
|
|
+
|
|
|
|
+#ifdef CONFIG_MTD_PARTITIONS
|
2011-03-14 09:33:23 +02:00
|
|
|
+static struct mtd_partition arv4510_partitions[] =
|
|
|
|
+{
|
|
|
|
+ {
|
|
|
|
+ .name = "uboot",
|
|
|
|
+ .offset = 0x0,
|
|
|
|
+ .size = 0x20000,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .name = "uboot_env",
|
|
|
|
+ .offset = 0x20000,
|
|
|
|
+ .size = 0x120000,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .name = "linux",
|
|
|
|
+ .offset = 0x40000,
|
|
|
|
+ .size = 0xfa0000,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .name = "board_config",
|
|
|
|
+ .offset = 0xfe0000,
|
|
|
|
+ .size = 0x20000,
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+
|
2010-12-13 00:57:16 +02:00
|
|
|
+static struct mtd_partition arv45xx_partitions[] =
|
|
|
|
+{
|
|
|
|
+ {
|
|
|
|
+ .name = "uboot",
|
|
|
|
+ .offset = 0x0,
|
2011-03-14 09:33:23 +02:00
|
|
|
+ .size = 0x20000,
|
2010-12-13 00:57:16 +02:00
|
|
|
+ },
|
|
|
|
+ {
|
2011-01-23 21:16:33 +02:00
|
|
|
+ .name = "uboot_env",
|
2011-03-14 09:33:23 +02:00
|
|
|
+ .offset = 0x20000,
|
2011-01-23 21:16:33 +02:00
|
|
|
+ .size = 0x10000,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .name = "linux",
|
2011-03-14 09:33:23 +02:00
|
|
|
+ .offset = 0x30000,
|
|
|
|
+ .size = 0x3c0000,
|
2011-01-23 21:16:33 +02:00
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .name = "board_config",
|
|
|
|
+ .offset = 0x3f0000,
|
|
|
|
+ .size = 0x10000,
|
|
|
|
+ },
|
2010-12-13 00:57:16 +02:00
|
|
|
+};
|
|
|
|
+
|
2011-01-23 14:08:44 +02:00
|
|
|
+static struct mtd_partition arv75xx_partitions[] =
|
|
|
|
+{
|
|
|
|
+ {
|
|
|
|
+ .name = "uboot",
|
|
|
|
+ .offset = 0x0,
|
2011-03-11 10:19:53 +02:00
|
|
|
+ .size = 0x10000,
|
2011-01-23 14:08:44 +02:00
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .name = "uboot_env",
|
2011-03-11 10:19:53 +02:00
|
|
|
+ .offset = 0x10000,
|
2011-01-23 14:08:44 +02:00
|
|
|
+ .size = 0x10000,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .name = "linux",
|
2011-03-11 10:19:53 +02:00
|
|
|
+ .offset = 0x20000,
|
|
|
|
+ .size = 0x7d0000,
|
2011-01-23 14:08:44 +02:00
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .name = "board_config",
|
|
|
|
+ .offset = 0x7f0000,
|
|
|
|
+ .size = 0x10000,
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+
|
2011-01-23 21:16:33 +02:00
|
|
|
+#endif
|
|
|
|
+
|
2011-03-14 09:33:23 +02:00
|
|
|
+static struct physmap_flash_data arv4510_flash_data = {
|
|
|
|
+#ifdef CONFIG_MTD_PARTITIONS
|
|
|
|
+ .nr_parts = ARRAY_SIZE(arv4510_partitions),
|
|
|
|
+ .parts = arv4510_partitions,
|
|
|
|
+#endif
|
|
|
|
+};
|
|
|
|
+
|
2011-01-23 21:16:33 +02:00
|
|
|
+static struct physmap_flash_data arv45xx_flash_data = {
|
|
|
|
+#ifdef CONFIG_MTD_PARTITIONS
|
|
|
|
+ .nr_parts = ARRAY_SIZE(arv45xx_partitions),
|
|
|
|
+ .parts = arv45xx_partitions,
|
|
|
|
+#endif
|
|
|
|
+};
|
|
|
|
+
|
2011-01-23 14:08:44 +02:00
|
|
|
+static struct physmap_flash_data arv75xx_flash_data = {
|
|
|
|
+#ifdef CONFIG_MTD_PARTITIONS
|
|
|
|
+ .nr_parts = ARRAY_SIZE(arv75xx_partitions),
|
|
|
|
+ .parts = arv75xx_partitions,
|
|
|
|
+#endif
|
|
|
|
+};
|
|
|
|
+
|
2011-05-30 00:19:26 +03:00
|
|
|
+static struct ltq_pci_data ltq_pci_data = {
|
|
|
|
+ .clock = PCI_CLOCK_EXT,
|
2011-01-23 14:08:44 +02:00
|
|
|
+ .gpio = PCI_GNT1 | PCI_REQ1,
|
|
|
|
+ .irq = {
|
|
|
|
+ [14] = INT_NUM_IM0_IRL0 + 22,
|
|
|
|
+ },
|
2010-12-13 00:57:16 +02:00
|
|
|
+};
|
|
|
|
+
|
2011-05-30 00:19:26 +03:00
|
|
|
+static struct ltq_eth_data ltq_eth_data = {
|
|
|
|
+ .mii_mode = PHY_INTERFACE_MODE_RMII,
|
2010-12-13 00:57:16 +02:00
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct gpio_led
|
2011-01-23 21:16:33 +02:00
|
|
|
+arv4510pw_leds_gpio[] __initdata = {
|
|
|
|
+ { .name = "soc:green:foo", .gpio = 4, .active_low = 1, },
|
2010-12-13 00:57:16 +02:00
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct gpio_led
|
2011-01-23 21:16:33 +02:00
|
|
|
+arv4518pw_leds_gpio[] __initdata = {
|
|
|
|
+ { .name = "soc:green:power", .gpio = 3, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:green:adsl", .gpio = 4, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:green:internet", .gpio = 5, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:green:wlan", .gpio = 6, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:yellow:wps", .gpio = 7, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:red:fail", .gpio = 8, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:green:usb", .gpio = 19, .active_low = 1, .default_trigger = "default-on" },
|
2011-05-30 00:19:26 +03:00
|
|
|
+ { .name = "soc:green:voip", .gpio = 72, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:green:fxs1", .gpio = 73, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:green:fxs2", .gpio = 74, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:green:fxo", .gpio = 75, .active_low = 1, .default_trigger = "default-on" },
|
2011-01-23 21:16:33 +02:00
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct gpio_button
|
|
|
|
+arv4518pw_gpio_buttons[] __initdata = {
|
|
|
|
+ { .desc = "wlan", .type = EV_KEY, .code = BTN_0, .threshold = 3, .gpio = 28, .active_low = 1, },
|
|
|
|
+ { .desc = "wps", .type = EV_KEY, .code = BTN_1, .threshold = 3, .gpio = 29, .active_low = 1, },
|
|
|
|
+ { .desc = "reset", .type = EV_KEY, .code = BTN_2, .threshold = 3, .gpio = 30, .active_low = 1, },
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct gpio_led
|
|
|
|
+arv4520pw_leds_gpio[] __initdata = {
|
2010-12-13 00:57:16 +02:00
|
|
|
+ { .name = "soc:blue:power", .gpio = 3, .active_low = 1, },
|
|
|
|
+ { .name = "soc:blue:adsl", .gpio = 4, .active_low = 1, },
|
|
|
|
+ { .name = "soc:blue:internet", .gpio = 5, .active_low = 1, },
|
|
|
|
+ { .name = "soc:red:power", .gpio = 6, .active_low = 1, },
|
2011-02-01 16:37:35 +02:00
|
|
|
+ { .name = "soc:yellow:wps", .gpio = 7, .active_low = 1, },
|
2010-12-13 00:57:16 +02:00
|
|
|
+ { .name = "soc:red:wps", .gpio = 9, .active_low = 1, },
|
2011-05-30 00:19:26 +03:00
|
|
|
+ { .name = "soc:blue:voip", .gpio = 72, .active_low = 1, },
|
|
|
|
+ { .name = "soc:blue:fxs1", .gpio = 73, .active_low = 1, },
|
|
|
|
+ { .name = "soc:blue:fxs2", .gpio = 74, .active_low = 1, },
|
|
|
|
+ { .name = "soc:blue:fxo", .gpio = 75, .active_low = 1, },
|
|
|
|
+ { .name = "soc:blue:voice", .gpio = 76, .active_low = 1, },
|
|
|
|
+ { .name = "soc:blue:usb", .gpio = 77, .active_low = 1, },
|
|
|
|
+ { .name = "soc:blue:wlan", .gpio = 78, .active_low = 1, },
|
2010-12-13 00:57:16 +02:00
|
|
|
+};
|
|
|
|
+
|
2011-01-23 21:16:33 +02:00
|
|
|
+static struct gpio_led
|
2011-02-01 16:37:35 +02:00
|
|
|
+arv452cpw_leds_gpio[] __initdata = {
|
|
|
|
+ { .name = "soc:blue:power", .gpio = 3, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:blue:adsl", .gpio = 4, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:blue:isdn", .gpio = 5, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:red:power", .gpio = 6, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:yellow:wps", .gpio = 7, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:red:wps", .gpio = 9, .active_low = 1, .default_trigger = "default-on" },
|
2011-05-30 00:19:26 +03:00
|
|
|
+ { .name = "soc:blue:fxs1", .gpio = 72, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:blue:fxs2", .gpio = 73, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:blue:wps", .gpio = 74, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:blue:fxo", .gpio = 75, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:blue:voice", .gpio = 76, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:blue:usb", .gpio = 77, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:blue:wlan", .gpio = 78, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:blue:internet", .gpio = 80, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:red:internet", .gpio = 81, .active_low = 1, .default_trigger = "default-on" },
|
2011-02-01 16:37:35 +02:00
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct gpio_led
|
2011-01-23 21:16:33 +02:00
|
|
|
+arv4525pw_leds_gpio[] __initdata = {
|
|
|
|
+ { .name = "soc:green:festnetz", .gpio = 4, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:green:internet", .gpio = 5, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:green:dsl", .gpio = 6, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:green:wlan", .gpio = 8, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:green:online", .gpio = 9, .active_low = 1, .default_trigger = "default-on" },
|
2010-12-13 00:57:16 +02:00
|
|
|
+};
|
|
|
|
+
|
2011-01-23 14:08:44 +02:00
|
|
|
+static struct gpio_led
|
2011-02-01 16:37:35 +02:00
|
|
|
+arv752dpw22_leds_gpio[] __initdata = {
|
2011-01-23 14:08:44 +02:00
|
|
|
+ { .name = "soc:blue:power", .gpio = 3, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:red:internet", .gpio = 5, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:red:power", .gpio = 6, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:red:wps", .gpio = 8, .active_low = 1, .default_trigger = "default-on" },
|
2011-05-30 00:19:26 +03:00
|
|
|
+ { .name = "soc:red:fxo", .gpio = 75, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:red:voice", .gpio = 76, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:green:usb", .gpio = 77, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:green:wlan", .gpio = 78, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:green:wlan1", .gpio = 79, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:blue:wlan", .gpio = 80, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:blue:wlan1", .gpio = 81, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:green:eth1", .gpio = 83, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:green:eth2", .gpio = 84, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:green:eth3", .gpio = 85, .active_low = 1, .default_trigger = "default-on" },
|
|
|
|
+ { .name = "soc:green:eth4", .gpio = 86, .active_low = 1, .default_trigger = "default-on", },
|
2011-01-23 14:08:44 +02:00
|
|
|
+};
|
|
|
|
+
|
2011-01-23 21:16:33 +02:00
|
|
|
+static struct gpio_button
|
2011-02-01 16:37:35 +02:00
|
|
|
+arv752dpw22_gpio_buttons[] __initdata = {
|
2011-01-23 21:16:33 +02:00
|
|
|
+ { .desc = "btn0", .type = EV_KEY, .code = BTN_0, .threshold = 3, .gpio = 12, .active_low = 1, },
|
|
|
|
+ { .desc = "btn1", .type = EV_KEY, .code = BTN_1, .threshold = 3, .gpio = 13, .active_low = 1, },
|
|
|
|
+ { .desc = "btn2", .type = EV_KEY, .code = BTN_2, .threshold = 3, .gpio = 28, .active_low = 1, },
|
|
|
|
+};
|
|
|
|
+
|
2011-01-23 14:51:15 +02:00
|
|
|
+static struct gpio_led
|
|
|
|
+arv7518pw_leds_gpio[] __initdata = {
|
|
|
|
+ { .name = "soc:green:power", .gpio = 2, .active_low = 1, },
|
|
|
|
+ { .name = "soc:green:adsl", .gpio = 4, .active_low = 1, },
|
|
|
|
+ { .name = "soc:green:internet", .gpio = 5, .active_low = 1, },
|
|
|
|
+ { .name = "soc:green:wlan", .gpio = 6, .active_low = 1, },
|
2011-02-01 16:37:35 +02:00
|
|
|
+ { .name = "soc:red:internet", .gpio = 8, .active_low = 1, },
|
2011-01-23 14:51:15 +02:00
|
|
|
+ { .name = "soc:green:usb", .gpio = 19, .active_low = 1, },
|
|
|
|
+};
|
|
|
|
+
|
2011-02-01 16:37:35 +02:00
|
|
|
+static struct gpio_button
|
|
|
|
+arv7518pw_gpio_buttons[] __initdata = {
|
|
|
|
+ { .desc = "reset", .type = EV_KEY, .code = BTN_0, .threshold = 3, .gpio = 23, .active_low = 1, },
|
|
|
|
+ { .desc = "wlan", .type = EV_KEY, .code = BTN_1, .threshold = 3, .gpio = 25, .active_low = 1, },
|
|
|
|
+};
|
|
|
|
+
|
2010-12-13 00:57:16 +02:00
|
|
|
+static void
|
|
|
|
+arv45xx_register_ethernet(void)
|
|
|
|
+{
|
|
|
|
+#define ARV45XX_BRN_MAC 0x3f0016
|
2011-06-14 01:37:23 +03:00
|
|
|
+ memcpy_fromio(<q_eth_data.mac.sa_data,
|
2011-05-30 00:19:26 +03:00
|
|
|
+ (void *)KSEG1ADDR(LTQ_FLASH_START + ARV45XX_BRN_MAC), 6);
|
|
|
|
+ ltq_register_etop(<q_eth_data);
|
2010-12-13 00:57:16 +02:00
|
|
|
+}
|
|
|
|
+
|
2011-01-23 14:08:44 +02:00
|
|
|
+static void
|
|
|
|
+arv75xx_register_ethernet(void)
|
|
|
|
+{
|
|
|
|
+#define ARV75XX_BRN_MAC 0x7f0016
|
2011-06-14 01:37:23 +03:00
|
|
|
+ memcpy_fromio(<q_eth_data.mac.sa_data,
|
2011-05-30 00:19:26 +03:00
|
|
|
+ (void *)KSEG1ADDR(LTQ_FLASH_START + ARV75XX_BRN_MAC), 6);
|
|
|
|
+ ltq_register_etop(<q_eth_data);
|
2011-01-23 14:08:44 +02:00
|
|
|
+}
|
|
|
|
+
|
2011-01-23 21:16:33 +02:00
|
|
|
+static void
|
|
|
|
+bewan_register_ethernet(void)
|
|
|
|
+{
|
|
|
|
+#define BEWAN_BRN_MAC 0x3f0014
|
2011-06-14 01:37:23 +03:00
|
|
|
+ memcpy_fromio(<q_eth_data.mac.sa_data,
|
2011-05-30 00:19:26 +03:00
|
|
|
+ (void *)KSEG1ADDR(LTQ_FLASH_START + BEWAN_BRN_MAC), 6);
|
|
|
|
+ ltq_register_etop(<q_eth_data);
|
2011-01-23 21:16:33 +02:00
|
|
|
+}
|
|
|
|
+
|
2011-02-05 00:49:52 +02:00
|
|
|
+static u16 arv45xx_ath5k_eeprom_data[ATH5K_PLAT_EEP_MAX_WORDS];
|
|
|
|
+static struct ath5k_platform_data arv45xx_ath5k_platform_data;
|
|
|
|
+
|
2011-05-30 00:19:26 +03:00
|
|
|
+/*static int arv45xx_pci_plat_dev_init(struct pci_dev *dev)
|
2011-02-05 00:49:52 +02:00
|
|
|
+{
|
|
|
|
+ dev->dev.platform_data = &arv45xx_ath5k_platform_data;
|
|
|
|
+ return 0;
|
|
|
|
+}
|
2011-05-30 00:19:26 +03:00
|
|
|
+*/
|
2011-02-05 00:49:52 +02:00
|
|
|
+void __init
|
|
|
|
+arv45xx_register_ath5k(void)
|
|
|
|
+{
|
|
|
|
+#define ARV45XX_BRN_ATH 0x3f0478
|
|
|
|
+ int i;
|
|
|
|
+ unsigned char eeprom_mac[6];
|
2011-03-11 10:19:53 +02:00
|
|
|
+ static u16 eeprom_data[ATH5K_PLAT_EEP_MAX_WORDS];
|
2011-02-05 00:49:52 +02:00
|
|
|
+ u32 *p = (u32*)arv45xx_ath5k_eeprom_data;
|
|
|
|
+
|
|
|
|
+ memcpy_fromio(eeprom_mac,
|
2011-05-30 00:19:26 +03:00
|
|
|
+ (void *)KSEG1ADDR(LTQ_FLASH_START + ARV45XX_BRN_MAC), 6);
|
2011-02-05 00:49:52 +02:00
|
|
|
+ eeprom_mac[5]++;
|
|
|
|
+ memcpy_fromio(arv45xx_ath5k_eeprom_data,
|
2011-05-30 00:19:26 +03:00
|
|
|
+ (void *)KSEG1ADDR(LTQ_FLASH_START + ARV45XX_BRN_ATH), ATH5K_PLAT_EEP_MAX_WORDS);
|
2011-02-05 00:49:52 +02:00
|
|
|
+ // swap eeprom bytes
|
|
|
|
+ for (i = 0; i < ATH5K_PLAT_EEP_MAX_WORDS>>1; i++){
|
|
|
|
+ //arv4518_ath5k_eeprom_data[i] = ((eeprom_data[i]&0xff)<<8)|((eeprom_data[i]&0xff00)>>8);
|
|
|
|
+ p[i] = ((eeprom_data[(i<<1)+1]&0xff)<<24)|((eeprom_data[(i<<1)+1]&0xff00)<<8)|((eeprom_data[i<<1]&0xff)<<8)|((eeprom_data[i<<1]&0xff00)>>8);
|
|
|
|
+ if (i == 0xbf>>1){
|
|
|
|
+ // printk ("regdomain: 0x%x --> 0x%x\n", p[i], (p[i] & 0xffff0000)|0x67);
|
|
|
|
+ /* regdomain is invalid?? how did original fw convert
|
|
|
|
+ * value to 0x82d4 ??
|
|
|
|
+ * for now, force to 0x67 */
|
|
|
|
+ p[i] &= 0xffff0000;
|
|
|
|
+ p[i] |= 0x67;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ arv45xx_ath5k_platform_data.eeprom_data = arv45xx_ath5k_eeprom_data;
|
|
|
|
+ arv45xx_ath5k_platform_data.macaddr = eeprom_mac;
|
2011-05-30 00:19:26 +03:00
|
|
|
+ //lqpci_plat_dev_init = arv45xx_pci_plat_dev_init;
|
2011-02-05 00:49:52 +02:00
|
|
|
+}
|
|
|
|
+
|
2010-12-13 00:57:16 +02:00
|
|
|
+static void __init
|
2011-03-11 10:19:53 +02:00
|
|
|
+arv3527p_init(void)
|
|
|
|
+{
|
2011-05-30 00:19:26 +03:00
|
|
|
+ ltq_register_gpio_stp();
|
|
|
|
+ //ltq_add_device_leds_gpio(arv3527p_leds_gpio, ARRAY_SIZE(arv3527p_leds_gpio));
|
|
|
|
+ ltq_register_nor(&arv45xx_flash_data);
|
2011-03-11 10:19:53 +02:00
|
|
|
+ arv45xx_register_ethernet();
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+MIPS_MACHINE(LANTIQ_MACH_ARV3527P,
|
|
|
|
+ "ARV3527P",
|
|
|
|
+ "ARV3527P - Arcor Easybox 401",
|
|
|
|
+ arv3527p_init);
|
|
|
|
+
|
|
|
|
+static void __init
|
2011-01-23 21:16:33 +02:00
|
|
|
+arv4510pw_init(void)
|
2010-12-13 00:57:16 +02:00
|
|
|
+{
|
2011-05-30 00:19:26 +03:00
|
|
|
+ ltq_register_gpio_stp();
|
|
|
|
+ ltq_add_device_leds_gpio(-1, ARRAY_SIZE(arv4510pw_leds_gpio), arv4510pw_leds_gpio);
|
|
|
|
+ ltq_register_nor(&arv4510_flash_data);
|
|
|
|
+ ltq_pci_data.irq[12] = (INT_NUM_IM2_IRL0 + 31);
|
|
|
|
+ ltq_pci_data.irq[15] = (INT_NUM_IM0_IRL0 + 26);
|
|
|
|
+ ltq_pci_data.gpio |= PCI_EXIN2 | PCI_REQ2;
|
|
|
|
+ ltq_register_pci(<q_pci_data);
|
2011-01-23 21:16:33 +02:00
|
|
|
+ bewan_register_ethernet();
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+MIPS_MACHINE(LANTIQ_MACH_ARV4510PW,
|
|
|
|
+ "ARV4510PW",
|
|
|
|
+ "ARV4510PW - Wippies Homebox",
|
|
|
|
+ arv4510pw_init);
|
|
|
|
+
|
|
|
|
+static void __init
|
|
|
|
+arv4518pw_init(void)
|
|
|
|
+{
|
2011-02-01 16:37:35 +02:00
|
|
|
+#define ARV4518PW_EBU 0
|
|
|
|
+#define ARV4518PW_USB 14
|
|
|
|
+#define ARV4518PW_SWITCH_RESET 13
|
|
|
|
+
|
2011-05-30 00:19:26 +03:00
|
|
|
+ ltq_register_gpio_ebu(ARV4518PW_EBU);
|
|
|
|
+ ltq_add_device_leds_gpio(-1, ARRAY_SIZE(arv4518pw_leds_gpio), arv4518pw_leds_gpio);
|
|
|
|
+ ltq_register_gpio_buttons(arv4518pw_gpio_buttons, ARRAY_SIZE(arv4518pw_gpio_buttons));
|
|
|
|
+ ltq_register_nor(&arv45xx_flash_data);
|
|
|
|
+ ltq_pci_data.gpio = PCI_GNT2 | PCI_REQ2;
|
|
|
|
+ ltq_register_pci(<q_pci_data);
|
|
|
|
+ ltq_register_madwifi_eep();
|
2011-02-01 16:37:35 +02:00
|
|
|
+ xway_register_dwc(ARV4518PW_USB);
|
2011-02-05 00:49:52 +02:00
|
|
|
+ arv45xx_register_ethernet();
|
|
|
|
+ arv45xx_register_ath5k();
|
2011-02-01 16:37:35 +02:00
|
|
|
+
|
|
|
|
+ gpio_request(ARV4518PW_SWITCH_RESET, "switch");
|
|
|
|
+ gpio_direction_output(ARV4518PW_SWITCH_RESET, 1);
|
|
|
|
+ gpio_export(ARV4518PW_SWITCH_RESET, 0);
|
2010-12-13 00:57:16 +02:00
|
|
|
+}
|
|
|
|
+
|
2011-01-23 21:16:33 +02:00
|
|
|
+MIPS_MACHINE(LANTIQ_MACH_ARV4518PW,
|
|
|
|
+ "ARV4518PW",
|
|
|
|
+ "ARV4518PW - SMC7908A-ISP, Airties WAV-221",
|
|
|
|
+ arv4518pw_init);
|
2010-12-13 00:57:16 +02:00
|
|
|
+
|
|
|
|
+static void __init
|
2011-01-23 21:16:33 +02:00
|
|
|
+arv4520pw_init(void)
|
2010-12-13 00:57:16 +02:00
|
|
|
+{
|
2011-02-01 16:37:35 +02:00
|
|
|
+#define ARV4520PW_EBU 0x400
|
|
|
|
+#define ARV4520PW_USB 28
|
2011-05-30 00:19:26 +03:00
|
|
|
+#define ARV4520PW_SWITCH_RESET 82
|
|
|
|
+
|
|
|
|
+ ltq_register_gpio_ebu(ARV4520PW_EBU);
|
|
|
|
+ ltq_add_device_leds_gpio(-1, ARRAY_SIZE(arv4520pw_leds_gpio), arv4520pw_leds_gpio);
|
|
|
|
+ ltq_register_nor(&arv45xx_flash_data);
|
|
|
|
+ ltq_register_pci(<q_pci_data);
|
|
|
|
+ ltq_register_tapi();
|
2010-12-13 00:57:16 +02:00
|
|
|
+ arv45xx_register_ethernet();
|
2011-02-01 16:37:35 +02:00
|
|
|
+ xway_register_dwc(ARV4520PW_USB);
|
2011-02-05 00:49:52 +02:00
|
|
|
+
|
|
|
|
+ gpio_request(ARV4520PW_SWITCH_RESET, "switch");
|
|
|
|
+ gpio_set_value(ARV4520PW_SWITCH_RESET, 1);
|
2010-12-13 00:57:16 +02:00
|
|
|
+}
|
|
|
|
+
|
2011-01-23 21:16:33 +02:00
|
|
|
+MIPS_MACHINE(LANTIQ_MACH_ARV4520PW,
|
|
|
|
+ "ARV4520PW",
|
|
|
|
+ "ARV4520PW - Airties WAV-281, Arcor A800",
|
|
|
|
+ arv4520pw_init);
|
2010-12-13 00:57:16 +02:00
|
|
|
+
|
|
|
|
+static void __init
|
2011-02-01 16:37:35 +02:00
|
|
|
+arv452Cpw_init(void)
|
|
|
|
+{
|
|
|
|
+#define ARV452CPW_EBU 0x77f
|
|
|
|
+#define ARV452CPW_USB 28
|
|
|
|
+#define ARV452CPW_RELAY1 31
|
2011-05-30 00:19:26 +03:00
|
|
|
+#define ARV452CPW_RELAY2 79
|
|
|
|
+#define ARV452CPW_SWITCH_RESET 82
|
|
|
|
+
|
|
|
|
+ ltq_register_gpio_ebu(ARV452CPW_EBU);
|
|
|
|
+ ltq_add_device_leds_gpio(-1, ARRAY_SIZE(arv452cpw_leds_gpio), arv452cpw_leds_gpio);
|
|
|
|
+ ltq_register_nor(&arv45xx_flash_data);
|
|
|
|
+ ltq_register_pci(<q_pci_data);
|
|
|
|
+ ltq_register_madwifi_eep();
|
2011-02-01 16:37:35 +02:00
|
|
|
+ xway_register_dwc(ARV452CPW_USB);
|
2011-02-05 00:49:52 +02:00
|
|
|
+ arv45xx_register_ethernet();
|
|
|
|
+ arv45xx_register_ath5k();
|
2011-02-01 16:37:35 +02:00
|
|
|
+
|
|
|
|
+ gpio_request(ARV452CPW_SWITCH_RESET, "switch");
|
|
|
|
+ gpio_set_value(ARV452CPW_SWITCH_RESET, 1);
|
|
|
|
+ gpio_export(ARV452CPW_SWITCH_RESET, 0);
|
|
|
|
+
|
|
|
|
+ gpio_request(ARV452CPW_RELAY1, "relay1");
|
|
|
|
+ gpio_direction_output(ARV452CPW_RELAY1, 1);
|
|
|
|
+ gpio_export(ARV452CPW_RELAY1, 0);
|
|
|
|
+
|
|
|
|
+ gpio_request(ARV452CPW_RELAY2, "relay2");
|
|
|
|
+ gpio_set_value(ARV452CPW_RELAY2, 1);
|
|
|
|
+ gpio_export(ARV452CPW_RELAY2, 0);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+MIPS_MACHINE(LANTIQ_MACH_ARV452CPW,
|
|
|
|
+ "ARV452CPW",
|
|
|
|
+ "ARV452CPW - Arcor A801",
|
|
|
|
+ arv452Cpw_init);
|
|
|
|
+
|
|
|
|
+static void __init
|
2011-01-23 21:16:33 +02:00
|
|
|
+arv4525pw_init(void)
|
2010-12-13 00:57:16 +02:00
|
|
|
+{
|
2011-05-30 00:19:26 +03:00
|
|
|
+ ltq_add_device_leds_gpio(-1, ARRAY_SIZE(arv4525pw_leds_gpio), arv4525pw_leds_gpio);
|
|
|
|
+ ltq_register_nor(&arv45xx_flash_data);
|
|
|
|
+ ltq_pci_data.clock = PCI_CLOCK_INT;
|
|
|
|
+ ltq_register_pci(<q_pci_data);
|
|
|
|
+ ltq_register_madwifi_eep();
|
|
|
|
+ ltq_eth_data.mii_mode = PHY_INTERFACE_MODE_MII;
|
2010-12-13 00:57:16 +02:00
|
|
|
+ arv45xx_register_ethernet();
|
|
|
|
+}
|
|
|
|
+
|
2011-01-23 21:16:33 +02:00
|
|
|
+MIPS_MACHINE(LANTIQ_MACH_ARV4525PW,
|
|
|
|
+ "ARV4525PW",
|
|
|
|
+ "ARV4525PW - Speedport W502V",
|
|
|
|
+ arv4525pw_init);
|
2011-01-23 14:51:15 +02:00
|
|
|
+
|
|
|
|
+static void __init
|
|
|
|
+arv7518pw_init(void)
|
|
|
|
+{
|
2011-02-01 16:37:35 +02:00
|
|
|
+#define ARV7518PW_EBU 0x2
|
2011-03-29 09:20:00 +03:00
|
|
|
+#define ARV7518PW_USB 14
|
2011-02-01 16:37:35 +02:00
|
|
|
+
|
2011-05-30 00:19:26 +03:00
|
|
|
+ ltq_register_gpio_ebu(ARV7518PW_EBU);
|
|
|
|
+ ltq_add_device_leds_gpio(-1, ARRAY_SIZE(arv7518pw_leds_gpio), arv7518pw_leds_gpio);
|
|
|
|
+ ltq_register_gpio_buttons(arv7518pw_gpio_buttons, ARRAY_SIZE(arv7518pw_gpio_buttons));
|
|
|
|
+ ltq_register_nor(&arv75xx_flash_data);
|
|
|
|
+ ltq_register_pci(<q_pci_data);
|
|
|
|
+ ltq_register_tapi();
|
2011-02-01 16:37:35 +02:00
|
|
|
+ xway_register_dwc(ARV7518PW_USB);
|
2011-01-23 14:51:15 +02:00
|
|
|
+ arv75xx_register_ethernet();
|
|
|
|
+ //arv7518_register_ath9k(mac);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+MIPS_MACHINE(LANTIQ_MACH_ARV7518PW,
|
|
|
|
+ "ARV7518PW",
|
|
|
|
+ "ARV7518PW - ASTORIA",
|
|
|
|
+ arv7518pw_init);
|
|
|
|
+
|
2011-01-23 14:08:44 +02:00
|
|
|
+static void __init
|
2011-02-01 16:37:35 +02:00
|
|
|
+arv752dpw22_init(void)
|
2011-01-23 14:08:44 +02:00
|
|
|
+{
|
2011-02-01 16:37:35 +02:00
|
|
|
+#define ARV752DPW22_EBU 0x2
|
2011-05-30 00:19:26 +03:00
|
|
|
+#define ARV752DPW22_USB 72
|
|
|
|
+#define ARV752DPW22_RELAY 73
|
|
|
|
+
|
|
|
|
+ ltq_register_gpio_ebu(ARV752DPW22_EBU);
|
|
|
|
+ ltq_add_device_leds_gpio(-1, ARRAY_SIZE(arv752dpw22_leds_gpio), arv752dpw22_leds_gpio);
|
|
|
|
+ ltq_register_gpio_buttons(arv752dpw22_gpio_buttons, ARRAY_SIZE(arv752dpw22_gpio_buttons));
|
|
|
|
+ ltq_register_nor(&arv75xx_flash_data);
|
|
|
|
+ ltq_pci_data.irq[15] = (INT_NUM_IM2_IRL0 + 31);
|
|
|
|
+ ltq_pci_data.gpio |= PCI_EXIN1 | PCI_REQ2;
|
|
|
|
+ ltq_register_pci(<q_pci_data);
|
2011-02-01 16:37:35 +02:00
|
|
|
+ xway_register_dwc(ARV752DPW22_USB);
|
2011-01-23 14:08:44 +02:00
|
|
|
+ arv75xx_register_ethernet();
|
2011-02-01 16:37:35 +02:00
|
|
|
+
|
|
|
|
+ gpio_request(ARV752DPW22_RELAY, "relay");
|
|
|
|
+ gpio_set_value(ARV752DPW22_RELAY, 1);
|
|
|
|
+ gpio_export(ARV752DPW22_RELAY, 0);
|
2011-01-23 14:08:44 +02:00
|
|
|
+}
|
|
|
|
+
|
2011-02-01 16:37:35 +02:00
|
|
|
+MIPS_MACHINE(LANTIQ_MACH_ARV752DPW22,
|
|
|
|
+ "ARV752DPW22",
|
|
|
|
+ "ARV752DPW22 - Arcor A803",
|
|
|
|
+ arv752dpw22_init);
|
2011-05-30 00:19:26 +03:00
|
|
|
--- a/arch/mips/lantiq/machtypes.h
|
|
|
|
+++ b/arch/mips/lantiq/machtypes.h
|
2011-06-04 16:35:55 +03:00
|
|
|
@@ -21,6 +21,17 @@ enum lantiq_mach_type {
|
2011-05-30 00:19:26 +03:00
|
|
|
LANTIQ_MACH_EASY98000SF, /* Falcon Eval Board, Serial Flash */
|
|
|
|
LANTIQ_MACH_EASY98020, /* Falcon Reference Board */
|
|
|
|
LANTIQ_MACH_95C3AM1, /* Board 95C3AM1 */
|
|
|
|
+
|
|
|
|
+ /* Arcadyan */
|
|
|
|
+ LANTIQ_MACH_ARV3527P, /* Arcor easybox a401 */
|
|
|
|
+ LANTIQ_MACH_ARV4510PW, /* Wippies Homebox */
|
|
|
|
+ LANTIQ_MACH_ARV4518PW, /* Airties WAV-221, SMC-7908A-ISP */
|
|
|
|
+ LANTIQ_MACH_ARV4520PW, /* Airties WAV-281, Arcor EasyboxA800 */
|
|
|
|
+ LANTIQ_MACH_ARV452CPW, /* Arcor EasyboxA801 */
|
|
|
|
+ LANTIQ_MACH_ARV4525PW, /* Speedport W502V */
|
|
|
|
+ LANTIQ_MACH_ARV752DPW, /* Arcor easybox a802 */
|
|
|
|
+ LANTIQ_MACH_ARV752DPW22, /* Arcor easybox a803 */
|
|
|
|
+ LANTIQ_MACH_ARV7518PW, /* ASTORIA */
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|