openwrt/target/linux
Markus Stockhausen e04e821471 realtek: add support for DGS-1210-52
Hardware specification
----------------------

* RTL8393M SoC, 1 MIPS 34Kc core @ 700MHz
* 128MB DRAM
* 32MB NOR Flash
* 48 x 10/100/1000BASE-T ports
  - 6 x External PHY with 8 ports (RTL8218D)
* 4 x Gigabit RJ45/SFP Combo ports
  - External PHY with 4 SFP ports (RTL8214FC)
* Power LED
* Reset button on front panel
* UART (115200 8N1) via unpopulated standard 0.1" pin header marked J14

The gpio-restart node is not required but it does reset the switch.

TODO: The 4 combo ports attached to the RTL8214FC are not detect
properly. Linux kernel reports 49 and 50 as "External RTL8393 SERDES"
and 51 and 52 as "RTL8218B (external)". Those ports only work if
u-boot initialize it (for example, loading initramfs image using one
of those ports). A patch to PHY detection is needed for full support.

The firmware recovery using U-Boot is broken for all DGS-1210 tested
devices as pressing RESET does not trigger it (only if pressed from a
running stock image)

UART pinout
-----------

[o]ooo|J14
 | ||`------ GND
 | |`------- RX
 | `-------- TX
 `---------- Vcc (3V3)

Installation using OEM upgrade
------------------------------

1. Make sure you are running OEM firmware in image2 slot (logged as admin):
   - > config firmware image_id 2 boot_up
   - > reboot
2. Install squashfs-factory_image1.bin to image1 using (logged as admin):
   - > download firmware_fromTFTP <tftpserver> factory_image1.bin
   - > config firmware image_id 1 boot_up
   - > reboot

Installation using serial interface
-----------------------------------

1. Press Escape key during `Hit Esc key to stop autoboot` prompt
2. Press CTRL+C keys to get into real U-Boot prompt
3. Init network with `rtk network on` command
4. Load image with `tftpboot 0x8f000000 openwrt-realtek-rtl839x-d-link_dgs-1210-52-initramfs-kernel.bin` command
5. Boot the image with `bootm` command

Once booted the initramfs, install the squashfs-sysupgrade.bin as a
normal OpenWrt system.

Dual-boot with stock firmware using writable u-boot-env
-------------------------------------------------------

From stock to OpenWrt / boot image 1 (CLI as admin):
   - > config firmware image_id 1 boot_up
   - > reboot

From OpenWrt to stock / boot image 2: (shell as root)
   - # fw_setenv bootcmd 'run addargs ; bootm 0xb4e80000'
   - # fw_setenv image '/dev/mtdblock7'
   - # reboot

Debrick using serial interface
------------------------------

1. Press Escape key during `Hit Esc key to stop autoboot` prompt
2. In a Windows PC, run 'D-Link Network Assistant v2.0.2.4'. It should
   detect the switch
3. Flash the firmware.

Back to stock firmware using dual-boot
--------------------------------------

If you have serial interface, you can change u-boot env vars
interrupting the boot process. If not but you are running OpenWrt, you
can dual-boot (as mentioned eariler) and skip to step 4:

1. Press Escape key during `Hit Esc key to stop autoboot` prompt
2. Press CTRL+C keys to get into real U-Boot prompt
3. Boot the image 2:
   - set image /dev/mtdblock7; run addargs; bootm 0xb4e80000
4. Once booted, log as admin and change the boot image to 2
   - > config firmware image_id 2 boot_up
   - > reboot
5. After the boot, flash image1 with the vendor image

Back to stock firmware using DNA
--------------------------------

1. From an OpenWrt:
   - # fw_setenv bootstop on
   - # reboot
2. In a Windows PC, run 'D-Link Network Assistant v2.0.2.4'. It should
   detect the switch
3. Flash the firmware.

