tn3399_openwrt/target/linux
Pawel Dembicki d2c3131b3f kirkwood: add support for Zyxel NSA310S
Zyxel NSA310S is a NAS based on Marvell kirkwood SoC.

Specification:
 - Processor Marvell 88F6702 1 GHz
 - 256MB RAM
 - 128MB NAND
 - 1x GBE LAN port (PHY: Marvell 88E1318)
 - 2x USB 2.0
 - 1x SATA
 - 3x button
 - 7x leds
 - serial on J1 connector (115200 8N1) (GND-NOPIN-RX-TX-VCC)

Known issues:
 - no kernel module for RTC. [*]
 - buzzer (connected to MPP43) need to be drived by 1kHz signal
 - no kernel module for internal MCU connected via I2C[**]

[*]
Karoly Pocsi made simple, unofficial driver for HT1382.
It can be found here:
https://www.madadmin.com/zyxel-nsa320s-es-debian-linux-4-resz/

[**]
Karoly Pocsi found how CPU talk with MCU:
It is possible to query the MCU-controlled fan speed and temperature:
i2cget -y 0x0 0x0a 0x07
i2cget -y 0x0 0x0a 0x08
The first value (0x07) is the temperature in ° C, the second (0x08) is
the time in milliseconds to complete one fan revolution (rpm = 60,000 / value).
Info translated from:
https://www.madadmin.com/zyxel-nsa320s-es-debian-linux-4-resz/

Installation:

TFTP:
1. Run serial console and go to u-boot.
2. Copy u-boot via tftp and write to NAND:
	=> mw 0x0800000 0xffff 0x100000
	=> nand erase 0x0 100000
	=> setenv ipaddr 192.168.1.2
	=> setenv serverip 192.168.1.4
	=> tftp 0x0800000 nsa310s-u-boot.kwb
	=> nand write 0x0800000 0x0 0x100000
	=> reset
3. Run new u-Boot, repair bootcmd and restore MAC address from sticker
	=> setenv ethaddr AA:BB:CC:DD:EE:FF
	=> saveenv
4. Copy and run initramfs image
	=> setenv ipaddr 192.168.1.2
	=> setenv serverip 192.168.1.4
	=> tftpboot zyxel_nsa310s-initramfs-uImage
	=> bootm 0x800000
5. Download sysupgrade image and perform sysupgrade

USB:

1. Prepare usb fat32 drive with u-boot.kwb and initramfs image.
   Stick it to USB 2.0 port.
2. Run serial console and go to u-boot.
3. Copy u-boot from usb and write to NAND:
	=> mw 0x0800000 0xffff 0x100000
	=> nand erase 0x0 100000
	=> usb start
	=> fatload usb 0 0x0800000 u-boot.kwb
	=> nand write 0x0800000 0x0 0x100000
	=> reset
4. Run new u-Boot, repair bootcmd and restore MAC address from sticker
	=> setenv ethaddr AA:BB:CC:DD:EE:FF
	=> saveenv
5. Copy and run initramfs image:
	=> usb start
	=> fatload usb 0 0x0800000 initramfs-uImage
	=> bootm 0x800000
6. Download sysupgrade image and perform sysupgrade.

Based on work ThBexx <thomas.beckler@hotmail.com>
DTS based on dropped support in 0ebdf0c.

