diff -rNub linux-4.5.orig/arch/arm/boot/dts/kirkwood-nsa320s.dts linux-4.5/arch/arm/boot/dts/kirkwood-nsa320s.dts
--- linux-4.5.orig/arch/arm/boot/dts/kirkwood-nsa320s.dts	1970-01-01 01:00:00.000000000 +0100
+++ linux-4.5/arch/arm/boot/dts/kirkwood-nsa320s.dts	2016-03-14 16:46:48.859195429 +0100
@@ -0,0 +1,339 @@
+/* Device tree file for the Zyxel NSA 320S NAS box.
+ *
+ * Copyright (c) 2015, Karoly Pocsi <chrlee@chrlee.net>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ * based on nsa320.dts */
+
+/dts-v1/;
+
+#include "kirkwood.dtsi"
+#include "kirkwood-6281.dtsi"
+
+/ {
+	model = "Zyxel NSA320S";
+	compatible = "zyxel,nsa320s", "marvell,kirkwood-88f6702", "marvell,kirkwood";
+
+	memory {
+		device_type = "memory";
+		reg = <0x00000000 0x10000000>;
+	};
+
+	chosen {
+		bootargs = "console=ttyS0,115200";
+		stdout-path = &uart0;
+	};
+
+	mbus {
+		pcie-controller {
+			status = "okay";
+
+			pcie@1,0 {
+				status = "okay";
+			};
+		};
+	};
+
+	ocp@f1000000 {
+		pinctrl: pin-controller@10000 {
+			pinctrl-names = "default";
+
+			pmx_sata0: pmx-sata0 {
+				marvell,pins ; /* NA */
+				marvell,function = "sata0";
+			};
+
+			pmx_sata1: pmx-sata1 {
+				marvell,pins ; /* NA */
+				marvell,function = "sata1";
+			};
+
+                        pmx_usb_power: pmx-usb-power {
+                                marvell,pins = "mpp21"; /* OK */
+                                marvell,function = "gpio";
+                        };
+
+                        pmx_pwr_off: pmx-pwr-off {
+                                marvell,pins = "mpp27"; /* OK */
+                                marvell,function = "gpio";
+                        };
+
+                        pmx_btn_reset: pmx-btn-reset {
+                                marvell,pins = "mpp24"; /* OK */
+                                marvell,function = "gpio";
+                        };
+
+                        pmx_btn_copy: pmx-btn-copy {
+                                marvell,pins = "mpp25"; /* OK */
+                                marvell,function = "gpio";
+                        };
+
+                        pmx_btn_power: pmx-btn-power {
+                                marvell,pins = "mpp26"; /* OK */
+                                marvell,function = "gpio";
+                        };
+
+			pmx_led_hdd2_green: pmx-led-hdd2-green {
+				marvell,pins = "mpp34"; /* OK */
+				marvell,function = "gpio";
+			};
+
+			pmx_led_hdd2_red: pmx-led-hdd2-red {
+				marvell,pins = "mpp12"; /* OK */
+				marvell,function = "gpio";
+			};
+
+			pmx_led_usb_green: pmx-led-usb-green {
+				marvell,pins = "mpp15"; /* OK */
+				marvell,function = "gpio";
+			};
+
+                        pmx_led_copy_green: pmx-led-copy-green {
+                                marvell,pins = "mpp22"; /* OK */
+                                marvell,function = "gpio";
+                        };
+
+                        pmx_led_copy_red: pmx-led-copy-red {
+                                marvell,pins = "mpp23"; /* OK */
+                                marvell,function = "gpio";
+                        };
+
+			pmx_led_sys_green: pmx-led-sys-green {
+				marvell,pins = "mpp28"; /* OK */
+				marvell,function = "gpio";
+			};
+
+			pmx_led_sys_orange: pmx-led-sys-orange {
+				marvell,pins = "mpp29"; /* OK */
+				marvell,function = "gpio";
+			};
+
+			pmx_led_hdd1_green: pmx-led-hdd1-green {
+				marvell,pins = "mpp16"; /* OK */
+				marvell,function = "gpio";
+			};
+
+			pmx_led_hdd1_red: pmx-led-hdd1-red {
+				marvell,pins = "mpp13"; /* OK */
+				marvell,function = "gpio";
+			};
+
+/*
+			pmx_buzzer: pmx-buzzer {
+				marvell,pins = "mpp20";
+				marvell,function = "gpio";
+			};
+*/
+
+			pmx_pwr_sata1: pmx-pwr-sata1 {
+				marvell,pins = "mpp33";
+				marvell,function = "gpio";
+			};
+
+		};
+
+                serial@12000 {
+                        status = "ok";
+                };
+
+                sata@80000 {
+                        status = "okay";
+                        nr-ports = <2>;
+                };
+
+		rtc@10300 {
+			status = "disabled";
+		};
+
+		i2c@11000 {
+			status = "okay";
+			ht1382: rtc@68 {
+				compatible = "htk,ht1382";
+				reg = <0x68>;
+			};
+		};
+	};
+
+	regulators {
+                compatible = "simple-bus";
+                #address-cells = <1>;
+                #size-cells = <0>;
+                pinctrl-names = "default";
+		pinctrl-0 = <&pmx_usb_power &pmx_pwr_sata1>;
+
+                usb0_power: regulator@1 {
+                        compatible = "regulator-fixed";
+                        reg = <1>;
+                        regulator-name = "USB Power";
+                        regulator-min-microvolt = <5000000>;
+                        regulator-max-microvolt = <5000000>;
+                        regulator-always-on;
+                        regulator-boot-on;
+			enable-active-high;
+                        gpio = <&gpio0 21 GPIO_ACTIVE_HIGH>;
+                };
+
+		sata1_power: regulator@2 {
+			compatible = "regulator-fixed";
+			reg = <2>;
+			regulator-name = "SATA1 Power";
+			regulator-min-microvolt = <5000000>;
+			regulator-max-microvolt = <5000000>;
+			regulator-always-on;
+			regulator-boot-on;
+			enable-active-high;
+			gpio = <&gpio1 1 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
+        gpio_poweroff {
+                compatible = "gpio-poweroff";
+                pinctrl-0 = <&pmx_pwr_off>;
+                pinctrl-names = "default";
+                gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
+        };
+
+        gpio_keys {
+                compatible = "gpio-keys";
+                #address-cells = <1>;
+                #size-cells = <0>;
+                pinctrl-0 = <&pmx_btn_reset &pmx_btn_copy &pmx_btn_power>;
+                pinctrl-names = "default";
+
+                button@1 {
+                        label = "Power Button";
+                        linux,code = <KEY_POWER>;
+                        gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
+                };
+                button@2 {
+                        label = "Copy Button";
+                        linux,code = <KEY_COPY>;
+                        gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
+                };
+                button@3 {
+                        label = "Reset Button";
+                        linux,code = <KEY_RESTART>;
+                        gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
+                };
+        };
+
+	gpio-leds {
+		compatible = "gpio-leds";
+		pinctrl-0 = <&pmx_led_hdd2_green &pmx_led_hdd2_red
+			     &pmx_led_usb_green
+			     &pmx_led_sys_green &pmx_led_sys_orange
+			     &pmx_led_copy_green &pmx_led_copy_red
+			     &pmx_led_hdd1_green &pmx_led_hdd1_red>;
+		pinctrl-names = "default";
+
+		green-sys {
+			label = "nsa320s:green:sys";
+			gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "timer";
+		};
+		orange-sys {
+			label = "nsa320s:orange:sys";
+			gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
+		};
+		green-hdd1 {
+			label = "nsa320s:green:hdd1";
+			gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
+		};
+		red-hdd1 {
+			label = "nsa320s:red:hdd1";
+			gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
+		};
+		green-hdd2 {
+			label = "nsa320s:green:hdd2";
+			gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
+		};
+		red-hdd2 {
+			label = "nsa320s:red:hdd2";
+			gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+		};
+		green-usb {
+			label = "nsa320s:green:usb";
+			gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
+		};
+		green-copy {
+			label = "nsa320s:green:copy";
+			gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "ide-disk";
+		};
+		red-copy {
+			label = "nsa320s:red:copy";
+			gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
+		};
+	};
+};
+
+&nand {
+        status = "okay";
+        chip-delay = <35>;
+
+        partition@0 {
+                label = "uboot";
+                reg = <0x0000000 0x0100000>;
+                read-only;
+        };
+        partition@100000 {
+                label = "uboot_env";
+                reg = <0x0100000 0x0080000>;
+        };
+        partition@180000 {
+                label = "key_store";
+                reg = <0x0180000 0x0080000>;
+        };
+        partition@200000 {
+                label = "info";
+                reg = <0x0200000 0x0080000>;
+        };
+        partition@280000 {
+                label = "etc";
+                reg = <0x0280000 0x0a00000>;
+        };
+        partition@c80000 {
+                label = "kernel_1";
+                reg = <0x0c80000 0x0a00000>;
+        };
+        partition@1680000 {
+                label = "rootfs1";
+                reg = <0x1680000 0x2fc0000>;
+        };
+        partition@4640000 {
+                label = "kernel_2";
+                reg = <0x4640000 0x0a00000>;
+        };
+        partition@5040000 {
+                label = "rootfs2";
+                reg = <0x5040000 0x2fc0000>;
+        };
+};
+
+&mdio {
+	status = "okay";
+	ethphy0: ethernet-phy@1 {
+		compatible = "marvell,88e1510";
+		reg = <1>;
+                marvell,reg-init = <0x1 0x16 0x0 0x3>,
+                                   <0x1 0x10 0x0 0x1017>,
+                                   <0x1 0x11 0x0 0x4408>,
+                                   <0x1 0x16 0x0 0x0>,
+                                   <0x1 0x4 0x0 0x1e1>,
+                                   <0x1 0x9 0x0 0x300>,
+                                   <0x1 0x10 0x0 0x3860>,
+                                   <0x1 0x0 0x0 0x9140>;
+	};
+};
+
+&eth0 {
+	status = "okay";
+	ethernet0-port@0 {
+		phy-handle = <&ethphy0>;
+	};
+};
+
diff -rNub linux-4.5.orig/arch/arm/boot/dts/Makefile linux-4.5/arch/arm/boot/dts/Makefile
--- linux-4.5.orig/arch/arm/boot/dts/Makefile	2016-03-14 05:28:54.000000000 +0100
+++ linux-4.5/arch/arm/boot/dts/Makefile	2016-03-14 16:49:24.835192101 +0100
@@ -206,6 +206,7 @@
 	kirkwood-ns2mini.dtb \
 	kirkwood-nsa310.dtb \
 	kirkwood-nsa310a.dtb \
+	kirkwood-nsa320s.dtb \
 	kirkwood-nsa325.dtb \
 	kirkwood-openblocks_a6.dtb \
 	kirkwood-openblocks_a7.dtb \
diff -rNub linux-4.5.orig/drivers/ata/sata_mv.c linux-4.5/drivers/ata/sata_mv.c
--- linux-4.5.orig/drivers/ata/sata_mv.c	2016-03-14 05:28:54.000000000 +0100
+++ linux-4.5/drivers/ata/sata_mv.c	2016-03-14 16:46:48.859195429 +0100
@@ -72,6 +72,7 @@
 #include <scsi/scsi_cmnd.h>
 #include <scsi/scsi_device.h>
 #include <linux/libata.h>
+#include <linux/leds.h>
 
 #define DRV_NAME	"sata_mv"
 #define DRV_VERSION	"1.28"
@@ -1175,6 +1176,8 @@
 {
 	int want_ncq = (protocol == ATA_PROT_NCQ);
 
+	ledtrig_ide_activity();
+
 	if (pp->pp_flags & MV_PP_FLAG_EDMA_EN) {
 		int using_ncq = ((pp->pp_flags & MV_PP_FLAG_NCQ_EN) != 0);
 		if (want_ncq != using_ncq)
diff -rNub linux-4.5.orig/drivers/leds/trigger/Kconfig linux-4.5/drivers/leds/trigger/Kconfig
--- linux-4.5.orig/drivers/leds/trigger/Kconfig	2016-03-14 05:28:54.000000000 +0100
+++ linux-4.5/drivers/leds/trigger/Kconfig	2016-03-14 16:46:48.859195429 +0100
@@ -35,10 +35,9 @@
 
 config LEDS_TRIGGER_IDE_DISK
 	bool "LED IDE Disk Trigger"
-	depends on IDE_GD_ATA
 	depends on LEDS_TRIGGERS
 	help
-	  This allows LEDs to be controlled by IDE disk activity.
+	  This allows LEDs to be controlled by IDE or SATA disk activity.
 	  If unsure, say Y.
 
 config LEDS_TRIGGER_HEARTBEAT
diff -rNub linux-4.5.orig/drivers/rtc/Kconfig linux-4.5/drivers/rtc/Kconfig
--- linux-4.5.orig/drivers/rtc/Kconfig	2016-03-14 05:28:54.000000000 +0100
+++ linux-4.5/drivers/rtc/Kconfig	2016-03-14 16:46:48.863195429 +0100
@@ -249,6 +249,15 @@
 	  This driver can also be built as a module.  If so, the module
 	  will be called rtc-ds3232.
 
+config RTC_DRV_HT1382
+	tristate "Holtek HT1382"
+	depends on I2C && OF
+	help
+	  Say Y to enable support for the HT1382 I2C RTC chip.
+
+	  This driver can also be built as a module. If so, the module
+	  will be called rtc-ht1382.
+
 config RTC_DRV_HYM8563
 	tristate "Haoyu Microelectronics HYM8563"
 	depends on OF
diff -rNub linux-4.5.orig/drivers/rtc/Makefile linux-4.5/drivers/rtc/Makefile
--- linux-4.5.orig/drivers/rtc/Makefile	2016-03-14 05:28:54.000000000 +0100
+++ linux-4.5/drivers/rtc/Makefile	2016-03-14 16:46:48.863195429 +0100
@@ -67,6 +67,7 @@
 obj-$(CONFIG_RTC_DRV_GEMINI)	+= rtc-gemini.o
 obj-$(CONFIG_RTC_DRV_GENERIC)	+= rtc-generic.o
 obj-$(CONFIG_RTC_DRV_HID_SENSOR_TIME) += rtc-hid-sensor-time.o
+obj-$(CONFIG_RTC_DRV_HT1382)	+= rtc-ht1382.o
 obj-$(CONFIG_RTC_DRV_HYM8563)	+= rtc-hym8563.o
 obj-$(CONFIG_RTC_DRV_IMXDI)	+= rtc-imxdi.o
 obj-$(CONFIG_RTC_DRV_ISL12022)	+= rtc-isl12022.o
diff -rNub linux-4.5.orig/drivers/rtc/rtc-ht1382.c linux-4.5/drivers/rtc/rtc-ht1382.c
--- linux-4.5.orig/drivers/rtc/rtc-ht1382.c	1970-01-01 01:00:00.000000000 +0100
+++ linux-4.5/drivers/rtc/rtc-ht1382.c	2016-03-14 16:46:48.863195429 +0100
@@ -0,0 +1,209 @@
+/*
+ * Driver for Holtek HT1382 RTC.
+ *
+ * Copyright (C) 2015 Karoly Pocsi <chrlee@chrlee.net>
+ *
+ * Based on bq32k driver by Semihalf and Pavel Machek
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * You can get hardware description at
+ * http://www.holtek.com.tw/english/docum/consumer/1382.htm
+ *
+ * NOTE: Currently this driver only supports the bare minimum for read
+ * and write the RTC. The extra features provided by the chip
+ * (alarm, digital trimming, eprom) are unavailable.
+ */
+
+#include <linux/module.h>
+#include <linux/i2c.h>
+#include <linux/rtc.h>
+#include <linux/init.h>
+#include <linux/errno.h>
+#include <linux/bcd.h>
+
+#define HT1382_SECONDS		0x00	/* Seconds register address */
+#define HT1382_STOP		0x80	/* Oscillator Stop flag */
+#define HT1382_HOUR_1224	0x80	/* 12/24 flag */
+#define HT1382_HOUR_AMPM	0x20	/* AM/PM flag */
+
+#define HT1382_ST1		0x07	/* Status register address */
+#define HT1382_WP		0x80	/* Write Protect flag */
+
+struct ht1382_regs {
+	uint8_t		second;
+	uint8_t		minute;
+	uint8_t		hour;
+	uint8_t		date;
+	uint8_t		month;
+	uint8_t		day;
+	uint8_t		year;
+};
+
+static struct i2c_driver ht1382_driver;
+
+static int ht1382_read(struct device *dev, void *data, uint8_t off, uint8_t len)
+{
+	struct i2c_client *client = to_i2c_client(dev);
+	struct i2c_msg msgs[] = {
+		{
+			.addr = client->addr,
+			.flags = 0,
+			.len = 1,
+			.buf = &off,
+		}, {
+			.addr = client->addr,
+			.flags = I2C_M_RD,
+			.len = len,
+			.buf = data,
+		}
+	};
+
+	if (i2c_transfer(client->adapter, msgs, 2) == 2)
+		return 0;
+
+	return -EIO;
+}
+
+static int ht1382_write(struct device *dev, void *data, uint8_t off, uint8_t len)
+{
+	struct i2c_client *client = to_i2c_client(dev);
+	uint8_t buffer[len + 1];
+
+	buffer[0] = off;
+	memcpy(&buffer[1], data, len);
+
+	if (i2c_master_send(client, buffer, len + 1) == len + 1)
+		return 0;
+
+	return -EIO;
+}
+
+static int ht1382_rtc_read_time(struct device *dev, struct rtc_time *tm)
+{
+	struct ht1382_regs regs;
+	int error;
+
+	error = ht1382_read(dev, &regs, 0, sizeof(regs));
+	if (error)
+		return error;
+
+	dev_dbg(dev,
+		"%s: raw data is sec=%02x, min=%02x, hour=%02x, "
+		"date=%02x, day=%02x, mon=%02x, "
+		"year=%02x\n",
+		__func__,
+		regs.second,regs.minute,regs.hour,
+		regs.date,regs.day,regs.month,regs.year);
+
+	tm->tm_sec = bcd2bin(regs.second & 0x7f);
+	tm->tm_min = bcd2bin(regs.minute & 0x7f);
+        if (regs.hour & HT1382_HOUR_1224) {
+                tm->tm_hour = bcd2bin(regs.hour & 0x1f);
+                if (regs.hour & HT1382_HOUR_AMPM) tm->tm_hour += 12;
+        } else {
+                tm->tm_hour = bcd2bin(regs.hour & 0x3f);
+	}
+	tm->tm_mday = bcd2bin(regs.date);
+	tm->tm_wday = bcd2bin(regs.day) - 1;
+	tm->tm_mon = bcd2bin(regs.month) - 1;
+	tm->tm_year = bcd2bin(regs.year) + 100;
+	if (rtc_valid_tm(tm)) {
+		dev_err(dev, "retrieved date/time is not valid.\n");		
+		return -EINVAL;
+	}
+	return 0;
+}
+
+static int ht1382_rtc_set_time(struct device *dev, struct rtc_time *tm)
+{
+	struct ht1382_regs regs;
+	uint8_t reg;
+	int error;
+
+	/* WP off */
+	reg = 0;
+	error = ht1382_write(dev, &reg, HT1382_ST1, 1);
+	if (error)
+		return error;
+
+	regs.second = bin2bcd(tm->tm_sec);
+	regs.minute = bin2bcd(tm->tm_min);
+	regs.hour = bin2bcd(tm->tm_hour);
+	regs.day = bin2bcd(tm->tm_wday + 1);
+	regs.date = bin2bcd(tm->tm_mday);
+	regs.month = bin2bcd(tm->tm_mon + 1);
+	regs.year = bin2bcd(tm->tm_year % 100);
+
+	error = ht1382_write(dev, &regs, 0, sizeof(regs));
+	if (error)
+		return error;
+
+	/* WP on */
+	reg = 0x80;
+	return ht1382_write(dev, &reg, HT1382_ST1, 1);
+}
+
+static const struct rtc_class_ops ht1382_rtc_ops = {
+	.read_time	= ht1382_rtc_read_time,
+	.set_time	= ht1382_rtc_set_time,
+};
+
+static int ht1382_probe(struct i2c_client *client,
+				const struct i2c_device_id *id)
+{
+	struct device *dev = &client->dev;
+	struct rtc_device *rtc;
+	uint8_t reg;
+	int error;
+
+	if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C))
+		return -ENODEV;
+
+	error = ht1382_read(dev, &reg, HT1382_SECONDS, 1);
+	if (!error && (reg & HT1382_STOP)) {
+		dev_warn(dev, "Oscillator was halted. Restarting...\n");
+		reg &= ~HT1382_STOP;
+		error = ht1382_write(dev, &reg, HT1382_SECONDS, 1);
+	}
+	if (error)
+		return error;
+
+	rtc = devm_rtc_device_register(&client->dev, ht1382_driver.driver.name,
+						&ht1382_rtc_ops, THIS_MODULE);
+	if (IS_ERR(rtc))
+		return PTR_ERR(rtc);
+
+	i2c_set_clientdata(client, rtc);
+
+	return 0;
+}
+
+static const struct i2c_device_id ht1382_id[] = {
+	{ "ht1382", 0 },
+	{ }
+};
+MODULE_DEVICE_TABLE(i2c, ht1382_id);
+
+static const struct of_device_id ht1382_of_match[] = {
+        { .compatible = "htk,ht1382" },
+        {}
+};
+MODULE_DEVICE_TABLE(of, ht1382_of_match);
+
+static struct i2c_driver ht1382_driver = {
+	.driver = {
+		.name	= "ht1382",
+		.owner	= THIS_MODULE,
+	},
+	.probe		= ht1382_probe,
+	.id_table	= ht1382_id,
+};
+
+module_i2c_driver(ht1382_driver);
+
+MODULE_AUTHOR("Karoly Pocsi <chrlee@chrlee.net>");
+MODULE_DESCRIPTION("Holtek 1382 I2C RTC driver");
+MODULE_LICENSE("GPL");
