summaryrefslogtreecommitdiffstats
path: root/package/broadcom-diag/src/gpio.h
diff options
context:
space:
mode:
authorhauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-04-28 21:11:17 +0000
committerhauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-04-28 21:11:17 +0000
commit769fd460eed08459b820aaedec6bd3f1e24a8b6f (patch)
tree038a2b191931b275a0469dd055de17e4297f5109 /package/broadcom-diag/src/gpio.h
parentaadea55420ccdaf46742762179c3659d3faba8cd (diff)
broadcom-diag: support for the WNDR3700v3
I recently picked up a WNDR3700 to put OpenWRT on, and only after tearing into the box did I find it was one of the v3 boards, with poor OpenWRT support. This patch should add the board detection and LED/button control to the broadcom-diag module, and should generate a netgear .chk image that the bootloader and stock firmware will accept. The changes to the broadcom-diag module are more than a few lines because the WNDR3700v3 is driving its LEDs through an HC164 8-bit shift register. Signed-off-by: Owen Kirby <osk@exegin.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36482 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/broadcom-diag/src/gpio.h')
-rw-r--r--package/broadcom-diag/src/gpio.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/package/broadcom-diag/src/gpio.h b/package/broadcom-diag/src/gpio.h
index d0e3e06c8..8bd3fe02f 100644
--- a/package/broadcom-diag/src/gpio.h
+++ b/package/broadcom-diag/src/gpio.h
@@ -9,8 +9,14 @@
#define EXTIF_ADDR 0x1f000000
#define EXTIF_UART (EXTIF_ADDR + 0x00800000)
+/* GPIO pins driving LEDs through a shift register */
+#define SHIFTREG_DATA (1 << 6)
+#define SHIFTREG_CLK (1 << 7)
+#define SHIFTREG_MAX_BITS 8
+
#define GPIO_TYPE_NORMAL (0x0 << 24)
#define GPIO_TYPE_EXTIF (0x1 << 24)
+#define GPIO_TYPE_SHIFT (0x2 << 24)
#define GPIO_TYPE_MASK (0xf << 24)
#endif /* __DIAG_GPIO_H */