1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-17 04:33:57 +02:00
openwrt/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
Roger Pueyo Centelles 151e43df7a ath79: add support for MikroTik SXT 5nD r2 (SXT Lite5)
The MikroTik SXT Lite5 (product code RBSXT5nDr2, also SXT 5nD r2) is
an outdoor 5GHz CPE with a 16 dBi integrated antenna built around the
Atheros AR9344 SoC. It is based on the "sxt5n" board platform.

Specifications:
 - SoC: Atheros AR9344
 - RAM: 64 MB
 - Storage: 128 MB NAND
 - Wireless: Atheros AR9340 (SoC) 802.11a/n 2x2:2
 - Ethernet: Atheros AR8229 switch (SoC), 1x 10/100 port,
    8-32 Vdc PoE in
 - 6 user-controllable LEDs:
  · 1x power (blue)
  · 1x wlan (green)
  · 4x rssi (green)
 - 1 GPIO-controlled buzzer

 See https://mikrotik.com/product/RBSXT5nDr2 for more details.

Notes:
 The device was already supported in the ar71xx target. There, the
 Ethernet port was handled by GMAC1. Here in ath79 it is handled by
 GMAC0, which allows to get link information (loss, speed, duplex) on
 the eth0 interface.

Flashing:
 TFTP boot initramfs image and then perform sysupgrade. Follow common
 MikroTik procedure as in https://openwrt.org/toh/mikrotik/common.

Acknowledgments:
 Michael Pratt (@mpratt14) for helping on the network settings.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
[rebase, use mikrotik LED label prefix, make names consistent,
add reg for bootloader2, use led_user for boot indication etc.,
minor cosmetic changes]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-12 14:03:17 +02:00

34 lines
886 B
Bash

#!/bin/sh
[ -e /lib/firmware/$FIRMWARE ] && exit 0
. /lib/functions/caldata.sh
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-lhg-2nd|\
mikrotik,routerboard-sxt-5nd-r2)
caldata_from_file $wlan_data 0x1000 0x440 /tmp/$FIRMWARE
ath9k_patch_mac $(macaddr_add "$mac_base" +1) /tmp/$FIRMWARE
caldata_sysfsload_from_file /tmp/$FIRMWARE 0x0 0x440
rm -f /tmp/$FIRMWARE
;;
mikrotik,routerboard-wap-g-5hact2hnd)
caldata_from_file $wlan_data 0x1000 0x440 /tmp/$FIRMWARE
ath9k_patch_mac $(macaddr_add "$mac_base" +2) /tmp/$FIRMWARE
caldata_sysfsload_from_file /tmp/$FIRMWARE 0x0 0x440
rm -f /tmp/$FIRMWARE
;;
*)
caldata_die "board $board is not supported yet"
;;
esac
;;
esac