It has been developed and tested on device with F3 revision.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
2022-09-17 21:28:21 +02:00
..
airoha kernel: bump 5.15 to 5.15.68 2022-09-17 14:16:37 +02:00
apm821xx kernel: bump 5.10 to 5.10.142 2022-09-11 01:30:11 +02:00
archs38 kernel: Activate CONFIG_GPIOLIB in generic configuration 2022-08-10 21:36:17 +02:00
armvirt armvirt: make 5.15 kernel default 2022-09-14 16:45:06 +02:00
at91 kernel: bump 5.10 to 5.10.143 2022-09-17 14:16:37 +02:00
ath25 kernel: bump 5.10 to 5.10.137 2022-08-23 10:37:04 +02:00
ath79 ath79: specify factory.bin recipe for ASUS RP-AC51 2022-09-18 03:09:19 +09:00
bcm27xx kernel: bump 5.15 to 5.15.68 2022-09-17 14:16:37 +02:00
bcm47xx kernel: Activate CONFIG_GPIOLIB in generic configuration 2022-08-10 21:36:17 +02:00
bcm53xx bcm53xx: update NVMEM driver for NVRAM 2022-09-14 14:21:57 +02:00
bcm63xx kernel: bump 5.15 to 5.15.62 2022-08-23 10:37:04 +02:00
bcm4908 bcm4908: fix Asus GT-AX6000 image 2022-09-03 20:43:07 +02:00
bmips kernel: bump 5.15 to 5.15.67 2022-09-09 21:08:37 +01:00
gemini kernel: Activate CONFIG_GPIOLIB in generic configuration 2022-08-10 21:36:17 +02:00
generic kernel: bump 5.10 to 5.10.143 2022-09-17 14:16:37 +02:00
imx kernel: Activate CONFIG_GPIOLIB in generic configuration 2022-08-10 21:36:17 +02:00
ipq40xx ipq40xx: add GL-AP1300 label-mac-device 2022-09-11 16:24:11 +02:00
ipq806x kernel: bump 5.15 to 5.15.62 2022-08-23 10:37:04 +02:00
kirkwood kernel: Activate CONFIG_GPIOLIB in generic configuration 2022-08-10 21:36:17 +02:00
lantiq ltq-vdsl-app: rename to ltq-vdsl-vr9-app 2022-09-17 17:39:23 +02:00
layerscape kernel: bump 5.10 to 5.10.137 2022-08-23 10:37:04 +02:00
malta malta: make 5.15 kernel default 2022-09-14 16:45:06 +02:00
mediatek kernel: bump 5.15 to 5.15.68 2022-09-17 14:16:37 +02:00
mpc85xx kernel: bump 5.15 to 5.15.68 2022-09-17 14:16:37 +02:00
mvebu mvebu: PCI: aardvark: Implement workaround for PCIe Completion Timeout 2022-09-11 01:30:11 +02:00
mxs kernel: Activate CONFIG_GPIOLIB in generic configuration 2022-08-10 21:36:17 +02:00
octeon kernel: bump 5.15 to 5.15.63 2022-08-25 22:07:43 +02:00
octeontx kernel: bump 5.10 to 5.10.138 2022-08-25 20:23:59 +02:00
omap kernel: Activate CONFIG_GPIOLIB in generic configuration 2022-08-10 21:36:17 +02:00
oxnas oxnas: add testing support for Linux 5.15 2022-09-11 02:49:28 +01:00
pistachio kernel: Activate CONFIG_GPIOLIB in generic configuration 2022-08-10 21:36:17 +02:00
qoriq kernel: Activate CONFIG_GPIOLIB in generic configuration 2022-08-10 21:36:17 +02:00
ramips ramips: 5.15: add disabled PINCTRL_AW9523 2022-09-18 03:09:19 +09:00
realtek realtek: add support for DGS-1210-52 2022-09-17 21:28:21 +02:00
rockchip rockchip: add system-LED aliases specific to OpenWrt 2022-09-10 01:55:54 +02:00
sunxi kernel: bump 5.10 to 5.10.137 2022-08-23 10:37:04 +02:00
tegra tegra: add kernel 5.15 support 2022-09-14 16:45:06 +02:00
uml generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-24 17:10:24 +02:00
x86 x86: setup netdev paths for MX100 2022-09-10 21:16:39 +02:00
zynq kernel: Activate CONFIG_GPIOLIB in generic configuration 2022-08-10 21:36:17 +02:00
Makefile target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00