mediatek: filogic: asus-tuf-ax6000: use NVMEM-on-UBI
[openwrt/openwrt.git] / target / linux / mediatek / filogic / base-files / etc / hotplug.d / firmware / 11-mt76-caldata
1 #!/bin/sh
2
3 [ -e /lib/firmware/$FIRMWARE ] && exit 0
4
5 . /lib/functions/caldata.sh
6
7 board=$(board_name)
8
9 case "$FIRMWARE" in
10 "mediatek/mt7915_eeprom.bin")
11 case "$board" in
12 smartrg,sdg-8622)
13 caldata_extract_mmc "factory" 0xa0000 0x1000
14 ;;
15 esac
16 ;;
17 "mediatek/mt7916_eeprom.bin")
18 case "$board" in
19 acer,predator-w6|\
20 smartrg,sdg-8632)
21 caldata_extract_mmc "factory" 0xa0000 0x1000
22 ;;
23 esac
24 ;;
25 "mediatek/mt7981_eeprom_mt7976_dbdc.bin")
26 case "$board" in
27 cmcc,rax3000m)
28 case "$(cmdline_get_var root)" in
29 /dev/mmc*)
30 caldata_extract_mmc "factory" 0x0 0x1000
31 ;;
32 esac
33 ;;
34 ubnt,unifi-6-plus)
35 caldata_extract_mmc "factory" 0x0 0x1000
36 ;;
37 esac
38 ;;
39 "mediatek/mt7986_eeprom_mt7975_dual.bin")
40 case "$board" in
41 mercusys,mr90x-v1)
42 ln -sf /tmp/tp_data/MT7986_EEPROM.bin \
43 /lib/firmware/$FIRMWARE
44 ;;
45 smartrg,sdg-8612|\
46 smartrg,sdg-8614|\
47 smartrg,sdg-8622|\
48 smartrg,sdg-8632)
49 caldata_extract_mmc "factory" 0x0 0x1000
50 ;;
51 esac
52 ;;
53 "mediatek/mt7986_eeprom_mt7976.bin")
54 case "$board" in
55 acer,predator-w6)
56 caldata_extract_mmc "factory" 0x0 0x1000
57 ;;
58 esac
59 ;;
60 "mediatek/mt7986_eeprom_mt7976_dual.bin")
61 case "$board" in
62 jdcloud,re-cp-03)
63 caldata_extract_mmc "factory" 0x0 0x1000
64 ;;
65 esac
66 ;;
67 *)
68 exit 1
69 ;;
70 esac