aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* update iproute2 to 2.6.20-070313, and package genl utilityPeter Denison2007-06-097-92/+86
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7540 3c298f89-4303-0410-b956-a3cf2f4a3e73
* force build of packages when using quiltFelix Fietkau2007-06-081-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7539 3c298f89-4303-0410-b956-a3cf2f4a3e73
* Use the target compilerFlorian Fainelli2007-06-081-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7538 3c298f89-4303-0410-b956-a3cf2f4a3e73
* Change the main partition to be named rootfs so that the scripts mount itFlorian Fainelli2007-06-081-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7537 3c298f89-4303-0410-b956-a3cf2f4a3e73
* Resync adm5120 kernel config, lzma-loader fixes from GaborFlorian Fainelli2007-06-084-9/+19
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7536 3c298f89-4303-0410-b956-a3cf2f4a3e73
* Fix the cmdline hack patch, thanks GaborFlorian Fainelli2007-06-081-2/+2
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7535 3c298f89-4303-0410-b956-a3cf2f4a3e73
* Update the yaffs patch to include the fix by Giampaolo Mancini (mancho), ↵Florian Fainelli2007-06-081-66/+92
| | | | | | closes #1779 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7534 3c298f89-4303-0410-b956-a3cf2f4a3e73
* add support for the AVR32 platform, namely the ATNGW100 board
/*
 *  TP-LINK TL-WA701ND v2 board support
 *
 *  Copyright (C) 2015 Luigi Tarenga <luigi.tarenga@gmail.com>
 *
 *  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.
 */

#include <linux/gpio.h>

#include <asm/mach-ath79/ath79.h>

#include "dev-eth.h"
#include "dev-gpio-buttons.h"
#include "dev-leds-gpio.h"
#include "dev-m25p80.h"
#include "dev-usb.h"
#include "dev-wmac.h"
#include "machtypes.h"

#define TL_WA701NDV2_GPIO_LED_WLAN	0
#define TL_WA701NDV2_GPIO_LED_QSS	1
#define TL_WA701NDV2_GPIO_LED_LAN	17
#define TL_WA701NDV2_GPIO_LED_SYSTEM	27

#define TL_WA701NDV2_GPIO_BTN_RESET	11
#define TL_WA701NDV2_GPIO_BTN_QSS	26

#define TL_WA701NDV2_GPIO_USB_POWER	8

#define TL_WA701NDV2_KEYS_POLL_INTERVAL	20	/* msecs */
#define TL_WA701NDV2_KEYS_DEBOUNCE_INTERVAL	(3 * TL_WA701NDV2_KEYS_POLL_INTERVAL)

static const char *tl_wa701ndv2_part_probes[] = {
	"tp-link",
	NULL,
};

static struct flash_platform_data tl_wa701ndv2_flash_data = {
	.part_probes	= tl_wa701ndv2_part_probes,
};

static struct gpio_led tl_wa701ndv2_leds_gpio[] __initdata = {
	{
		.name		= "tp-link:green:wlan",
		.gpio		= TL_WA701NDV2_GPIO_LED_WLAN,
		.active_low	= 0,
	}, {
		.name		= "tp-link:green:qss",
		.gpio		= TL_WA701NDV2_GPIO_LED_QSS,
		.active_low	= 0,
	}, {
		.name		= "tp-link:green:lan",
		.gpio		= TL_WA701NDV2_GPIO_LED_LAN,
		.active_low	= 1,
	}, {
		.name		= "tp-link:green:system",
		.gpio		= TL_WA701NDV2_GPIO_LED_SYSTEM,
		.active_low	= 1,
        }
};

static struct gpio_keys_button tl_wa701ndv2_gpio_keys[] __initdata = {
	{
		.desc		= "reset",
		.type		= EV_KEY,
		.code		= KEY_RESTART,
		.debounce_interval = TL_WA701NDV2_KEYS_DEBOUNCE_INTERVAL,
		.gpio		= TL_WA701NDV2_GPIO_BTN_RESET,
		.active_low	= 0,
	} , {
                .desc		= "qss",
                .type		= EV_KEY,
                .code		= KEY_WPS_BUTTON,
                .debounce_interval = TL_WA701NDV2_KEYS_DEBOUNCE_INTERVAL,
                .gpio		= TL_WA701NDV2_GPIO_BTN_QSS,
                .active_low	= 0,
        }

};

