aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/mt7623/config-4.14
diff options
context:
space:
mode:
authorKristian Evensen <kristian.evensen@gmail.com>2018-06-20 01:17:40 +0200
committerJohn Crispin <john@phrozen.org>2018-06-22 11:25:52 +0200
commit4def81f30f2e89eeecc6ec06e3091f1dd6b3c3d9 (patch)
tree5258167901e2ad9117e0fe887501c5484b11229f /target/linux/mediatek/mt7623/config-4.14
parente317bb06fdfb46cf0c6496e3db4eb020ea28b656 (diff)
downloadupstream-4def81f30f2e89eeecc6ec06e3091f1dd6b3c3d9.tar.gz
upstream-4def81f30f2e89eeecc6ec06e3091f1dd6b3c3d9.tar.bz2
upstream-4def81f30f2e89eeecc6ec06e3091f1dd6b3c3d9.zip
mediatek: Add support for the UniElec U7623-02
This commit adds support for the MT7623A-based UniElec U7623-02 router, with eMMC storage and 512MB RAM. The router can be delivered with NAND Flash and more memory, but I only have access to the one configuration. The DTS is structured in such a way that adding support for more/different storage/memory should be straight forward. The device has the following specifications: * MT7623A (quad-core, 1.3 GHz) * 512MB RAM (DDR3) * 8GB storage (eMMC 4.5) * 2x normal miniPCIe slots * 1x miniPCIe slot that is connected via an internal USB OTG port * 5x 1Gbps Ethernet (MT7530 switch) * 1x UART header * 1x USB 3.0 port * 1x SATA 3.0 * 1x 40P*0.5mm FPC for MIPI LCD * 1x SIM slot * 12x LEDs (2 GPIO controlled) * 1x reset button * 1x DC jack for main power (12V) The following has been tested and is working: * Ethernet switch * miniPCIe slots (tested with Wi-Fi cards) * USB 3.0 port * sysupgrade * reset button Not working: * The miniPCIe connected via USB OTG. For the port to work, some MUSB glue must be added. I am currently in the process of porting the glue from the vendor SDK. Not tested: * SATA 3.0 * MIPI LCD Installation: The board ships with u-boot, and the first installation needs to be done via the bootloader using tftp. Step number one is to update the MBR of the eMMC, as the one that ships with the device is broken. Since the device can ship with different storage sizes, I will not provide the exact steps for creating a valid MBR. However, I have made some assumptions about the disk layout - there must be one 8MB recovery partition (FAT32) and a partition for the rootfs (Linux). The board loads the kernel from block 0xA00 (2560) and I have reserved 32MB for the kernel (65536 blocks). I have aligned the partitions on the erase block size (4096 byte), so the recovery partition must start on block 69632 and end on 86016 (16385 sectors). The rootfs is assumed to start on sector 90112. In order to install the mbr, you run the following commands from the u-boot command line: * tftpboot ${loadaddr} <name of mbr file> * mmc device 0 * mmc write ${loadaddr} 0x00 1 Run the following commands to install + boot OpenWRT: * tftpboot ${loadaddr} openwrt-mediatek-mt7623-7623a-unielec-u7623-02-emmc-512m-squashfs-sysupgrade-emmc.bin.gz * run boot_wr_img * run boot_rd_img * bootm Recovery: In order to recover the router, you need to follow the installation steps above (no need to replace MBR). Notes: * F2FS is used as the overlay filesystem. * The device does not ship with any valid MAC address, so a random address has to be generated. As a work-around, I write the initial random MAC to a file on the recovery partition. The MAC of the WAN interface is set to the MAC-address contained in this file on each boot, and the address of the LAN-interfaces are WAN + 1. The MAC file is kept across sysupgrade/firstboot. My approach is slightly different than what the stock image does. The first fives bytes of the MAC addresses in the stock image are static, and then the last byte is random. I believe it is better to create fully random MAC addresses. * In order to support the miniPCIe-slots, I needed to add missing pcie-nodes to mt7623.dtsi. The nodes are just c&p from the upstream dtsi. * One of the USB3.0 phys (u3phy2) on the board can be used as either USB or PCI, and one of the wifi-cards is connected to this phy. In order to support switching the phy from USB to PCI, I needed to patch the phy-driver. The patch is based on a rejected (at least last time I checked) PCI-driver submitted to the linux-mediatek mailing list. * The eMMC is configured to boot from the user area, and according to the data sheet of the eMMC this value can't be changed. * I tried to structure the MBR more nicely and use for example a FAT32-parition for the kernel, so that we don't need to write/read from some offset. The bootloader does not support reading from FAT32-paritions. While the command (fatload) is there, it just throws an error when I try to use it. * I will submit and hope to get the DTS for the device accepted upstream. If and when that happens, I will update the patches accordingly. Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
Diffstat (limited to 'target/linux/mediatek/mt7623/config-4.14')
-rw-r--r--target/linux/mediatek/mt7623/config-4.1412
1 files changed, 11 insertions, 1 deletions
diff --git a/target/linux/mediatek/mt7623/config-4.14 b/target/linux/mediatek/mt7623/config-4.14
index 9f70989410..0437740467 100644
--- a/target/linux/mediatek/mt7623/config-4.14
+++ b/target/linux/mediatek/mt7623/config-4.14
@@ -51,6 +51,7 @@ CONFIG_ARM_UNWIND=y
CONFIG_ARM_VIRT_EXT=y
CONFIG_ATAGS=y
CONFIG_AUTO_ZRELADDR=y
+CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_MQ_PCI=y
CONFIG_BOUNCE=y
# CONFIG_CACHE_L2X0 is not set
@@ -114,6 +115,8 @@ CONFIG_CROSS_MEMORY_ATTACH=y
CONFIG_CRYPTO_ACOMP2=y
CONFIG_CRYPTO_AEAD=y
CONFIG_CRYPTO_AEAD2=y
+CONFIG_CRYPTO_CRC32=y
+CONFIG_CRYPTO_CRC32C=y
CONFIG_CRYPTO_CTR=y
CONFIG_CRYPTO_DEFLATE=y
CONFIG_CRYPTO_DEV_MEDIATEK=y
@@ -165,9 +168,16 @@ CONFIG_EARLY_PRINTK=y
CONFIG_EDAC_ATOMIC_SCRUB=y
CONFIG_EDAC_SUPPORT=y
CONFIG_ELF_CORE=y
+CONFIG_EXT4_FS=y
+# CONFIG_F2FS_CHECK_FS is not set
+CONFIG_F2FS_FS=y
+# CONFIG_F2FS_FS_SECURITY is not set
+CONFIG_F2FS_FS_XATTR=y
+CONFIG_F2FS_STAT_FS=y
CONFIG_FIXED_PHY=y
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_FREEZER=y
+CONFIG_FS_MBCACHE=y
CONFIG_GENERIC_ALLOCATOR=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_CLOCKEVENTS=y
@@ -269,6 +279,7 @@ CONFIG_IRQ_DOMAIN=y
CONFIG_IRQ_DOMAIN_HIERARCHY=y
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_IRQ_WORK=y
+CONFIG_JBD2=y
CONFIG_KALLSYMS=y
CONFIG_LEDS_MT6323=y
CONFIG_LIBFDT=y
@@ -472,7 +483,6 @@ CONFIG_UNINLINE_SPIN_UNLOCK=y
CONFIG_USB=y
CONFIG_USB_COMMON=y
# CONFIG_USB_EHCI_HCD is not set
-# CONFIG_USB_MTU3 is not set
CONFIG_USB_SUPPORT=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_MTK=y