[OpenWrt-Devel] [PATCH v2] ar71xx: Support for Mikrotik RB2011UiAS
stharward at gmail.com
stharward at gmail.com
Sat Jun 28 21:56:31 EDT 2014
The RB2011UiAS is almost exactly the same as the RB2011UAS, which is
already supported. Hardware-wise, it adds a passive power injector on
Eth10. Software-wise, Routerboot passes a different board name on the
kernel command line. Hence the need for a patch.
Not yet working:
* touchscreen: doesn't work on RB2011UAS either. It seems to be driven
by an ADS7843-compatible IC, but figuring out which GPIO pins it's
connected to is work for the future.
* control of power injector: remains off. Probably also GPIO-controlled.
---
.../ar71xx/base-files/etc/uci-defaults/01_leds | 1 +
.../ar71xx/base-files/etc/uci-defaults/02_network | 3 ++-
target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 +++
.../715-MIPS-ath79-add_mikrotik_rb2011uias.patch | 26 ++++++++++++++++++++++
4 files changed, 32 insertions(+), 1 deletion(-)
create mode 100644 target/linux/ar71xx/patches-3.10/715-MIPS-ath79-add_mikrotik_rb2011uias.patch
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index fe5ff93..ef38fe9 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -72,6 +72,7 @@ rb-750)
rb-2011l|\
rb-2011uas|\
+rb-2011uias|\
rb-2011uas-2hnd)
ucidef_set_led_switch "eth6" "ETH6" "rb:green:eth6" "switch1" "0x20"
ucidef_set_led_switch "eth7" "ETH7" "rb:green:eth7" "switch1" "0x10"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 99c0268..70df70a 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -57,6 +57,7 @@ tl-wdr4900-v2)
db120 |\
rb-2011l | \
rb-2011uas |\
+rb-2011uias |\
rb-2011uas-2hnd)
ucidef_set_interfaces_lan_wan "eth0.1 eth1" "eth0.2"
ucidef_add_switch "switch0" "1" "1"
@@ -66,7 +67,7 @@ rb-2011uas-2hnd)
ucidef_add_switch_vlan "switch1" "1" "0 1 2 3 4 5"
case "$board" in
- rb-2011uas*)
+ rb-2011uas* | rb-2011uias)
ucidef_set_interface_raw "sfp" "eth0.3"
ucidef_add_switch_vlan "switch0" "3" "0t 6"
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 4656ac2..b7eeb70 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -463,6 +463,9 @@ ar71xx_board_detect() {
*"RouterBOARD 2011UAS")
name="rb-2011uas"
;;
+ *"RouterBOARD 2011UiAS")
+ name="rb-2011uias"
+ ;;
*"RouterBOARD 2011UAS-2HnD")
name="rb-2011uas-2hnd"
;;
diff --git a/target/linux/ar71xx/patches-3.10/715-MIPS-ath79-add_mikrotik_rb2011uias.patch b/target/linux/ar71xx/patches-3.10/715-MIPS-ath79-add_mikrotik_rb2011uias.patch
new file mode 100644
index 0000000..c2ff338
--- /dev/null
+++ b/target/linux/ar71xx/patches-3.10/715-MIPS-ath79-add_mikrotik_rb2011uias.patch
@@ -0,0 +1,26 @@
+--- a/arch/mips/ath79/mach-rb2011.c
++++ b/arch/mips/ath79/mach-rb2011.c
+@@ -321,6 +321,13 @@ static void __init rb2011us_setup(void)
+
+ MIPS_MACHINE_NONAME(ATH79_MACH_RB_2011US, "2011US", rb2011us_setup);
+
++static void __init rb2011r5_setup(void)
++{
++ rb2011_setup(RB2011_FLAG_SFP | RB2011_FLAG_USB);
++}
++
++MIPS_MACHINE_NONAME(ATH79_MACH_RB_2011R5, "2011r5", rb2011r5_setup);
++
+ static void __init rb2011g_setup(void)
+ {
+ rb2011_setup(RB2011_FLAG_SFP |
+--- a/arch/mips/ath79/machtypes.h
++++ b/arch/mips/ath79/machtypes.h
+@@ -93,6 +93,7 @@ enum ath79_mach_type {
+ ATH79_MACH_RB_2011G, /* Mikrotik RouterBOARD 2011UAS-2HnD */
+ ATH79_MACH_RB_2011L, /* Mikrotik RouterBOARD 2011L */
+ ATH79_MACH_RB_2011US, /* Mikrotik RouterBOARD 2011UAS */
++ ATH79_MACH_RB_2011R5, /* Mikrotik RouterBOARD 2011UiAS */
+ ATH79_MACH_RW2458N, /* Redwave RW2458N */
+ ATH79_MACH_TEW_632BRP, /* TRENDnet TEW-632BRP */
+ ATH79_MACH_TEW_673GRU, /* TRENDnet TEW-673GRU */
--
1.8.5.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list