Skip to content

Commit

Permalink
mediatek: fix gl-mt6000 wireless
Browse files Browse the repository at this point in the history
  • Loading branch information
coolsnowwolf committed Nov 6, 2023
1 parent 2e5b2e9 commit f852316
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
4 changes: 2 additions & 2 deletions target/linux/mediatek/dts/mt7986a-glinet-gl-mt6000.dts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
compatible = "glinet,gl-mt6000", "mediatek,mt7986a";

aliases {
led-boot = &led_run;
led-boot = &led_run;
led-failsafe = &led_run;
led-running = &led_white;
led-upgrade = &led_run;
Expand Down Expand Up @@ -55,7 +55,7 @@
leds {
compatible = "gpio-leds";

led_run: led@0 {
led_run: run {
label = "blue:run";
gpios = <&pio 38 GPIO_ACTIVE_LOW>;
default-state = "on";
Expand Down
22 changes: 22 additions & 0 deletions target/linux/mediatek/filogic/base-files/lib/preinit/81_fix_eeprom
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
. /lib/functions/caldata.sh

preinit_fix_eeprom() {
case $(board_name) in
glinet,gl-mt6000)
mmc_part=$(find_mmc_part factory)
FIRMWARE="mediatek/mt7986_eeprom_mt7976_dual.bin"
[ ! -e /lib/firmware/"$FIRMWARE" ] && \
export FIRMWARE="$FIRMWARE" && \
caldata_extract_mmc "factory" 0x0 0x1000
;;
mercusys,mr90x-v1)
eeprom="/lib/firmware/mediatek/mt7986_eeprom_mt7975_dual.bin"
[ ! -e $eeprom ] && \
ln -sf /tmp/tp_data/MT7986_EEPROM.bin $eeprom
;;
*)
;;
esac
}

boot_hook_add preinit_main preinit_fix_eeprom

0 comments on commit f852316

Please sign in to comment.