Tested-by: Lech Perczak <lech.perczak@gmail.com>
Reviewed-by: Lech Perczak <lech.perczak@gmail.com>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
[NSA310s -> NSA310S in DEVICE_MODEL]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-07-08 16:07:05 +02:00
..
apm821xx kernel: Update kernel 5.4 to version 5.4.50 2020-07-04 21:12:42 +02:00
ar71xx ar71xx: Fix mikrotik NAND compile problem 2020-07-07 23:38:10 +02:00
arc770 treewide: drop shebang from non-executable target files 2020-06-16 14:26:33 +02:00
archs38 treewide: drop shebang from non-executable target files 2020-06-16 14:26:33 +02:00
armvirt armvirt,x86: fix build breakage of crypto ccp module 2020-06-23 09:29:00 +02:00
at91 treewide: drop shebang from non-executable target files 2020-06-16 14:26:33 +02:00
ath25 treewide: drop shebang from non-executable target files 2020-06-16 14:26:33 +02:00
ath79 ath79: add support for 8devices Lima board 2020-07-08 16:07:05 +02:00
bcm27xx kernel: Update kernel 5.4 to version 5.4.50 2020-07-04 21:12:42 +02:00
bcm47xx kernel: Update kernel 4.19 to version 4.19.131 2020-07-04 21:12:42 +02:00
bcm53xx kernel: Update kernel 4.19 to version 4.19.131 2020-07-04 21:12:42 +02:00
bcm63xx kernel: Update kernel 5.4 to version 5.4.50 2020-07-04 21:12:42 +02:00
cns3xxx kernel: Update kernel 4.19 to version 4.19.131 2020-07-04 21:12:42 +02:00
gemini treewide: drop shebang from non-executable target files 2020-06-16 14:26:33 +02:00
generic generic: platform/mikrotik: add partial AR71xx cpufreq support 2020-07-08 16:07:05 +02:00
imx6 treewide: drop shebang from non-executable target files 2020-06-16 14:26:33 +02:00
ipq40xx ipq40xx: add support for GL.iNet GL-S1300 2020-07-08 16:07:05 +02:00
ipq806x ipq806x: move serial0 to DTSI files 2020-07-06 16:24:30 +02:00
ipq807x treewide: remove maintainer variable from targets 2020-03-16 22:21:45 +01:00
kirkwood kirkwood: add support for Zyxel NSA310S 2020-07-08 16:07:05 +02:00
lantiq lantiq: set port numbers corresponding to reg value 2020-07-07 01:03:59 +02:00
layerscape kernel: Update kernel 5.4 to version 5.4.50 2020-07-04 21:12:42 +02:00
malta malta: add missing symbols for kernel 5.4 2020-06-03 10:50:01 +01:00
mediatek kernel: Update kernel 5.4 to version 5.4.50 2020-07-04 21:12:42 +02:00
mpc85xx kernel: Update kernel 5.4 to version 5.4.50 2020-07-04 21:12:42 +02:00
mvebu mvebu: config define i2c pxa slave 2020-07-04 21:12:42 +02:00
mxs kernel: bump 5.4 to 5.4.28 2020-03-28 13:03:02 +01:00
octeon treewide: drop shebang from non-executable target files 2020-06-16 14:26:33 +02:00
octeontx kernel: bump 5.4 to 5.4.48 2020-06-22 12:51:22 +02:00
omap treewide: drop shebang from non-executable target files 2020-06-16 14:26:33 +02:00
oxnas kernel: Update kernel 5.4 to version 5.4.50 2020-07-04 21:12:42 +02:00
pistachio kernel: Update kernel 4.14 to version 4.14.187 2020-07-04 21:12:42 +02:00
ramips ramips: Add support for Xiaomi Mi Router(Black,R2100) 2020-07-08 16:07:05 +02:00
rb532 treewide: remove maintainer variable from targets 2020-03-16 22:21:45 +01:00
rockchip treewide: simplify inclusion of subtarget image files 2020-06-11 01:44:13 +02:00
samsung kernel: Update kernel 4.14 to version 4.14.187 2020-07-04 21:12:42 +02:00
sunxi sunxi: add text referencing Allwinner H3 and H5 CPUs 2020-06-27 00:19:13 +02:00
tegra tegra: correct cpu subtype 2020-03-28 22:58:36 +01:00
uml treewide: Remove self from MAINTAINER entries 2019-12-23 13:18:04 -08:00
x86 kernel/pcengines-apu2: detect apuv4 board 2020-07-06 17:57:33 +02:00
zynq zynq: switch to kernel 5.4 2020-03-17 00:51:48 +01:00
Makefile build: add 'make kernel_xconfig' command 2020-07-08 16:07:05 +02:00