This board has been supported in the ar71xx. Links: * https://mikrotik.com/product/RB912UAG-2HPnD * https://openwrt.org/toh/hwdata/mikrotik/mikrotik_rb912uag-2hpnd This also supports the 5GHz flavour of the board. Hardware: * SoC: Atheros AR9342, * RAM: DDR 64MB, * SPI NOR: 64KB, * NAND: 128MB, * Ethernet: x1 10/100/1000 port with passive POE in, * Wi-Fi: 802.11 b/g/n, * PCIe, * USB: 2.0 EHCI controller, connected to mPCIe slot and a Type-A port -- both can be used for LTE modem, but only one can be used at any time. * LEDs: 5 general purpose LEDs (led1..led5), power LED, user LED, Ethernet phy LED, * Button, * Beeper. Not working: * Button: it shares gpio line 15 with NAND ALE and NAND IO7, and current drivers doesn't easily support this configuration, * Beeper: it is connected to bit 5 of a serial shift register (tested with sysfs led trigger timer). But kmod-gpio-beeper doesn't work -- we left this as is for now. Flashing: * Use the RouterBOARD Reset button to enable TFTP netboot, boot kernel and initramfs and then perform sysupgrade. * From ar71xx OpenWrt firmware run: $ sysupgrade -F /tmp/<sysupgrade.bin> For more info see: https://openwrt.org/toh/mikrotik/common. Co-Developed-by: Koen Vandeputte <koen.vandeputte@citymesh.com> Reviewed-by: Sergey Ryazanov <ryazanov.s.a@gmail.com> Signed-off-by: Denis Kalashnikov <denis281089@gmail.com>
40 lines
962 B
Bash
40 lines
962 B
Bash
#!/bin/sh
|
|
|
|
[ -e /lib/firmware/$FIRMWARE ] && exit 0
|
|
|
|
. /lib/functions/caldata.sh
|
|
|
|
caldata_mikrotik_ath9k() {
|
|
local offset=$(($1))
|
|
local count=$(($2))
|
|
local macaddr=$3
|
|
|
|
caldata_from_file $wlan_data $offset $count /tmp/$FIRMWARE
|
|
ath9k_patch_mac "$macaddr" /tmp/$FIRMWARE
|
|
caldata_sysfsload_from_file /tmp/$FIRMWARE 0x0 $count
|
|
rm -f /tmp/$FIRMWARE
|
|
}
|
|
|
|
wlan_data="/sys/firmware/mikrotik/hard_config/wlan_data"
|
|
mac_base="$(cat /sys/firmware/mikrotik/hard_config/mac_base)"
|
|
|
|
board=$(board_name)
|
|
|
|
case "$FIRMWARE" in
|
|
"ath9k-eeprom-ahb-18100000.wmac.bin")
|
|
case $board in
|
|
mikrotik,routerboard-912uag-2hpnd|\
|
|
mikrotik,routerboard-lhg-2nd|\
|
|
mikrotik,routerboard-sxt-5nd-r2|\
|
|
mikrotik,routerboard-wapr-2nd)
|
|
caldata_mikrotik_ath9k 0x1000 0x440 $(macaddr_add "$mac_base" 1)
|
|
;;
|
|
mikrotik,routerboard-wap-g-5hact2hnd)
|
|
caldata_mikrotik_ath9k 0x1000 0x440 $(macaddr_add "$mac_base" 2)
|
|
;;
|
|
*)
|
|
caldata_die "board $board is not supported yet"
|
|
;;
|
|
esac
|
|
;;
|
|
esac
|