static void __init tl_wa701ndv2_setup(void)
{
	u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
	u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);

	/* disable PHY_SWAP and PHY_ADDR_SWAP bits */
	ath79_setup_ar933x_phy4_switch(false, false);

	ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wa701ndv2_leds_gpio),
				 tl_wa701ndv2_leds_gpio);

	ath79_register_gpio_keys_polled(-1, TL_WA701NDV2_KEYS_POLL_INTERVAL,
					ARRAY_SIZE(tl_wa701ndv2_gpio_keys),
					tl_wa701ndv2_gpio_keys);

	gpio_request_one(TL_WA701NDV2_GPIO_USB_POWER,
			 GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
			 "USB power");
	ath79_register_usb();

	ath79_register_m25p80(&tl_wa701ndv2_flash_data);
	ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
	/* ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1); */

	ath79_register_mdio(0, 0x0);
	ath79_register_eth(0);
	ath79_register_eth(1);

	ath79_register_wmac(ee, mac);
}

MIPS_MACHINE(ATH79_MACH_TL_WA701ND_V2, "TL-WA701ND-v2",
	     "TP-LINK TL-WA701ND v2", tl_wa701ndv2_setup);
for new release
Hamish Guthrie2007-06-051-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7501 3c298f89-4303-0410-b956-a3cf2f4a3e73
* Removed romboot from tree - replaced by dfbootHamish Guthrie2007-06-059-3380/+0
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7500 3c298f89-4303-0410-b956-a3cf2f4a3e73
* Corrected PLLA setting to remove error in BRG at 115k. Removed 2 filesHamish Guthrie2007-06-053-10/+2
| | | | | | | not required git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7499 3c298f89-4303-0410-b956-a3cf2f4a3e73
* Sets GPIO PB28 to multi-drive (open collector) - fixes reset issueHamish Guthrie2007-06-051-0/+10
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7498 3c298f89-4303-0410-b956-a3cf2f4a3e73
* small changes to the default netconfig and ipkg repo for the foxboardJohn Crispin2007-06-042-0/+5
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7497 3c298f89-4303-0410-b956-a3cf2f4a3e73
* reboot now works on foxboardJohn Crispin2007-06-041-0/+10
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7496 3c298f89-4303-0410-b956-a3cf2f4a3e73
* small fix on etrax basefiles to avoid bogus error msgJohn Crispin2007-06-041-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7495 3c298f89-4303-0410-b956-a3cf2f4a3e73
* added light edition of spca5xx driver and the streamin server+web-appletJohn Crispin2007-06-044-0/+128
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7494 3c298f89-4303-0410-b956-a3cf2f4a3e73
* Fixed at91 ethernet driver for dm9161a PHY interrupt issueHamish Guthrie2007-06-041-0/+28
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7493 3c298f89-4303-0410-b956-a3cf2f4a3e73
* add new dfboot loader - a complete revison of romboot code.Hamish Guthrie2007-06-0431-0/+15410
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7492 3c298f89-4303-0410-b956-a3cf2f4a3e73
* Remove a debug statement from trx.c, add config changes for at91Hamish Guthrie2007-06-045-10/+17
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7491 3c298f89-4303-0410-b956-a3cf2f4a3e73
* refresh all package patches in the buildroot using quiltFelix Fietkau2007-06-04184-2282/+3015
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7490 3c298f89-4303-0410-b956-a3cf2f4a3e73
* package/refresh should clean all packages before refreshing their patchesFelix Fietkau2007-06-041-3/+4
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7489 3c298f89-4303-0410-b956-a3cf2f4a3e73
* Rename 'refresh' to 'update' and make the new 'refresh' actually refresh all ↵Felix Fietkau2007-06-044-23/+23
| | | | | | | | | the patches. Also added a target package/refresh which will do this to all packages in the buildroot git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7488 3c298f89-4303-0410-b956-a3cf2f4a3e73
* add ar7-2.6 fixes by Stefan WeilFelix Fietkau2007-06-048-24/+56
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7487 3c298f89-4303-0410-b956-a3cf2f4a3e73
* enable image generation for the WRT150NImre Kaloz2007-06-041-0/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7486 3c298f89-4303-0410-b956-a3cf2f4a3e73
* update uml-2.6 to 2.6.21.1 on i386, fix uml-2.6 sound modules packagingNicolas Thill2007-06-042-4/+20
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7485 3c298f89-4303-0410-b956-a3cf2f4a3e73
* several changes to the basefiles for cris targetJohn Crispin2007-06-036-6/+30
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7484 3c298f89-4303-0410-b956-a3cf2f4a3e73
* more fixes for the patching stuff (was testing it on the wrong target)Felix Fietkau2007-06-031-1/+2
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7483 3c298f89-4303-0410-b956-a3cf2f4a3e73
* revert bogus changeFelix Fietkau2007-06-031-3/+0
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7482 3c298f89-4303-0410-b956-a3cf2f4a3e73
* fix quilt related unpack/patch errorFelix Fietkau2007-06-031-1/+0
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7481 3c298f89-4303-0410-b956-a3cf2f4a3e73