get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.2/patches/809217/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 809217,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/809217/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/lede/patch/20170903044539.26580-1-hackpascal@gmail.com/",
    "project": {
        "id": 54,
        "url": "http://patchwork.ozlabs.org/api/1.2/projects/54/?format=api",
        "name": "LEDE development",
        "link_name": "lede",
        "list_id": "lede-dev.lists.infradead.org",
        "list_email": "lede-dev@lists.infradead.org",
        "web_url": "http://lede-project.org/",
        "scm_url": "",
        "webscm_url": "http://git.lede-project.org/",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20170903044539.26580-1-hackpascal@gmail.com>",
    "list_archive_url": null,
    "date": "2017-09-03T04:45:39",
    "name": "[LEDE-DEV,4/4] ar71xx: add netgear wndr4500v3 support",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "f908b3331edfe8be199e3201b84ede01091a4c4b",
    "submitter": {
        "id": 65302,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/65302/?format=api",
        "name": "Weijie Gao",
        "email": "hackpascal@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/lede/patch/20170903044539.26580-1-hackpascal@gmail.com/mbox/",
    "series": [
        {
            "id": 1197,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/1197/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/lede/list/?series=1197",
            "date": "2017-09-03T04:45:10",
            "name": "[LEDE-DEV,1/4] mac80211: enable use of GPI9 of ath9k",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/1197/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/809217/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/809217/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133;\n\thelo=bombadil.infradead.org;\n\tenvelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"uy4eQpb5\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"CZW3fu0C\"; dkim-atps=neutral"
        ],
        "Received": [
            "from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xlL792CQhz9s7c\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSun,  3 Sep 2017 14:47:17 +1000 (AEST)",
            "from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1doMoO-0002Oy-2H; Sun, 03 Sep 2017 04:47:08 +0000",
            "from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1doMnI-0001BS-Qm\n\tfor lede-dev@lists.infradead.org; Sun, 03 Sep 2017 04:46:03 +0000",
            "by mail-pg0-x242.google.com with SMTP id 83so2503269pgb.3\n\tfor <lede-dev@lists.infradead.org>;\n\tSat, 02 Sep 2017 21:45:44 -0700 (PDT)",
            "from localhost ([182.148.31.147]) by smtp.gmail.com with ESMTPSA id\n\t195sm6406589pgc.23.2017.09.02.21.45.41\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tSat, 02 Sep 2017 21:45:42 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:\n\tList-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id:\n\tDate:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:\n\tResent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:\n\tList-Owner; bh=cMGJdCfTq38vwpvWgW6maJWWKMq4tGT+g91i/6KQyqc=;\n\tb=uy4eQpb52kRHLr\n\tRGu7Npq7qLeRazk+Eps8dJ+Ts2kTYlZSkKoZiHc1LlNlI2ylNw1u8SqVqt0GB0xvGFBUfWlzcD+d1\n\td6M2Sd3gXdYL0jt0iiOLPbJksZcYAEMWQu+LkuSkg7Oz1KI9YdWaIiUQ1l1k7UMPG5c8ZRVBsc6X7\n\thMGrgR19quGxDrufx94qcwVjdAl/26AZRa9olAOV1r8j5zrsQZU2oUwaO35ryYk1Ioz6VzUsXHjXt\n\trZF54UePAnXEzKLqOC8aBCM7Z/vsq7mDeS0ucuKWqzHfMNGo2ZrqE2QC1PzeNhuiI6vTMq2eno3yl\n\tB9cxkGC6DqKPOpPCnYgg==;",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id;\n\tbh=F4PdZgmG8MolYG4mHG0XNpxE5XmXIxNqBaUkocCGbQE=;\n\tb=CZW3fu0C7cjD6yyeB9ekxjxo1AUsMx6wrxJhh6FgX3lyhyXpt7VHg46gxlScKE9AnS\n\toEVpECWx6C0E+mvkaxeRNM06qESmvyy49GxNB4jeSpnkDxCLSMfuc1fdw+i9hTWDg6cy\n\twfUiXBVMJfo5pHzm06von5PkCvsonp6+sna9PcsR1gjDekotdsjuPm9ljTbLDFSk/Ud2\n\tS0DNbYpf0lBQ4UMTvebSkk3GB2G0aj/77V3p05fqzFKRed5aKJu7rfiKtR44ilz/91dc\n\tSxsXdj1bXj9zUyy/azOFz+gP8GdmV+cia9AKkWF2VGXt6o5MasWMUqT5IZmKqUQYGATQ\n\tUi9Q=="
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id;\n\tbh=F4PdZgmG8MolYG4mHG0XNpxE5XmXIxNqBaUkocCGbQE=;\n\tb=m3uG0wSoFU+goei/PHVkp11LXYHnGVt/SJ7MMwj2NIu7cPE8QTzywSI4QKXR23Tg77\n\tCLzrdEIClcg7EDSyxiZXWTrHlj1Ci22vHXiHe7O5XVao04HB8yGiyU6ukQZWq0Uc6lyA\n\tZV+5NhP8fP4quRGTmRpdJELByLfETjbpFWETDba/nfugiIanOsx/RulmC9gdIEL/K/cL\n\tIVE1L265APDoZ2kchGFAwJg8hff6KQZ+D3d5QIiehq59aUrTS80+B48/+N+pe1pe5w+G\n\tvU0W67Qb901TdhnFOTO1eGR9BVMvsDRHKkiWEneLaAGHm6YIuuuORZPOO2aLWbOMlCfm\n\twSbA==",
        "X-Gm-Message-State": "AHPjjUgA7t3q9DIm3D9o7sL4CYUa1wIStcbksGdtOSUdL07z5K1n7pgv\n\t3/I6ev/29+3fC8fy",
        "X-Google-Smtp-Source": "ADKCNb4tWPIVEp6/ukds40NhO9aLH+OLx6fLrNYWdfWVZmXa9pGt6m9vABrpagf2lIc6oqMyWv7flw==",
        "X-Received": "by 10.99.135.65 with SMTP id i62mr4607508pge.257.1504413943228; \n\tSat, 02 Sep 2017 21:45:43 -0700 (PDT)",
        "From": "hackpascal <hackpascal@gmail.com>",
        "To": "lede-dev@lists.infradead.org",
        "Date": "Sun,  3 Sep 2017 12:45:39 +0800",
        "Message-Id": "<20170903044539.26580-1-hackpascal@gmail.com>",
        "X-Mailer": "git-send-email 2.11.0",
        "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ",
        "X-CRM114-CacheID": "sfid-20170902_214600_948372_ACE68566 ",
        "X-CRM114-Status": "GOOD (  16.19  )",
        "X-Spam-Score": "-2.0 (--)",
        "X-Spam-Report": "SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.0 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno\n\ttrust [2607:f8b0:400e:c05:0:0:0:242 listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\n\tprovider (hackpascal[at]gmail.com)\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain",
        "Subject": "[LEDE-DEV] [PATCH 4/4] ar71xx: add netgear wndr4500v3 support",
        "X-BeenThere": "lede-dev@lists.infradead.org",
        "X-Mailman-Version": "2.1.21",
        "Precedence": "list",
        "List-Id": "<lede-dev.lists.infradead.org>",
        "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/lede-dev>,\n\t<mailto:lede-dev-request@lists.infradead.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.infradead.org/pipermail/lede-dev/>",
        "List-Post": "<mailto:lede-dev@lists.infradead.org>",
        "List-Help": "<mailto:lede-dev-request@lists.infradead.org?subject=help>",
        "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/lede-dev>,\n\t<mailto:lede-dev-request@lists.infradead.org?subject=subscribe>",
        "Cc": "hackpascal <hackpascal@gmail.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Sender": "\"Lede-dev\" <lede-dev-bounces@lists.infradead.org>",
        "Errors-To": "lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"
    },
    "content": "Netgear WNDR4500v3 uses one SPI-NOR and one SPI-NAND. The bootloader and\ncaldata are on the SPI-NOR flash, and the firmware is on the SPI-NAND flash.\n\nHardware specification:\nCPU: QCA9563\nSwitch: QCA8337N\n5.8GHz Wifi: AR9580\nSPI-NOR: 2MB\nSPI-NAND: 128MB\nDDR2: 128MB\n\nWNDR4300v2 is similar to WNDR4500v3 but not tested and not included here.\n\nSigned-off-by: hackpascal <hackpascal@gmail.com>\n---\n target/linux/ar71xx/base-files/etc/board.d/01_leds |   6 +\n .../linux/ar71xx/base-files/etc/board.d/02_network |   1 +\n target/linux/ar71xx/base-files/etc/diag.sh         |   1 +\n target/linux/ar71xx/base-files/lib/ar71xx.sh       |   3 +\n .../ar71xx/base-files/lib/upgrade/platform.sh      |   3 +-\n .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  11 +\n target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +\n .../files/arch/mips/ath79/mach-wndr4500-v3.c       | 233 +++++++++++++++++++++\n .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +\n target/linux/ar71xx/image/legacy.mk                |   2 +\n target/linux/ar71xx/image/nand.mk                  |   6 +\n target/linux/ar71xx/nand/config-default            |   3 +\n 12 files changed, 270 insertions(+), 1 deletion(-)\n create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-wndr4500-v3.c",
    "diff": "diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds\nindex 84b1a7dfd9..b4ebbd6173 100755\n--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds\n+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds\n@@ -828,6 +828,12 @@ wndr4300)\n \tucidef_set_led_wlan \"wlan2g\" \"WLAN2G\" \"netgear:green:wlan2g\" \"phy0tpt\"\n \tucidef_set_led_wlan \"wlan5g\" \"WLAN5G\" \"netgear:blue:wlan5g\" \"phy1tpt\"\n \t;;\n+wndr4500-v3)\n+\tucidef_set_led_netdev \"wan\" \"WAN (green)\" \"netgear:green:wan\" \"eth0.2\"\n+\tucidef_set_led_usbdev \"usb1\" \"USB1\" \"netgear:green:usb1\" \"1-1\"\n+\tucidef_set_led_usbdev \"usb2\" \"USB2\" \"netgear:green:usb2\" \"2-1\"\n+\tucidef_set_led_wlan \"wlan2g\" \"WLAN2G\" \"netgear:green:wlan2g\" \"phy0tpt\"\n+\t;;\n whr-g301n|\\\n whr-hp-g300n|\\\n whr-hp-gn)\ndiff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network\nindex ba54d89b8f..d455afad69 100755\n--- a/target/linux/ar71xx/base-files/etc/board.d/02_network\n+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network\n@@ -262,6 +262,7 @@ ar71xx_setup_interfaces()\n \t\tucidef_add_switch \"switch0\" \\\n \t\t\t\"0@eth0\" \"1:lan:1\" \"2:lan:4\" \"3:lan:3\" \"4:lan:2\"\n \t\t;;\n+\twndr4500-v3|\\\n \tcr5000|\\\n \tdgl-5500-a1|\\\n \tdhp-1565-a1|\\\ndiff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh\nindex 7753a7156d..6a392e790a 100644\n--- a/target/linux/ar71xx/base-files/etc/diag.sh\n+++ b/target/linux/ar71xx/base-files/etc/diag.sh\n@@ -471,6 +471,7 @@ get_status_led() {\n \twndr3700|\\\n \twndr3700v4|\\\n \twndr4300|\\\n+\twndr4500-v3|\\\n \twnr2000|\\\n \twnr2000-v3|\\\n \twnr2200|\\\ndiff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh\nindex 7fd5fb4522..e44fa0d09a 100755\n--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh\n+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh\n@@ -1249,6 +1249,9 @@ ar71xx_board_detect() {\n \t*\"WNDR4300\")\n \t\tname=\"wndr4300\"\n \t\t;;\n+\t*\"WNDR4500v3\")\n+\t\tname=\"wndr4500-v3\"\n+\t\t;;\n \t*\"WNR1000 V2\")\n \t\tname=\"wnr1000-v2\"\n \t\t;;\ndiff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh\nindex 05b5634aa5..12e920f46d 100755\n--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh\n+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh\n@@ -533,7 +533,8 @@ platform_check_image() {\n \tr6100|\\\n \trambutan|\\\n \twndr3700v4|\\\n-\twndr4300)\n+\twndr4300|\\\n+\twndr4500-v3)\n \t\tnand_do_platform_check $board $1\n \t\treturn $?\n \t\t;;\ndiff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt\nindex ff9c3037a1..68fdd4db66 100644\n--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt\n+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt\n@@ -1061,6 +1061,17 @@ config ATH79_MACH_WNDR4300\n \tselect ATH79_DEV_USB\n \tselect ATH79_DEV_WMAC\n \n+config ATH79_MACH_WNDR4500_V3\n+\tbool \"NETGEAR WNDR4300v2/WNDR4500v3 board support\"\n+\tselect SOC_QCA956X\n+\tselect ATH79_DEV_AP9X_PCI if PCI\n+\tselect ATH79_DEV_ETH\n+\tselect ATH79_DEV_GPIO_BUTTONS\n+\tselect ATH79_DEV_LEDS_GPIO\n+\tselect ATH79_DEV_USB\n+\tselect ATH79_DEV_M25P80\n+\tselect ATH79_DEV_WMAC\n+\n config ATH79_MACH_WNR2000\n \tbool \"NETGEAR WNR2000 board support\"\n \tselect SOC_AR913X\ndiff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile\nindex 469b6a794c..01848846d7 100644\n--- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile\n+++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile\n@@ -232,6 +232,7 @@ obj-$(CONFIG_ATH79_MACH_WLR8100)\t\t+= mach-wlr8100.o\n obj-$(CONFIG_ATH79_MACH_WNDAP360)\t\t+= mach-wndap360.o\n obj-$(CONFIG_ATH79_MACH_WNDR3700)\t\t+= mach-wndr3700.o\n obj-$(CONFIG_ATH79_MACH_WNDR4300)\t\t+= mach-wndr4300.o\n+obj-$(CONFIG_ATH79_MACH_WNDR4500_V3)\t\t+= mach-wndr4500-v3.o\n obj-$(CONFIG_ATH79_MACH_WNR2000)\t\t+= mach-wnr2000.o\n obj-$(CONFIG_ATH79_MACH_WNR2000_V3)\t\t+= mach-wnr2000-v3.o\n obj-$(CONFIG_ATH79_MACH_WNR2000_V4)\t\t+= mach-wnr2000-v4.o\ndiff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wndr4500-v3.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wndr4500-v3.c\nnew file mode 100644\nindex 0000000000..51a56308ab\n--- /dev/null\n+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wndr4500-v3.c\n@@ -0,0 +1,233 @@\n+/*\n+ *  NETGEAR WNDR4500V3v2/WNDR4500v3 board support\n+ *\n+ *  Copyright (C) 2017 Weijie Gao <hackpascal@gmail.com>\n+ *\n+ *  This program is free software; you can redistribute it and/or modify it\n+ *  under the terms of the GNU General Public License version 2 as published\n+ *  by the Free Software Foundation.\n+ */\n+\n+#include <linux/pci.h>\n+#include <linux/phy.h>\n+#include <linux/gpio.h>\n+#include <linux/platform_device.h>\n+#include <linux/ath9k_platform.h>\n+#include <linux/ar8216_platform.h>\n+#include <linux/mtd/mtd.h>\n+#include <linux/mtd/nand.h>\n+\n+#include <asm/mach-ath79/ar71xx_regs.h>\n+\n+#include \"common.h\"\n+#include \"dev-ap9x-pci.h\"\n+#include \"dev-eth.h\"\n+#include \"dev-gpio-buttons.h\"\n+#include \"dev-leds-gpio.h\"\n+#include \"dev-spi.h\"\n+#include \"dev-m25p80.h\"\n+#include \"dev-nfc.h\"\n+#include \"dev-usb.h\"\n+#include \"dev-wmac.h\"\n+#include \"machtypes.h\"\n+\n+/* QCA9563 GPIOs */\n+#define WNDR4500V3_GPIO_LED_POWER_GREEN\t\t5\n+#define WNDR4500V3_GPIO_LED_POWER_AMBER\t\t6\n+#define WNDR4500V3_GPIO_LED_USB1\t\t7\n+#define WNDR4500V3_GPIO_LED_USB2\t\t8\n+#define WNDR4500V3_GPIO_LED_WPS\t\t\t15\n+#define WNDR4500V3_GPIO_LED_WAN_AMBER\t\t16\n+#define WNDR4500V3_GPIO_LED_WAN_GREEN\t\t17\n+#define WNDR4500V3_GPIO_LED_WLAN2G\t\t19\n+\n+#define WNDR4500V3_GPIO_BTN_WPS\t\t\t1\n+#define WNDR4500V3_GPIO_BTN_RESET\t\t2\n+\n+#define WNDR4500V3_GPIO_SPI_CS1\t\t\t14\n+\n+/* AR9580 GPIOs */\n+#define WNDR4500V3_WGPIO_LED_WLAN5G\t\t7\n+\n+#define WNDR4500V3_WGPIO_BTN_WIRELESS\t\t9\n+\n+#define WNDR4500V3_KEYS_POLL_INTERVAL\t\t20\t/* msecs */\n+#define WNDR4500V3_KEYS_DEBOUNCE_INTERVAL\t(3 * WNDR4500V3_KEYS_POLL_INTERVAL)\n+\n+#define WNDR4500V3_LAN_MAC_OFFSET\t\t0\n+#define WNDR4500V3_WAN_MAC_OFFSET\t\t6\n+#define WNDR4500V3_WLAN_MAC_OFFSET\t\t12\n+#define WNDR4500V3_WMAC_CALDATA_OFFSET\t\t0x1000\n+#define WNDR4500V3_PCIE_CALDATA_OFFSET\t\t0x5000\n+\n+static struct gpio_led wndr4500v3_leds_gpio[] __initdata = {\n+\t{\n+\t\t.name\t\t= \"netgear:green:power\",\n+\t\t.gpio\t\t= WNDR4500V3_GPIO_LED_POWER_GREEN,\n+\t\t.active_low\t= 1,\n+\t},\n+\t{\n+\t\t.name\t\t= \"netgear:amber:power\",\n+\t\t.gpio\t\t= WNDR4500V3_GPIO_LED_POWER_AMBER,\n+\t\t.active_low\t= 1,\n+\t},\n+\t{\n+\t\t.name\t\t= \"netgear:green:wan\",\n+\t\t.gpio\t\t= WNDR4500V3_GPIO_LED_WAN_GREEN,\n+\t\t.active_low\t= 1,\n+\t},\n+\t{\n+\t\t.name\t\t= \"netgear:amber:wan\",\n+\t\t.gpio\t\t= WNDR4500V3_GPIO_LED_WAN_AMBER,\n+\t\t.active_low\t= 1,\n+\t},\n+\t{\n+\t\t.name\t\t= \"netgear:green:usb1\",\n+\t\t.gpio\t\t= WNDR4500V3_GPIO_LED_USB1,\n+\t\t.active_low\t= 1,\n+\t},\n+\t{\n+\t\t.name\t\t= \"netgear:green:usb2\",\n+\t\t.gpio\t\t= WNDR4500V3_GPIO_LED_USB2,\n+\t\t.active_low\t= 1,\n+\t},\n+\t{\n+\t\t.name\t\t= \"netgear:green:wps\",\n+\t\t.gpio\t\t= WNDR4500V3_GPIO_LED_WPS,\n+\t\t.active_low\t= 1,\n+\t},\n+\t{\n+\t\t.name\t\t= \"netgear:green:wlan2g\",\n+\t\t.gpio\t\t= WNDR4500V3_GPIO_LED_WLAN2G,\n+\t\t.active_low\t= 1,\n+\t}\n+};\n+\n+static struct gpio_keys_button wndr4500v3_gpio_keys[] __initdata = {\n+\t{\n+\t\t.desc\t\t= \"Reset button\",\n+\t\t.type\t\t= EV_KEY,\n+\t\t.code\t\t= KEY_RESTART,\n+\t\t.debounce_interval = WNDR4500V3_KEYS_DEBOUNCE_INTERVAL,\n+\t\t.gpio\t\t= WNDR4500V3_GPIO_BTN_RESET,\n+\t\t.active_low\t= 1,\n+\t},\n+\t{\n+\t\t.desc\t\t= \"WPS button\",\n+\t\t.type\t\t= EV_KEY,\n+\t\t.code\t\t= KEY_WPS_BUTTON,\n+\t\t.debounce_interval = WNDR4500V3_KEYS_DEBOUNCE_INTERVAL,\n+\t\t.gpio\t\t= WNDR4500V3_GPIO_BTN_WPS,\n+\t\t.active_low\t= 1,\n+\t}\n+};\n+\n+static struct gpio_keys_button wndr4500v3_wmac_gpio_keys[] = {\n+\t{\n+\t\t.desc\t\t= \"Wireless button\",\n+\t\t.type\t\t= EV_KEY,\n+\t\t.code\t\t= KEY_RFKILL,\n+\t\t.debounce_interval = WNDR4500V3_KEYS_DEBOUNCE_INTERVAL,\n+\t\t.gpio\t\t= WNDR4500V3_WGPIO_BTN_WIRELESS,\n+\t\t.active_low\t= 1,\n+\t}\n+};\n+\n+static struct ar8327_pad_cfg wndr4500v3_qca8337n_pad0_cfg = {\n+\t.mode = AR8327_PAD_MAC_SGMII,\n+\t.sgmii_delay_en = true,\n+};\n+\n+static struct ar8327_led_cfg wndr4500v3_qca8337n_led_cfg = {\n+\t.led_ctrl0 = 0xcc35cc35,\n+\t.led_ctrl1 = 0xcb37cb37,\n+\t.led_ctrl2 = 0x00000000,\n+\t.led_ctrl3 = 0x00f3cf00,\n+\t.open_drain = true,\n+};\n+\n+static struct ar8327_platform_data wndr4500v3_qca8337n_data = {\n+\t.pad0_cfg = &wndr4500v3_qca8337n_pad0_cfg,\n+\t.port0_cfg = {\n+\t\t.force_link = 1,\n+\t\t.speed = AR8327_PORT_SPEED_1000,\n+\t\t.duplex = 1,\n+\t\t.txpause = 1,\n+\t\t.rxpause = 1,\n+\t},\n+\t.led_cfg = &wndr4500v3_qca8337n_led_cfg,\n+};\n+\n+static struct mdio_board_info wndr4500v3_mdio0_info[] = {\n+\t{\n+\t\t.bus_id = \"ag71xx-mdio.0\",\n+\t\t.phy_addr = 0,\n+\t\t.platform_data = &wndr4500v3_qca8337n_data,\n+\t},\n+};\n+\n+static struct spi_board_info wndr4500v3_spi_info[] = {\n+\t{\n+\t\t.bus_num\t= 0,\n+\t\t.chip_select\t= 0,\n+\t\t.max_speed_hz\t= 25000000,\n+\t\t.modalias\t= \"m25p80\",\n+\t},\n+\t{\n+\t\t.bus_num\t= 0,\n+\t\t.chip_select\t= 1,\n+\t\t.max_speed_hz\t= 50000000,\n+\t\t.modalias\t= \"gd5f\",\n+\t},\n+};\n+\n+static struct ath79_spi_platform_data wndr4500v3_spi_data = {\n+\t.bus_num = 0,\n+\t.num_chipselect = 2,\n+};\n+\n+static void __init wndr4500v3_setup(void)\n+{\n+\tu8 *art = (u8 *) KSEG1ADDR(0x1fff0000);\n+\tu8 tmpmac[ETH_ALEN];\n+\n+\tath79_register_spi(&wndr4500v3_spi_data, wndr4500v3_spi_info, 2);\n+\n+\tath79_register_leds_gpio(-1, ARRAY_SIZE(wndr4500v3_leds_gpio),\n+\t\t\t\t wndr4500v3_leds_gpio);\n+\n+\tath79_register_gpio_keys_polled(-1, WNDR4500V3_KEYS_POLL_INTERVAL,\n+\t\t\t\t\tARRAY_SIZE(wndr4500v3_gpio_keys),\n+\t\t\t\t\twndr4500v3_gpio_keys);\n+\n+\tap9x_pci_setup_wmac_btns(0, wndr4500v3_wmac_gpio_keys,\n+\t\t\t\t ARRAY_SIZE(wndr4500v3_wmac_gpio_keys),\n+\t\t\t\t WNDR4500V3_KEYS_POLL_INTERVAL);\n+\n+\tath79_init_mac(tmpmac, art + WNDR4500V3_WLAN_MAC_OFFSET, 0);\n+\tath79_register_wmac(art + WNDR4500V3_WMAC_CALDATA_OFFSET, tmpmac);\n+\n+\tap9x_pci_setup_wmac_led_pin(0, WNDR4500V3_WGPIO_LED_WLAN5G);\n+\tath79_init_mac(tmpmac, art + WNDR4500V3_WLAN_MAC_OFFSET, 1);\n+\tap91_pci_init(art + WNDR4500V3_PCIE_CALDATA_OFFSET, tmpmac);\n+\n+\tmdiobus_register_board_info(wndr4500v3_mdio0_info,\n+\t\t\t\t    ARRAY_SIZE(wndr4500v3_mdio0_info));\n+\n+\tath79_register_mdio(0, 0x0);\n+\n+\tath79_init_mac(ath79_eth0_data.mac_addr, art + WNDR4500V3_LAN_MAC_OFFSET, 0);\n+\n+\t/* GMAC0 is connected to a QCA8337N switch */\n+\tath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII;\n+\tath79_eth0_data.speed = SPEED_1000;\n+\tath79_eth0_data.duplex = DUPLEX_FULL;\n+\tath79_eth0_data.phy_mask = BIT(0);\n+\tath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;\n+\tath79_register_eth(0);\n+\n+\tath79_register_usb();\n+}\n+\n+MIPS_MACHINE(ATH79_MACH_WNDR4500_V3, \"WNDR4500_V3\", \"NETGEAR WNDR4500v3\",\n+\t     wndr4500v3_setup);\ndiff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h\nindex 5bc50a42ff..a4aa197e35 100644\n--- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h\n+++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h\n@@ -303,6 +303,7 @@ enum ath79_mach_type {\n \tATH79_MACH_WNDR3700,\t\t\t/* NETGEAR WNDR3700/WNDR3800/WNDRMAC */\n \tATH79_MACH_WNDR3700_V4,\t\t\t/* NETGEAR WNDR3700v4 */\n \tATH79_MACH_WNDR4300,\t\t\t/* NETGEAR WNDR4300 */\n+\tATH79_MACH_WNDR4500_V3,\t\t\t/* NETGEAR WNDR4500 v3 */\n \tATH79_MACH_WNR1000_V2,\t\t\t/* NETGEAR WNR1000 v2 */\n \tATH79_MACH_WNR2000,\t\t\t/* NETGEAR WNR2000 */\n \tATH79_MACH_WNR2000_V3,\t\t\t/* NETGEAR WNR2000 v3 */\ndiff --git a/target/linux/ar71xx/image/legacy.mk b/target/linux/ar71xx/image/legacy.mk\nindex b400e5ddbb..2808516ea0 100644\n--- a/target/linux/ar71xx/image/legacy.mk\n+++ b/target/linux/ar71xx/image/legacy.mk\n@@ -274,6 +274,7 @@ wnr2000v4_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(u-boot-env)ro,3776k(firmw\n r6100_mtdlayout=mtdparts=ar934x-nfc:128k(u-boot)ro,256k(caldata)ro,256k(caldata-backup),512k(config),512k(pot),2048k(kernel),122240k(ubi),25600k@0x1a0000(firmware),2048k(language),3072k(traffic_meter)\n tew823dru_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(nvram)ro,15296k(firmware),192k(lang)ro,512k(my-dlink)ro,64k(mac)ro,64k(art)ro\n wndr4300_mtdlayout=mtdparts=ar934x-nfc:256k(u-boot)ro,256k(u-boot-env)ro,256k(caldata)ro,512k(pot),2048k(language),512k(config),3072k(traffic_meter),2048k(kernel),23552k(ubi),25600k@0x6c0000(firmware),256k(caldata_backup),-(reserved)\n+wndr4500v3_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(caldata_backup),64k(config),64k(traffic_meter),64k(pot),1408k(reserved),64k(caldata);spi0.1:2048k(kernel),23552k(ubi),25600k@0x0(firmware),2048k(language),128k(mtdoops),-(reserved) nofwsplit\n zcn1523h_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6208k(rootfs),1472k(kernel),64k(configure)ro,64k(mfg)ro,64k(art)ro,7680k@0x50000(firmware)\n mynet_rext_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,7808k(firmware),64k(nvram)ro,64k(ART)ro\n zyx_nbg6716_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(env)ro,64k(RFdata)ro,-(nbu);ar934x-nfc:2048k(zyxel_rfsd),2048k(romd),1024k(header),2048k(kernel),-(ubi)\n@@ -1016,6 +1017,7 @@ ifeq ($(SUBTARGET),nand)\n \n $(eval $(call SingleProfile,NetgearNAND,64k,WNDR3700V4,wndr3700v4,WNDR3700_V4,ttyS0,115200,$$(wndr4300_mtdlayout),0x33373033,WNDR3700v4,\"\",-H 29763948+128+128,wndr4300))\n $(eval $(call SingleProfile,NetgearNAND,64k,WNDR4300V1,wndr4300,WNDR4300,ttyS0,115200,$$(wndr4300_mtdlayout),0x33373033,WNDR4300,\"\",-H 29763948+0+128+128+2x2+3x3,wndr4300))\n+$(eval $(call SingleProfile,NetgearNAND,64k,WNDR4500V3,wndr4500v3,WNDR4500_V3,ttyS0,115200,$$(wndr4500v3_mtdlayout),0x27051956,WNDR4500series,\"\",-H 29764821+2+128+128+3x3+3x3+5508012173,wndr4300))\n $(eval $(call SingleProfile,NetgearNAND,64k,R6100,r6100,R6100,ttyS0,115200,$$(r6100_mtdlayout),0x36303030,R6100,\"\",-H 29764434+0+128+128+2x2+2x2,wndr4300))\n \n $(eval $(call SingleProfile,ZyXELNAND,128k,NBG6716,nbg6716,NBG6716,ttyS0,115200,NBG6716,$$(zyx_nbg6716_mtdlayout),mem=256M))\ndiff --git a/target/linux/ar71xx/image/nand.mk b/target/linux/ar71xx/image/nand.mk\nindex fafccb9b77..b4ae6c21d9 100644\n--- a/target/linux/ar71xx/image/nand.mk\n+++ b/target/linux/ar71xx/image/nand.mk\n@@ -115,6 +115,12 @@ define LegacyDevice/WNDR4300V1\n endef\n LEGACY_DEVICES += WNDR4300V1\n \n+define LegacyDevice/WNDR4500V3\n+  DEVICE_TITLE := NETGEAR WNDR4500v3\n+  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport\n+endef\n+LEGACY_DEVICES += WNDR4500V3\n+\n define LegacyDevice/NBG6716\n   DEVICE_TITLE := Zyxel NBG 6716\n   DEVICE_PACKAGES := kmod-rtc-pcf8563 kmod-ath10k ath10k-firmware-qca988x\ndiff --git a/target/linux/ar71xx/nand/config-default b/target/linux/ar71xx/nand/config-default\nindex 57318b38e8..6c50d6c071 100644\n--- a/target/linux/ar71xx/nand/config-default\n+++ b/target/linux/ar71xx/nand/config-default\n@@ -183,6 +183,7 @@ CONFIG_ATH79_MACH_RAMBUTAN=y\n # CONFIG_ATH79_MACH_WNDAP360 is not set\n # CONFIG_ATH79_MACH_WNDR3700 is not set\n CONFIG_ATH79_MACH_WNDR4300=y\n+CONFIG_ATH79_MACH_WNDR4500_V3=y\n # CONFIG_ATH79_MACH_WNR2000 is not set\n # CONFIG_ATH79_MACH_WNR2000_V3 is not set\n # CONFIG_ATH79_MACH_WNR2000_V4 is not set\n@@ -230,6 +231,8 @@ CONFIG_MTD_NAND_BCH=y\n CONFIG_MTD_NAND_ECC=y\n CONFIG_MTD_NAND_ECC_BCH=y\n # CONFIG_MTD_REDBOOT_PARTS is not set\n+CONFIG_MTD_SPI_NAND=y\n+CONFIG_MTD_SPI_NAND_DEVICES=y\n # CONFIG_MTD_SPLIT_EVA_FW is not set\n # CONFIG_MTD_SPLIT_SEAMA_FW is not set\n # CONFIG_MTD_SPLIT_TPLINK_FW is not set\n",
    "prefixes": [
        "LEDE-DEV",
        "4/4"
    ]
}