aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/patches-5.4
diff options
context:
space:
mode:
authorDavid Bauer <mail@david-bauer.net>2021-02-11 17:09:06 +0100
committerDavid Bauer <mail@david-bauer.net>2021-02-18 01:15:45 +0100
commit634c13c186646aff2badb51a43b248825d0fe5a0 (patch)
tree463eb656d76820ce12dfa514a16c427260d72c4e /target/linux/mediatek/patches-5.4
parentc9137e2ddf97ede1db399dc38acff26feb48ba7e (diff)
downloadupstream-634c13c186646aff2badb51a43b248825d0fe5a0.tar.gz
upstream-634c13c186646aff2badb51a43b248825d0fe5a0.tar.bz2
upstream-634c13c186646aff2badb51a43b248825d0fe5a0.zip
mediatek: add support for Ubiquiti UniFi 6 LR
Hardware -------- MediaTek MT7622 512MB DDR3 RAM 64M SPI-NOR Flash (Winbond W25Q512JV) MediaTek MT7622 802.11bgn 4T4R WMAC MediaTek MT7915 802.11ax 4T4R Marvell AQR1112 100/1000/2500 NBase-T PHY Holtek HT32F52241 LED controller Reset Switch UART ---- CPU UART0 at the pinout next to the Holtek MCU. Pinout (first pin next to SoC / MCU) 0 3V3 1 RX 2 TX 3 GND Settings are 115200 8N1. Opening the case ---------------- Opening the case is not a nice task, as itis glued together. Insert a flat knife between the front and back casing below the ethernet port. Open up a gap this way and insert a flat scredriver, remove the knife. Work your way around the casing by applying force to seperate the front and back casing. This losens the glue and opens the plastic clips. Be gentle, as these clips are very cheap and break quickly. Installation ------------ 1. Connect to the booted device at 192.168.1.20 using username/password "ubnt". 2. Transfer the OpenWrt sysupgrade image to the device using SCP. 3. Check the mtd partition number for bs / kernel0 / kernel1 $ cat /proc/mtd 4. Set the bootselect flag to boot from kernel0 $ dd if=/dev/zero bs=1 count=1 of=/dev/mtdblock6 5. Write the OpenWrt sysupgrade image to both kernel0 as well as kernel1 $ dd if=openwrt.bin of=/dev/mtdblock8 $ dd if=openwrt.bin of=/dev/mtdblock9 6. Reboot the device. It should boot into OpenWrt. Signed-off-by: David Bauer <mail@david-bauer.net>
Diffstat (limited to 'target/linux/mediatek/patches-5.4')
-rw-r--r--target/linux/mediatek/patches-5.4/1020-spi-nor-w25q512jv.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/target/linux/mediatek/patches-5.4/1020-spi-nor-w25q512jv.patch b/target/linux/mediatek/patches-5.4/1020-spi-nor-w25q512jv.patch
new file mode 100644
index 0000000000..1a16574c2b
--- /dev/null
+++ b/target/linux/mediatek/patches-5.4/1020-spi-nor-w25q512jv.patch
@@ -0,0 +1,25 @@
+From: David Bauer <mail@david-bauer.net>
+Date: Thu, 11 Feb 2021 19:57:26 +0100
+Subject: [PATCH] mtd: spi-nor: add support for Winbond W25Q512
+
+The Winbond W25Q512 is a 512mb SPI-NOR chip. It supports 4K sectors as
+well as block protection and Dual-/Quad-read.
+
+Tested on: Ubiquiti UniFi 6 LR
+
+Signed-off-by: David Bauer <mail@david-bauer.net>
+
+Ref: https://patchwork.ozlabs.org/project/linux-mtd/patch/20210213151047.11700-1-mail@david-bauer.net/
+
+--- a/drivers/mtd/spi-nor/spi-nor.c
++++ b/drivers/mtd/spi-nor/spi-nor.c
+@@ -2550,6 +2550,9 @@ static const struct flash_info spi_nor_i
+ .fixups = &w25q256_fixups },
+ { "w25q256jvm", INFO(0xef7019, 0, 64 * 1024, 512,
+ SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
++ { "w25q512jv", INFO(0xef4020, 0, 64 * 1024, 1024,
++ SECT_4K | SPI_NOR_QUAD_READ | SPI_NOR_DUAL_READ |
++ SPI_NOR_HAS_TB | SPI_NOR_HAS_LOCK) },
+ { "w25m512jv", INFO(0xef7119, 0, 64 * 1024, 1024,
+ SECT_4K | SPI_NOR_QUAD_READ | SPI_NOR_DUAL_READ) },
+