From 6ffe8a473eedf6f4f472bb5e64a1e1775917f3c8 Mon Sep 17 00:00:00 2001 From: Kip Porterfield Date: Mon, 3 Aug 2020 14:07:51 +0000 Subject: kirkwood: add support for Seagate BlackArmor NAS220 The Seagate BlackArmor NAS220 is a consumer NAS with two internal drive bays. The stock OS runs RAID 1 over the disks via mdadm. Device specification: - SoC: Marvell 88F6192 800 MHz - RAM: 128 MB - Flash: 32 MB - 2 x internal SATA II drives - Ethernet: 10/100/1000 Mbps (single port, no switch) - WLAN: None - LED: Power, Status, Sata Activity - Key: Power, Reset - Serial: 10 pin header, (115200,8,N,1), 3.3V TTL 9|x - x|10 7|x - x|8 5|x - GND|6 3|x - RX|4 1|TX - x|2 front of case - USB ports: 2 x USB 2.0 Flash instruction: NOTE: this process uses a serial connection. It will upgrade the bootloader and reset the bootloader environment variables TFTP server setup - Setup PC with TFTP server set the PC IP to 10.4.50.5 as TFTP server - Copy these files to TFTP server location - u-boot.kwb - seagate_blackarmor-nas220-initramfs-uImage - seagate_blackarmor-nas220-squashfs-sysupgrade.bin - seagate_blackarmor-nas220-squashfs-factory.bin Seagate NAS setup - Connect LAN cable between PC and seagate device - Connect to serial to seagate device Install u-boot - Boot seagate device and stop in bootloader by pressing any key - run 'printenv' from u-boot and save the values - tftpboot 0x2000000 u-boot.kwb - nand erase.part uboot - nand write 0x2000000 0x0 ${filesize} - reset Update MAC address in u-boot env - Stop in u-boot by pressing any key - Get your MAC address from your saved printenv. Is also on chassis - setenv ethaddr - saveenv Option 1 (recommended) - Install OpenWrt via initramfs and sysupgrade - tftpboot 0x2000000 seagate_blackarmor-nas220-initramfs-uImage - bootm 0x2000000 - *OpenWrt should be running now, however it is not written to flash yet* - From the running instance of OpenWrt use Luci's "flash image" feature from the web site or use sysupgrade from the console to write seagate_blackarmor-nas220-squashfs-sysupgrade.bin to flash Option 2 - Install OpenWrt by flashing factory image from u-boot - nand erase.part ubi - tftpboot 0x2000000 seagate_blackarmor-nas220-squashfs-factory.bin - nand write 0x2000000 ubi ${filesize} - reset Signed-off-by: Kip Porterfield --- target/linux/kirkwood/base-files/etc/board.d/02_network | 1 + .../linux/kirkwood/base-files/etc/init.d/hwmon_fancontrol | 14 ++++++++++++++ 2 files changed, 15 insertions(+) (limited to 'target/linux/kirkwood/base-files/etc') diff --git a/target/linux/kirkwood/base-files/etc/board.d/02_network b/target/linux/kirkwood/base-files/etc/board.d/02_network index a60b87c912..c3d31affda 100755 --- a/target/linux/kirkwood/base-files/etc/board.d/02_network +++ b/target/linux/kirkwood/base-files/etc/board.d/02_network @@ -22,6 +22,7 @@ case "$board" in "iom,iconnect-1.1"|\ "iom,ix2-200"|\ "raidsonic,ib-nas62x0"|\ +"seagate,blackarmor-nas220"|\ "seagate,dockstar"|\ "seagate,goflexhome"|\ "seagate,goflexnet"|\ diff --git a/target/linux/kirkwood/base-files/etc/init.d/hwmon_fancontrol b/target/linux/kirkwood/base-files/etc/init.d/hwmon_fancontrol index a0e3de062b..c64ed1100c 100755 --- a/target/linux/kirkwood/base-files/etc/init.d/hwmon_fancontrol +++ b/target/linux/kirkwood/base-files/etc/init.d/hwmon_fancontrol @@ -11,6 +11,20 @@ boot() { path_to_hwmon='/sys/class/hwmon/hwmon0' echo 2 > "$path_to_hwmon/pwm1_enable" # fan is on pwm1 ;; + seagate,blackarmor-nas220) + path_to_hwmon='/sys/devices/platform/ocp@f1000000/f1011000.i2c/i2c-0/0-002e/hwmon/hwmon0' + # adt7476 fan control chip. 3 temp sensors. Set to 1/4 speed at 35C and max speed at 48C. + echo 7 > "$path_to_hwmon/pwm1_auto_channels_temp" + echo 64 > "$path_to_hwmon/pwm1_auto_point1_pwm" + echo 255 > "$path_to_hwmon/pwm1_auto_point2_pwm" + echo 35000 > "$path_to_hwmon/temp1_auto_point1_temp" + echo 48000 > "$path_to_hwmon/temp1_auto_point2_temp" + echo 35000 > "$path_to_hwmon/temp2_auto_point1_temp" + echo 48000 > "$path_to_hwmon/temp2_auto_point2_temp" + echo 35000 > "$path_to_hwmon/temp3_auto_point1_temp" + echo 48000 > "$path_to_hwmon/temp3_auto_point2_temp" + echo 2 > "$path_to_hwmon/pwm1_enable" + ;; zyxel,nsa310b) path_to_hwmon='/sys/devices/platform/ocp@f1000000/f1011000.i2c/i2c-0/0-002e/hwmon/hwmon0' echo 2 > "$path_to_hwmon/pwm1_enable" # fan is on pwm1 -- cgit v1.2.3