[PATCH v2] ramips: mt76x8: add support for TP-Link RE365 v1
Sander Vanheule
sander at svanheule.net
Sun Jan 7 05:06:37 PST 2024
Hi Tomasz,
On Fri, 2023-12-22 at 11:36 +0100, Tomasz Maciej Nowak wrote:
> From: Tomasz Maciej Nowak <tmn505 at gmail.com>
>
> TP-Link RE365 is a wireless range extender, hardware-wise resembles
> RE305 with slight changes regarding buttons and LEDs.
>
> Specification
> SoC: MediaTek MT7628AN
> RAM: 64 MiB DDR2
> Flash: 8 MiB SPI NOR
Ouch.
> WiFi: 2.4 GHz 2T2R integrated
> 5 GHz 2T2R MediaTek MT7612EN conncted to PCIe lanes
> Ethernet: 1x 10/100 Mbps integrated
> LEDs: 6x GPIO controlled
> Buttons: 4x GPIO controlled
> UART: row of 4 holes marked on PCB as J1, starting count from white
> triangle
> 1. VCC (3.3V), 2. GND, 3. RX, 4. TX
> baud: 57600, parity: none, flow control: none
>
> Installation
> 1. Open web management interface.
> 2. Go to Settings > System Tools > Firmware upgrade.
> 3. Select "Browse" and select the OpenWrt image with factory.bin suffix.
> 4. After selecting "Upgrade" firmware writing process will start.
> 5. Wait till device reboots, power LED should stay solid when it's fully
> booted, then it's ready for configuration through LAN port.
[...]
> +
> + virtual_flash {
> + compatible = "mtd-concat";
> + devices = <&fwconcat0 &fwconcat1>;
Both have the same representation in the resulting DTB, but this is a list, so:
devices = <&fwconcat0>, <&fwconcat1>;
[...]
> +&spi0 {
> + status = "okay";
> +
> + flash at 0 {
> + compatible = "jedec,spi-nor";
> + reg = <0>;
> + spi-max-frequency = <10000000>;
> +
> + partitions {
> + compatible = "fixed-partitions";
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + partition at 0 {
> + label = "u-boot";
> + reg = <0x0 0x20000>;
> + read-only;
> + };
> +
> + fwconcat0: partition at 20000 {
> + label = "fwconcat0";
> + reg = <0x20000 0x5e0000>;
> + };
Since this is where the bootloader is going to look for a kernel, I'm pretty sure the
kernel will need to be contained entirely in this partition (or you need a kernel loader).
That would mean it must fit inside 6016 kiB.
[...]
> +define Device/tplink_re365-v1
> + $(Device/tplink-safeloader)
> + DEVICE_MODEL := RE365
> + DEVICE_VARIANT := v1
> + DEVICE_PACKAGES := kmod-mt76x2
> + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size |
> append-metadata
> + IMAGE_SIZE := 7680k
So you will probably need two check-size calls here:
IMAGE/sysupgrade.bin := append-kernel | check-size 6016k | \
append-rootfs | pad-rootfs | check-size | append-metadata
Side note: You're definitely not the only one with flash constraints on mt76x8, so I
wonder if a small-flash configuration/package selection would make sense.
Best,
Sander
More information about the openwrt-devel
mailing list