* NETGEAR WNDR4300 board support
*
* Copyright (C) 2012 Gabor Juhos <juhosg@openwrt.org>
+ * Copyright (C) 2014 Ralph Perlich <rpsoft@arcor.de>
*
* 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
#include <linux/platform_device.h>
#include <linux/ath9k_platform.h>
#include <linux/ar8216_platform.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/nand.h>
+#include <linux/platform/ar934x_nfc.h>
#include <asm/mach-ath79/ar71xx_regs.h>
#include "machtypes.h"
#define WNDR4300_GPIO_LED_POWER_GREEN 0
-#define WNDR4300_GPIO_LED_POWER_ORANGE 2
+#define WNDR4300_GPIO_LED_POWER_AMBER 2
#define WNDR4300_GPIO_LED_USB 13
#define WNDR4300_GPIO_LED_WAN_GREEN 1
-#define WNDR4300_GPIO_LED_WAN_ORANGE 3
+#define WNDR4300_GPIO_LED_WAN_AMBER 3
#define WNDR4300_GPIO_LED_WLAN5G 14
#define WNDR4300_GPIO_LED_WPS_GREEN 16
-#define WNDR4300_GPIO_LED_WPS_ORANGE 17
+#define WNDR4300_GPIO_LED_WPS_AMBER 17
#define WNDR4300_GPIO_BTN_RESET 21
#define WNDR4300_GPIO_BTN_WIRELESS 15
.active_low = 1,
},
{
- .name = "netgear:orange:power",
- .gpio = WNDR4300_GPIO_LED_POWER_ORANGE,
+ .name = "netgear:amber:power",
+ .gpio = WNDR4300_GPIO_LED_POWER_AMBER,
.active_low = 1,
},
{
.active_low = 1,
},
{
- .name = "netgear:orange:wan",
- .gpio = WNDR4300_GPIO_LED_WAN_ORANGE,
+ .name = "netgear:amber:wan",
+ .gpio = WNDR4300_GPIO_LED_WAN_AMBER,
.active_low = 1,
},
{
.active_low = 1,
},
{
- .name = "netgear:orange:wps",
- .gpio = WNDR4300_GPIO_LED_WPS_ORANGE,
+ .name = "netgear:amber:wps",
+ .gpio = WNDR4300_GPIO_LED_WPS_AMBER,
.active_low = 1,
},
{
static void __init wndr4300_setup(void)
{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(wndr4300_leds_gpio); i++)
+ ath79_gpio_output_select(wndr4300_leds_gpio[i].gpio,
+ AR934X_GPIO_OUT_GPIO);
+
ath79_register_leds_gpio(-1, ARRAY_SIZE(wndr4300_leds_gpio),
wndr4300_leds_gpio);
ath79_register_gpio_keys_polled(-1, WNDR4300_KEYS_POLL_INTERVAL,
ath79_eth0_pll_data.pll_1000 = 0x06000000;
ath79_register_eth(0);
+ ath79_nfc_set_ecc_mode(AR934X_NFC_ECC_HW);
ath79_register_nfc();
ath79_register_usb();