WRT600N/V11 GPIOS

From ZeroPain's Wiki

Jump to: navigation, search
  • 0 Unknown
  • 1 Unknown
  • 2 Polarity = Reverse - Power LED
  • 3 Polarity = Reverse - USB LED
  • 4 Unknown
  • 5 Unknown
  • 6 - Reset Button
  • 7 - SES Button
  • 8 Polarity = Reverse - 2.4Ghz SES LED Amber
  • 9 Polarity = Reverse - 2.4Ghz SES LED Green
  • 10 Polarity = Reverse - 5.6Ghz SES LED Amber
  • 11 Polarity = Reverse - 5.6Ghz SES LED Green
  • 12 Unknown
  • 13 Unknown
  • 14 Unknown
  • 15 Unknown

6/12/08 - I Submitted my first patch to a open source project :)

It allows me to turn on and off and the color of the leds on my new router :)

Index: src/diag.c
===================================================================
--- src/diag.c  (revision 11446)
+++ src/diag.c  (working copy)
@@ -61,6 +61,8 @@
        WRTSL54GS,
        WRT54G3G,
        WRT350N,
+       WRT600N,
+       WRT600NV11,
 
        /* ASUS */
        WLHDD,
@@ -237,6 +239,39 @@
                },
                .platform_init = bcm57xx_init,
        },
+        [WRT600N] = {
+                .name           = "Linksys WRT600N",
+                .buttons        = {
+                        { .name = "reset",      .gpio = 1 << 6 },
+                        { .name = "ses",        .gpio = 1 << 7 },
+                },
+                .leds           = {
+                        { .name = "power",              .gpio = 1 << 2,  .polarity = REVERSE }, // Power LED
+                        { .name = "usb",                .gpio = 1 << 3,  .polarity = REVERSE }, // USB LED
+                        { .name = "wl0_ses_amber",      .gpio = 1 << 8,  .polarity = REVERSE }, // 2.4Ghz LED Amber
+                        { .name = "wl0_ses_green",      .gpio = 1 << 9,  .polarity = REVERSE }, // 2.4Ghz LED Green
+                        { .name = "wl1_ses_amber",      .gpio = 1 << 10, .polarity = REVERSE }, // 5.6Ghz LED Amber
+                        { .name = "wl1_ses_green",      .gpio = 1 << 11, .polarity = REVERSE }, // 5.6Ghz LED Green
+                },
+                .platform_init = bcm57xx_init,
+        },
+        [WRT600NV11] = {
+                .name           = "Linksys WRT600N V1.1",
+                .buttons        = {
+                        { .name = "reset",      .gpio = 1 << 6 },
+                        { .name = "ses",        .gpio = 1 << 7 },
+                },
+                .leds           = {
+                        { .name = "power",             .gpio = 1 << 2,  .polarity = REVERSE }, // Power LED
+                       { .name = "usb",                .gpio = 1 << 3,  .polarity = REVERSE }, // USB LED
+                       { .name = "wl0_ses_amber",      .gpio = 1 << 8,  .polarity = REVERSE }, // 2.4Ghz LED Amber
+                        { .name = "wl0_ses_green",     .gpio = 1 << 9,  .polarity = REVERSE }, // 2.4Ghz LED Green
+                        { .name = "wl1_ses_amber",      .gpio = 1 << 10, .polarity = REVERSE }, // 5.6Ghz LED Amber
+                        { .name = "wl1_ses_green",      .gpio = 1 << 11, .polarity = REVERSE }, // 5.6Ghz LED Green
+
+                },
+                .platform_init = bcm57xx_init,
+        },
        /* Asus */
        [WLHDD] = {
                .name           = "ASUS WL-HDD",
@@ -743,6 +778,14 @@
        boardnum = getvar("boardnum");
        boardtype = getvar("boardtype");
 
+       if (!strcmp(boardnum, "20070615")) { /* Linksys WRT600N  v1/V1.1 */
+               if (!strcmp(boardtype, "0x478") && !strcmp(getvar("cardbus"), "0") && !strcmp(getvar("switch_type"),"BCM5395"))
+                        return &platforms[WRT600NV11];
+
+               if (!strcmp(boardtype, "0x478") && !strcmp(getvar("cardbus"), "0"))
+                        return &platforms[WRT600N];
+        }
+
        if (startswith(getvar("pmon_ver"), "CFE")) {
                /* CFE based - newer hardware */
                if (!strcmp(boardnum, "42")) { /* Linksys */
@@ -758,7 +801,7 @@
                        /* default to WRT54G */
                        return &platforms[WRT54G];
                }
-
+
                if (!strcmp(boardnum, "45")) { /* ASUS */
                        if (!strcmp(boardtype,"0x042f"))
                                return &platforms[WL500GP];
Index: src/diag.h
===================================================================
--- src/diag.h  (revision 11446)
+++ src/diag.h  (working copy)
@@ -24,7 +24,7 @@
 #include <linux/irq.h>
 #define MODULE_NAME "diag"
 
-#define MAX_GPIO 8
+#define MAX_GPIO 16
 #define FLASH_TIME HZ/6
 
 enum polarity_t {
Google AdSense