openwrt/target/linux
Stas Fiduchi b8168f4716 ramips: add support for D-Link DIR-853-R1
This PR adds support for router D-Link DIR-853-R1

Specifications:

    SoC: MT7621AT
    RAM: 128MB
    Flash: 16MB SPI
    WiFi: MT7615DN (2.4GHz+5Ghz) with DBDC (This mode allows this
      single chip act as an 2x2 11n radio and an 2x2 11ac radio at the
      same time)
    LAN: 5x1000M
    LEDs Power Blue+Orange,Wan Blue+Orange,WPS Blue,"2.4G"Blue, "5G" Blue
    USB Blue
    Buttons Reset,WPS, Wifi

MAC addresses:

|Interface   |        MAC      |    Factory  |Comment
|------------|-----------------|-------------|----------------
|WAN sticker |C4:XX:XX:6E:XX:2A|             |Sticker
|LAN         |C4:XX:XX:6E:XX:2B|             |
|Wifi (5g)   |C4:XX:XX:6E:XX:2C|0x4          |
|Wifi (2.4g) |C6:XX:XX:7E:XX:2C|             |
|            |                 |             |
|            |C4:XX:XX:6E:XX:2E|0x8004 0xe000|
|            |C4:XX:XX:6E:XX:2F|0xe006       |

The increment of the 4th byte for the 2.4g address appears to vary.
Reported cases:

       5g                 2.4g         increment
 C4:XX:XX:6E:XX:2C  C6:XX:XX:7E:XX:2C  0x10
 f4:XX:XX:16:XX:32  f6:XX:XX:36:XX:32  0x20
 F4:XX:XX:A6:XX:E3  F6:XX:XX:B6:XX:E3  0x10

Since increment is inconsistent and there is no obvious pattern
in swapping bytes, and the 2.4g address has local bit set anyway,
it seems safer to use the LAN address with flipped byte here in
order to prevent collisions between OpenWrt devices and OEM devices
for this interface. This way we at least use an address as base
that is definitely owned by the device at hand.

Flashing instruction:

The Dlink "Emergency Room"

Connect your client computer to LAN1 of the device
Set your client IP address manually to 192.168.0.101 / 255.255.255.0.
Then, power down the router, press and hold the reset button, then
re-plug it. Keep the reset button pressed until the internet LED stops
flashing
Call the recovery page or tftp for the device at http://192.168.0.1
Use the provided emergency web GUI to upload and flash a new firmware to
the device.

Signed-off-by: Stas Fiduchi <fiduchi@protonmail.com>
[commit title/message improvements, use correct label MAC address,
 calculate MAC addresses based on 0x4, minor DTS style fixes, add
 uart2 to state_default, remove factory image, add 2.4g MAC address,
 use partition DTSI, add macaddr comment in DTS]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-07-10 20:01:29 +02:00
..
apm821xx apm821xx: move CONFIG_REGULATOR to target config 2021-06-13 11:32:49 +02:00
arc770 treewide: do not quote compatible in shell scripts 2021-06-06 19:17:47 +02:00
archs38 treewide: switch the timer frequency to 100 Hz 2021-04-21 10:31:10 +01:00
armvirt treewide: switch the timer frequency to 100 Hz 2021-04-21 10:31:10 +01:00
at91 kernel: move some drm symbols to generic config 2021-06-13 23:30:10 +02:00
ath25 kernel: Activate FORTIFY_SOURCE for MIPS kernel 5.4 2021-04-30 23:51:19 +02:00
ath79 treewide: call check-size before append-metadata 2021-07-10 19:40:10 +02:00
bcm27xx kernel: bump 5.4 to 5.4.128 2021-06-26 12:49:15 +02:00
bcm47xx bcm47xx: make WGT634U NVRAM patch apply again 2021-03-12 21:09:11 +01:00
bcm53xx kernel: bump 5.4 to 5.4.118 2021-05-23 15:09:06 +02:00
bcm63xx bcm63xx: drop USB LEDs for Technicolor TG582N / ADB P.DG A4001N 2021-06-05 23:39:14 +02:00
bcm4908 bcm4908: fix Ethernet broken state after interface restart 2021-06-22 08:06:13 +02:00
bmips bmips: remove duplicated brcmnand patch 2021-05-17 12:25:34 +02:00
gemini base-files: generate network config with "device" options 2021-05-27 10:58:49 +02:00
generic mediatek: prevent duplicate hardware flow offload entries 2021-07-08 07:38:41 +02:00
imx6 imx6: image: drop BOOT_SCRIPT and fix DEVICE_NAME 2021-05-26 14:12:46 +02:00
ipq40xx treewide: call check-size before append-metadata 2021-07-10 19:40:10 +02:00
ipq806x treewide: call check-size before append-metadata 2021-07-10 19:40:10 +02:00
ipq807x treewide: remove redundant ubifs kconfig symbols 2021-04-21 10:31:07 +01:00
kirkwood treewide: do not quote compatible in shell scripts 2021-06-06 19:17:47 +02:00
lantiq treewide: call check-size before append-metadata 2021-07-10 19:40:10 +02:00
layerscape kernel: bump 5.4 to 5.4.128 2021-06-26 12:49:15 +02:00
malta treewide: switch the timer frequency to 100 Hz 2021-04-21 10:31:10 +01:00
mediatek kernel: bump 5.4 to 5.4.126 2021-06-26 12:49:15 +02:00
mpc85xx treewide: switch the timer frequency to 100 Hz 2021-04-21 10:31:10 +01:00
mvebu kernel: bump 5.4 to 5.4.128 2021-06-26 12:49:15 +02:00
mxs treewide: switch the timer frequency to 100 Hz 2021-04-21 10:31:10 +01:00
octeon octeon: use shared function for platform_copy_config() 2021-05-17 01:01:32 +02:00
octeontx kernel: bump 5.4 to 5.4.128 2021-06-26 12:49:15 +02:00
omap kernel: move some drm symbols to generic config 2021-06-13 23:30:10 +02:00
oxnas treewide: remove redundant ubifs kconfig symbols 2021-04-21 10:31:07 +01:00
pistachio treewide: switch the timer frequency to 100 Hz 2021-04-21 10:31:10 +01:00
ramips ramips: add support for D-Link DIR-853-R1 2021-07-10 20:01:29 +02:00
realtek treewide: call check-size before append-metadata 2021-07-10 19:40:10 +02:00
rockchip kernel: bump 5.10 to 5.10.43 2021-06-14 01:36:36 +02:00
sunxi linux-firmware: update to version 20210315 and trim down broadcom FW 2021-06-06 00:26:13 +02:00
tegra kernel: move some drm symbols to generic config 2021-06-13 23:30:10 +02:00
uml treewide: switch the timer frequency to 100 Hz 2021-04-21 10:31:10 +01:00
x86 x86: add upgrade support to diag.sh 2021-06-10 10:34:44 +02:00
zynq kernel: move some drm symbols to generic config 2021-06-13 23:30:10 +02:00
Makefile target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00