mediatek: add build for MT7981 RFB mt7981-rfb
authorDaniel Golle <daniel@makrotopia.org>
Tue, 12 Sep 2023 23:57:49 +0000 (00:57 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Mon, 18 Sep 2023 17:04:51 +0000 (18:04 +0100)
commite8510faeb6b3e7319c2b711ad68e4c3857ab012c
tree3c716f61a8e522251280d901ae7dbc6b69fbc1b5
parentf4ac1702ed73a12ec50b4ae62779a04f7db2fe9e
mediatek: add build for MT7981 RFB

Add build for the MTK3943 reference board for MT7981B+MT7976C.

**Hardware specification:**

 - SoC: MediaTek MT7981B 2x A53
 - Flash: various options
 - RAM: 256MB DDR3
 - Ethernet: 4 x 10/100/1000 Mbps via MT7531AE switch
        EITHER 1 x 10/100/1000 Mbps built-in PHY
            OR 1 x 10/100/1000/2500 Mbps MaxLinear GPY211C
 - Switch: MediaTek MT7531AE
 - WiFi: MediaTek MT7976C
 - Button: RST, WPS

**Flash instructions for SPIM-NAND:**
 - write *mt7981-rfb-spim-nand-preloader.bin to 'BL2' partition
 - write *mt7981-rfb-spim-nand-bl31-uboot.fip to 'FIP' partition
 - erase 'ubi' partition
 - reset board
 - create ubootenv and ubootenv2 UBI volumes in U-Boot
 - edit environment and set bootcmd, e.g.
   setenv bootconf 'config-1#mt7981-rfb-spim-nand#mt7981-rfb-mxl-2p5g-phy-eth1'
   setenv bootcmd 'ubi read $loadaddr fit; bootm $loadaddr#$bootconf'
 - load initramfs image via TFTP:
   setenv serverip 192.168.1.254
   setenv ipaddr 192.168.1.1
   setenv bootfile openwrt-mediatek-filogic-mediatek_mt7981-rfb-initramfs.itb
   saveenv ; saveenv
   tftpboot
   bootm $loadaddr#$bootconf
 - Now use sysupgrade to write OpenWrt firmware to flash.

SNFI-NAND, SPIM-NOR and eMMC all work very similar, a bootable SD card image
is also being generated. However, as the board I've been provided only comes
with SPIM-NAND all other boot media are untested.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7981-rfb-mxl-2p5g-phy-eth1.dtso [new file with mode: 0644]
target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7981-rfb-mxl-2p5g-phy-swp5.dtso [new file with mode: 0644]
target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7981-rfb-spim-nand.dtso [new file with mode: 0644]
target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7981-rfb.dts [new file with mode: 0644]
target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7981-rfb-mxl-2p5g-phy-eth1.dtso [new file with mode: 0644]
target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7981-rfb-mxl-2p5g-phy-swp5.dtso [new file with mode: 0644]
target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7981-rfb-spim-nand.dtso [new file with mode: 0644]
target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7981-rfb.dts [new file with mode: 0644]
target/linux/mediatek/filogic/base-files/etc/board.d/02_network
target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
target/linux/mediatek/image/filogic.mk