aboutsummaryrefslogtreecommitdiffstats
path: root/package/broadcom-diag/src/gpio.h
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@openwrt.org>2013-04-28 21:11:17 +0000
committerHauke Mehrtens <hauke@openwrt.org>2013-04-28 21:11:17 +0000
commit7c4a6af2475741895371b22534100da3563683a9 (patch)
tree038a2b191931b275a0469dd055de17e4297f5109 /package/broadcom-diag/src/gpio.h
parentd4b0ccd4a5d8d49be155218a18f8cfcef44953cb (diff)
downloadmaster-187ad058-7c4a6af2475741895371b22534100da3563683a9.tar.gz
master-187ad058-7c4a6af2475741895371b22534100da3563683a9.tar.bz2
master-187ad058-7c4a6af2475741895371b22534100da3563683a9.zip
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 d0e3e06c8a..8bd3fe02f8 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 */