mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-02-16 23:57:11 +00:00
core/linux-kirkwood-dt to 3.18.6-2;add nsa325 support;add nsa3xx_hwmon; improve ppv4 dts
This commit is contained in:
parent
906338967b
commit
1eb25f797c
8 changed files with 763 additions and 22 deletions
|
@ -7,7 +7,7 @@ pkgbase=linux-kirkwood-dt
|
|||
_kernelname=${pkgbase#linux}
|
||||
_desc="Marvell Kirkwood DT"
|
||||
pkgver=3.18.6
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
cryptodev_commit=6aa62a2c320b04f55fdfe0ed015c3d9b48997239
|
||||
bfqver=v7r7
|
||||
|
||||
|
@ -28,14 +28,15 @@ source=("ftp://ftp.kernel.org/pub/linux/kernel/v3.x/linux-${pkgver}.tar.xz"
|
|||
"ftp://teambelgium.net/bfq/patches/${pkgver:0:4}.0-${bfqver}/0001-block-cgroups-kconfig-build-bits-for-BFQ-${bfqver}-${pkgver:0:4}.patch"
|
||||
"ftp://teambelgium.net/bfq/patches/${pkgver:0:4}.0-${bfqver}/0002-block-introduce-the-BFQ-${bfqver}-I-O-sched-for-${pkgver:0:4}.patch"
|
||||
"ftp://teambelgium.net/bfq/patches/${pkgver:0:4}.0-${bfqver}/0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-${bfqver}-for-${pkgver:0:4}.0.patch"
|
||||
'goflexhome_dtb.patch'
|
||||
'pogo_e02_dtb.patch'
|
||||
'pogoplugv4_dtb.patch'
|
||||
'goflexhome_fdt.patch'
|
||||
'pogo_e02_fdt.patch'
|
||||
'pogoplugv4_fdt.patch'
|
||||
'nsa325_fdt.patch'
|
||||
'mvsdio_TX-DMA_workaround.patch')
|
||||
|
||||
md5sums=('997c8492ebfdc9bb9e6ed8d4945539dd'
|
||||
'5dbb04ebed1afb6d2e1408598cd34ad7'
|
||||
'e319a8e1a596a39a8951fc6454664b15'
|
||||
'c303c5ee0c15d8bb17637b2525fa039b'
|
||||
'a67c880f50e3aff38e821f9c0f659ac9'
|
||||
'9b5a265440abf57d2052838f31486a3a'
|
||||
'09d44b9f07abfaeaf4f688ee52034786'
|
||||
'SKIP'
|
||||
|
@ -43,9 +44,10 @@ md5sums=('997c8492ebfdc9bb9e6ed8d4945539dd'
|
|||
'1c7c2d0338939a9e6953a64d80861471'
|
||||
'a81346cce95baeac2c56cf60d3c7e5b6'
|
||||
'8f2743651280f5a022e541f4e95e5546'
|
||||
'e42c64b6f4b54f382cf3d7e8d82968f1'
|
||||
'ce1975f40c48ec1b08dd09447ab043ca'
|
||||
'341f8164dad19b6baf05d764a800862a'
|
||||
'f6d3cdb34455475d0bc70fbf3061023b'
|
||||
'7efecf23dbebc1ee2e2ccb527c8579c0'
|
||||
'8397411edfe110b7cf074f5fecd110c0'
|
||||
'fd50ede1d3bfdd4b00a3c830ebf2db0d')
|
||||
|
||||
prepare() {
|
||||
|
@ -74,9 +76,10 @@ msg2 "Work around broken TX DMA in mvsdio"
|
|||
|
||||
msg2 "Add Arch Linux ARM patch for ARMv5te plug computers"
|
||||
patch -Np1 -i "${srcdir}/archlinuxarm.patch"
|
||||
patch -Np1 -i "${srcdir}/goflexhome_dtb.patch"
|
||||
patch -Np1 -i "${srcdir}/pogo_e02_dtb.patch"
|
||||
patch -Np1 -i "${srcdir}/pogoplugv4_dtb.patch"
|
||||
patch -Np1 -i "${srcdir}/goflexhome_fdt.patch"
|
||||
patch -Np1 -i "${srcdir}/pogo_e02_fdt.patch"
|
||||
patch -Np1 -i "${srcdir}/pogoplugv4_fdt.patch"
|
||||
patch -Np1 -i "${srcdir}/nsa325_fdt.patch"
|
||||
|
||||
msg2 "Add BFQ patches"
|
||||
patch -Np1 -i "${srcdir}/0001-block-cgroups-kconfig-build-bits-for-BFQ-${bfqver}-${pkgver:0:4}.patch"
|
||||
|
@ -119,7 +122,7 @@ build() {
|
|||
#yes "" | make config
|
||||
|
||||
msg "Building!"
|
||||
make ${MAKEFLAGS} zImage modules dtbs kirkwood-nsa320.dtb
|
||||
make ${MAKEFLAGS} zImage modules dtbs kirkwood-nsa320.dtb kirkwood-nsa325.dtb
|
||||
|
||||
msg "Building cryptodev module"
|
||||
cd "${srcdir}/cryptodev-linux-${cryptodev_commit}"
|
||||
|
|
|
@ -13,7 +13,7 @@ diff -ruN a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
|
|||
{
|
||||
int want_ncq = (protocol == ATA_PROT_NCQ);
|
||||
|
||||
+ ledtrig_ide_activity();
|
||||
+ ledtrig_ide_activity(ap->port_no);
|
||||
+
|
||||
if (pp->pp_flags & MV_PP_FLAG_EDMA_EN) {
|
||||
int using_ncq = ((pp->pp_flags & MV_PP_FLAG_NCQ_EN) != 0);
|
||||
|
@ -29,6 +29,67 @@ diff -ruN a/drivers/leds/trigger/Kconfig b/drivers/leds/trigger/Kconfig
|
|||
depends on LEDS_TRIGGERS
|
||||
help
|
||||
This allows LEDs to be controlled by IDE disk activity.
|
||||
diff -ruN a/drivers/leds/trigger/ledtrig-ide-disk.c b/drivers/leds/trigger/ledtrig-ide-disk.
|
||||
--- a/drivers/leds/trigger/ledtrig-ide-disk.c 2014-10-05 12:23:04.000000000 -0700
|
||||
+++ b/drivers/leds/trigger/ledtrig-ide-disk.c 2014-10-09 22:04:58.000000000 -0700
|
||||
@@ -18,25 +20,36 @@
|
||||
|
||||
#define BLINK_DELAY 30
|
||||
|
||||
-DEFINE_LED_TRIGGER(ledtrig_ide);
|
||||
+DEFINE_LED_TRIGGER(ledtrig_ide1);
|
||||
+DEFINE_LED_TRIGGER(ledtrig_ide2);
|
||||
static unsigned long ide_blink_delay = BLINK_DELAY;
|
||||
|
||||
-void ledtrig_ide_activity(void)
|
||||
+void ledtrig_ide_activity(int port_number)
|
||||
{
|
||||
- led_trigger_blink_oneshot(ledtrig_ide,
|
||||
- &ide_blink_delay, &ide_blink_delay, 0);
|
||||
+ switch (port_number) {
|
||||
+ case 0:
|
||||
+ led_trigger_blink_oneshot(ledtrig_ide1, &ide_blink_delay, &ide_blink_delay, 0);
|
||||
+ break;
|
||||
+ case 1:
|
||||
+ led_trigger_blink_oneshot(ledtrig_ide2, &ide_blink_delay, &ide_blink_delay, 0);
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
EXPORT_SYMBOL(ledtrig_ide_activity);
|
||||
|
||||
static int __init ledtrig_ide_init(void)
|
||||
{
|
||||
- led_trigger_register_simple("ide-disk", &ledtrig_ide);
|
||||
+ led_trigger_register_simple("ide-disk1", &ledtrig_ide1);
|
||||
+ led_trigger_register_simple("ide-disk2", &ledtrig_ide2);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit ledtrig_ide_exit(void)
|
||||
{
|
||||
- led_trigger_unregister_simple(ledtrig_ide);
|
||||
+ led_trigger_unregister_simple(ledtrig_ide1);
|
||||
+ led_trigger_unregister_simple(ledtrig_ide2);
|
||||
}
|
||||
|
||||
module_init(ledtrig_ide_init);
|
||||
diff -ruN a/include/linux/leds.h b/include/linux/leds.h
|
||||
--- a/include/linux/leds.h 2014-10-05 12:23:04.000000000 -0700
|
||||
+++ b/include/linux/leds.h 2014-10-09 22:04:58.000000000 -0700
|
||||
@@ -215,9 +216,9 @@
|
||||
|
||||
/* Trigger specific functions */
|
||||
#ifdef CONFIG_LEDS_TRIGGER_IDE_DISK
|
||||
-extern void ledtrig_ide_activity(void);
|
||||
+extern void ledtrig_ide_activity(int port_number);
|
||||
#else
|
||||
-static inline void ledtrig_ide_activity(void) {}
|
||||
+static inline void ledtrig_ide_activity(int port_number) {}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_LEDS_TRIGGER_CAMERA) || defined(CONFIG_LEDS_TRIGGER_CAMERA_MODULE)
|
||||
diff -ruN a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
|
||||
--- a/drivers/mmc/core/core.c 2013-11-03 16:41:51.000000000 -0700
|
||||
+++ b/drivers/mmc/core/core.c 2013-11-08 01:39:49.008020351 -0700
|
||||
|
@ -78,3 +139,318 @@ diff -ruN a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c
|
|||
+ if (cmd->opcode == SD_SWITCH) mdelay(1); /* Voodoo */
|
||||
|
||||
cmdreg = MVSD_CMD_INDEX(cmd->opcode);
|
||||
|
||||
diff -ruN a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
|
||||
--- a/drivers/hwmon/Kconfig 2014-10-05 12:23:04.000000000 -0700
|
||||
+++ b/drivers/hwmon/Kconfig 2014-10-09 22:04:58.000000000 -0700
|
||||
@@ -1669,6 +1669,19 @@
|
||||
This driver provides support for the Ultra45 workstation environmental
|
||||
sensors.
|
||||
|
||||
+config SENSORS_NSA3XX
|
||||
+ tristate "ZyXEL NSA3xx fan speed and temperature sensors"
|
||||
+ depends on GPIOLIB
|
||||
+ help
|
||||
+ If you say yes here you get support for hardware monitoring
|
||||
+ for the ZyXEL NSA3XX Media Servers.
|
||||
+
|
||||
+ The sensor data is taken from a Holtek HT46R065 microcontroller
|
||||
+ connected to GPIO lines.
|
||||
+
|
||||
+ This driver can also be built as a module. If so, the module
|
||||
+ will be called nsa3xx-hwmon.
|
||||
+
|
||||
if ACPI
|
||||
|
||||
comment "ACPI drivers"
|
||||
diff -Naur a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile
|
||||
--- a/drivers/hwmon/Makefile 2014-10-05 12:23:04.000000000 -0700
|
||||
+++ b/drivers/hwmon/Makefile 2014-10-09 22:04:58.000000000 -0700
|
||||
@@ -114,6 +114,7 @@
|
||||
obj-$(CONFIG_SENSORS_MAX6650) += max6650.o
|
||||
obj-$(CONFIG_SENSORS_MAX6697) += max6697.o
|
||||
obj-$(CONFIG_SENSORS_MC13783_ADC)+= mc13783-adc.o
|
||||
+obj-$(CONFIG_SENSORS_NSA3XX) += nsa3xx-hwmon.o
|
||||
obj-$(CONFIG_SENSORS_MCP3021) += mcp3021.o
|
||||
obj-$(CONFIG_SENSORS_NCT6683) += nct6683.o
|
||||
obj-$(CONFIG_SENSORS_NCT6775) += nct6775.o
|
||||
diff -Naur a/drivers/hwmon/nsa3xx-hwmon.c b/drivers/hwmon/nsa3xx-hwmon.c
|
||||
--- a/drivers/hwmon/nsa3xx-hwmon.c 1969-12-31 16:00:00.000000000 -0800
|
||||
+++ b/drivers/hwmon/nsa3xx-hwmon.c 2014-10-09 22:04:58.000000000 -0700
|
||||
@@ -0,0 +1,251 @@
|
||||
+/*
|
||||
+ * drivers/hwmon/nsa3xx-hwmon.c
|
||||
+ *
|
||||
+ * ZyXEL NSA3xx Media Servers
|
||||
+ * hardware monitoring
|
||||
+ *
|
||||
+ * Copyright (C) 2012 Peter Schildmann <linux@schildmann.info>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify it
|
||||
+ * under the terms of the GNU General Public License v2 as published by the
|
||||
+ * Free Software Foundation.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
+ * more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License along with
|
||||
+ * this program; if not, write to the Free Software Foundation, Inc.,
|
||||
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
+ */
|
||||
+
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/mutex.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/err.h>
|
||||
+#include <linux/gpio.h>
|
||||
+#include <linux/hwmon.h>
|
||||
+#include <linux/hwmon-sysfs.h>
|
||||
+#include <linux/nsa3xx-hwmon.h>
|
||||
+#include <linux/slab.h>
|
||||
+#include <linux/jiffies.h>
|
||||
+#include <linux/delay.h>
|
||||
+#include <asm/delay.h>
|
||||
+
|
||||
+#define MAGIC_NUMBER 0x55
|
||||
+
|
||||
+struct nsa3xx_hwmon {
|
||||
+ struct platform_device *pdev;
|
||||
+ struct device *classdev;
|
||||
+ struct mutex update_lock; /* lock GPIO operations */
|
||||
+ unsigned long last_updated; /* jiffies */
|
||||
+ unsigned long mcu_data;
|
||||
+};
|
||||
+
|
||||
+enum nsa3xx_inputs {
|
||||
+ NSA3XX_FAN = 1,
|
||||
+ NSA3XX_TEMP = 0,
|
||||
+};
|
||||
+
|
||||
+static const char *nsa3xx_input_names[] = {
|
||||
+ [NSA3XX_FAN] = "Chassis Fan",
|
||||
+ [NSA3XX_TEMP] = "System Temperature",
|
||||
+};
|
||||
+
|
||||
+static unsigned long nsa3xx_hwmon_update(struct device *dev)
|
||||
+{
|
||||
+ int i;
|
||||
+ unsigned long mcu_data;
|
||||
+ struct nsa3xx_hwmon *hwmon = dev_get_drvdata(dev);
|
||||
+ struct nsa3xx_hwmon_platform_data *pdata = hwmon->pdev->dev.platform_data;
|
||||
+
|
||||
+ mutex_lock(&hwmon->update_lock);
|
||||
+
|
||||
+ mcu_data = hwmon->mcu_data;
|
||||
+
|
||||
+ if (time_after(jiffies, hwmon->last_updated + (3 * HZ)) || mcu_data == 0) {
|
||||
+ dev_dbg(dev, "Reading MCU data\n");
|
||||
+
|
||||
+ gpio_set_value(pdata->act_pin, 0);
|
||||
+ msleep(100);
|
||||
+
|
||||
+ for (i = 31; i >= 0; i--) {
|
||||
+ gpio_set_value(pdata->clk_pin, 0);
|
||||
+ udelay(100);
|
||||
+
|
||||
+ gpio_set_value(pdata->clk_pin, 1);
|
||||
+ udelay(100);
|
||||
+
|
||||
+ mcu_data |= gpio_get_value(pdata->data_pin) ? (1 << i) : 0;
|
||||
+ }
|
||||
+
|
||||
+ gpio_set_value(pdata->act_pin, 1);
|
||||
+
|
||||
+ if ((mcu_data & 0xff000000) != (MAGIC_NUMBER << 24)) {
|
||||
+ dev_err(dev, "Failed to read MCU data\n");
|
||||
+ mcu_data = 0;
|
||||
+ }
|
||||
+
|
||||
+ hwmon->mcu_data = mcu_data;
|
||||
+ hwmon->last_updated = jiffies;
|
||||
+ }
|
||||
+
|
||||
+ mutex_unlock(&hwmon->update_lock);
|
||||
+
|
||||
+ return mcu_data;
|
||||
+}
|
||||
+
|
||||
+static ssize_t show_name(struct device *dev,
|
||||
+ struct device_attribute *attr, char *buf)
|
||||
+{
|
||||
+ return sprintf(buf, "nsa3xx\n");
|
||||
+}
|
||||
+
|
||||
+static ssize_t show_label(struct device *dev,
|
||||
+ struct device_attribute *attr, char *buf)
|
||||
+{
|
||||
+ int channel = to_sensor_dev_attr(attr)->index;
|
||||
+ return sprintf(buf, "%s\n", nsa3xx_input_names[channel]);
|
||||
+}
|
||||
+
|
||||
+static ssize_t show_value(struct device *dev,
|
||||
+ struct device_attribute *attr, char *buf)
|
||||
+{
|
||||
+ int channel = to_sensor_dev_attr(attr)->index;
|
||||
+ unsigned long mcu_data = nsa3xx_hwmon_update(dev);
|
||||
+ unsigned long value = 0;
|
||||
+ switch(channel) {
|
||||
+ case NSA3XX_TEMP:
|
||||
+ value = (mcu_data & 0xffff) * 100;
|
||||
+ break;
|
||||
+ case NSA3XX_FAN:
|
||||
+ value = ((mcu_data & 0xff0000) >> 16) * 100;
|
||||
+ break;
|
||||
+ }
|
||||
+ return sprintf(buf, "%lu\n", value);
|
||||
+}
|
||||
+
|
||||
+static DEVICE_ATTR(name, S_IRUGO, show_name, NULL);
|
||||
+static SENSOR_DEVICE_ATTR(temp1_label, S_IRUGO, show_label, NULL, NSA3XX_TEMP);
|
||||
+static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, show_value, NULL, NSA3XX_TEMP);
|
||||
+static SENSOR_DEVICE_ATTR(fan1_label, S_IRUGO, show_label, NULL, NSA3XX_FAN);
|
||||
+static SENSOR_DEVICE_ATTR(fan1_input, S_IRUGO, show_value, NULL, NSA3XX_FAN);
|
||||
+
|
||||
+static struct attribute *nsa3xx_attributes[] = {
|
||||
+ &dev_attr_name.attr,
|
||||
+ &sensor_dev_attr_temp1_label.dev_attr.attr,
|
||||
+ &sensor_dev_attr_temp1_input.dev_attr.attr,
|
||||
+ &sensor_dev_attr_fan1_label.dev_attr.attr,
|
||||
+ &sensor_dev_attr_fan1_input.dev_attr.attr,
|
||||
+ NULL
|
||||
+};
|
||||
+
|
||||
+static const struct attribute_group nsa3xx_attr_group = {
|
||||
+ .attrs = nsa3xx_attributes,
|
||||
+};
|
||||
+
|
||||
+static int nsa3xx_hwmon_request_gpios(struct nsa3xx_hwmon_platform_data *pdata)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ if ((ret = gpio_request(pdata->act_pin, "act pin")))
|
||||
+ return ret;
|
||||
+
|
||||
+ if ((ret = gpio_request(pdata->clk_pin, "clk pin")))
|
||||
+ return ret;
|
||||
+
|
||||
+ if ((ret = gpio_request(pdata->data_pin, "data pin")))
|
||||
+ return ret;
|
||||
+
|
||||
+ if ((ret = gpio_direction_output(pdata->act_pin, 1)))
|
||||
+ return ret;
|
||||
+
|
||||
+ if ((ret = gpio_direction_output(pdata->clk_pin, 1)))
|
||||
+ return ret;
|
||||
+
|
||||
+ if ((ret = gpio_direction_input(pdata->data_pin)))
|
||||
+ return ret;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void nsa3xx_hwmon_free_gpios(struct nsa3xx_hwmon_platform_data *pdata)
|
||||
+{
|
||||
+ gpio_free(pdata->act_pin);
|
||||
+ gpio_free(pdata->clk_pin);
|
||||
+ gpio_free(pdata->data_pin);
|
||||
+}
|
||||
+
|
||||
+static int nsa3xx_hwmon_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ int ret;
|
||||
+ struct nsa3xx_hwmon *hwmon;
|
||||
+ struct nsa3xx_hwmon_platform_data *pdata = pdev->dev.platform_data;
|
||||
+
|
||||
+ hwmon = kzalloc(sizeof(struct nsa3xx_hwmon), GFP_KERNEL);
|
||||
+ if (!hwmon)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ platform_set_drvdata(pdev, hwmon);
|
||||
+ hwmon->pdev = pdev;
|
||||
+ hwmon->mcu_data = 0;
|
||||
+ mutex_init(&hwmon->update_lock);
|
||||
+
|
||||
+ ret = sysfs_create_group(&pdev->dev.kobj, &nsa3xx_attr_group);
|
||||
+ if (ret)
|
||||
+ goto err;
|
||||
+
|
||||
+ hwmon->classdev = hwmon_device_register(&pdev->dev);
|
||||
+ if (IS_ERR(hwmon->classdev)) {
|
||||
+ ret = PTR_ERR(hwmon->classdev);
|
||||
+ goto err_sysfs;
|
||||
+ }
|
||||
+
|
||||
+ ret = nsa3xx_hwmon_request_gpios(pdata);
|
||||
+ if (ret)
|
||||
+ goto err_free_gpio;
|
||||
+
|
||||
+ dev_info(&pdev->dev, "initialized\n");
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+err_free_gpio:
|
||||
+ nsa3xx_hwmon_free_gpios(pdata);
|
||||
+ hwmon_device_unregister(hwmon->classdev);
|
||||
+err_sysfs:
|
||||
+ sysfs_remove_group(&pdev->dev.kobj, &nsa3xx_attr_group);
|
||||
+err:
|
||||
+ platform_set_drvdata(pdev, NULL);
|
||||
+ kfree(hwmon);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int nsa3xx_hwmon_remove(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct nsa3xx_hwmon *hwmon = platform_get_drvdata(pdev);
|
||||
+
|
||||
+ nsa3xx_hwmon_free_gpios(pdev->dev.platform_data);
|
||||
+ hwmon_device_unregister(hwmon->classdev);
|
||||
+ sysfs_remove_group(&pdev->dev.kobj, &nsa3xx_attr_group);
|
||||
+ platform_set_drvdata(pdev, NULL);
|
||||
+ kfree(hwmon);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static struct platform_driver nsa3xx_hwmon_driver = {
|
||||
+ .probe = nsa3xx_hwmon_probe,
|
||||
+ .remove = nsa3xx_hwmon_remove,
|
||||
+ .driver = {
|
||||
+ .name = "nsa3xx-hwmon",
|
||||
+ .owner = THIS_MODULE,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+module_platform_driver(nsa3xx_hwmon_driver);
|
||||
+
|
||||
+MODULE_AUTHOR("Peter Schildmann <linux@schildmann.info>");
|
||||
+MODULE_DESCRIPTION("NSA3XX Hardware Monitoring");
|
||||
+MODULE_LICENSE("GPL");
|
||||
+MODULE_ALIAS("platform:nsa3xx-hwmon");
|
||||
diff -Naur a/include/linux/nsa3xx-hwmon.h b/include/linux/nsa3xx-hwmon.h
|
||||
--- a/include/linux/nsa3xx-hwmon.h 1969-12-31 16:00:00.000000000 -0800
|
||||
+++ b/include/linux/nsa3xx-hwmon.h 2014-10-09 22:04:58.000000000 -0700
|
||||
@@ -0,0 +1,21 @@
|
||||
+/*
|
||||
+ * include/linux/nsa3xx.hwmon.h
|
||||
+ *
|
||||
+ * Platform data structure for ZyXEL NSA3xx hwmon driver
|
||||
+ *
|
||||
+ * This file is licensed under the terms of the GNU General Public
|
||||
+ * License version 2. This program is licensed "as is" without any
|
||||
+ * warranty of any kind, whether express or implied.
|
||||
+ */
|
||||
+
|
||||
+#ifndef __LINUX_NSA3XX_HWMON_H
|
||||
+#define __LINUX_NSA3XX_HWMON_H
|
||||
+
|
||||
+struct nsa3xx_hwmon_platform_data {
|
||||
+ /* GPIO pins */
|
||||
+ unsigned act_pin;
|
||||
+ unsigned clk_pin;
|
||||
+ unsigned data_pin;
|
||||
+};
|
||||
+
|
||||
+#endif /* __LINUX_NSA3XX_HWMON_H */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm 3.18.0-1 Kernel Configuration
|
||||
# Linux/arm 3.18.6-2 Kernel Configuration
|
||||
#
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARM_HAS_SG_CHAIN=y
|
||||
|
@ -2775,6 +2775,7 @@ CONFIG_SENSORS_LM90=m
|
|||
# CONFIG_SENSORS_W83L786NG is not set
|
||||
# CONFIG_SENSORS_W83627HF is not set
|
||||
# CONFIG_SENSORS_W83627EHF is not set
|
||||
CONFIG_SENSORS_NSA3XX=m
|
||||
CONFIG_THERMAL=m
|
||||
CONFIG_THERMAL_HWMON=y
|
||||
CONFIG_THERMAL_OF=y
|
||||
|
|
|
@ -70,7 +70,7 @@ diff -uprN a/arch/arm/boot/dts/kirkwood-goflexhome.dts b/arch/arm/boot/dts/kirkw
|
|||
+ misc {
|
||||
+ label = "status:white:misc";
|
||||
+ gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
|
||||
+ linux,default-trigger = "ide-disk";
|
||||
+ linux,default-trigger = "ide-disk1";
|
||||
+ };
|
||||
+ };
|
||||
+ regulators {
|
|
@ -2,7 +2,7 @@
|
|||
# arg 2: the old package version
|
||||
|
||||
KERNEL_NAME=-kirkwood-dt
|
||||
KERNEL_VERSION=3.18.3-1-ARCH
|
||||
KERNEL_VERSION=3.18.6-2-ARCH
|
||||
|
||||
post_install () {
|
||||
# updating module dependencies
|
||||
|
|
362
core/linux-kirkwood-dt/nsa325_fdt.patch
Normal file
362
core/linux-kirkwood-dt/nsa325_fdt.patch
Normal file
|
@ -0,0 +1,362 @@
|
|||
diff -Naur a/arch/arm/boot/dts/kirkwood-nsa325.dts b/arch/arm/boot/dts/kirkwood-nsa325.dts
|
||||
--- a/arch/arm/boot/dts/kirkwood-nsa325.dts 1969-12-31 16:00:00.000000000 -0800
|
||||
+++ b/arch/arm/boot/dts/kirkwood-nsa325.dts 2014-10-18 18:36:44.000000000 -0700
|
||||
@@ -0,0 +1,358 @@
|
||||
+/*
|
||||
+ * Device tree file for Zyxel NSA 325 NAS
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "kirkwood.dtsi"
|
||||
+#include "kirkwood-6282.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "ZyXEL NSA325";
|
||||
+ compatible = "zyxel,nsa325", "marvell,kirkwood-88f6282", "marvell,kirkwood";
|
||||
+
|
||||
+ memory {
|
||||
+ device_type = "memory";
|
||||
+ reg = <0x00000000 0x20000000>;
|
||||
+ };
|
||||
+
|
||||
+ 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_led_sata2_green: pmx-led-sata2-green {
|
||||
+ marvell,pins = "mpp12";
|
||||
+ marvell,function = "gpo";
|
||||
+ };
|
||||
+
|
||||
+ pmx_led_sata2_red: pmx-led-sata2-red {
|
||||
+ marvell,pins = "mpp13";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+
|
||||
+ pmx_mcu_data: pmx-mcu-data {
|
||||
+ marvell,pins = "mpp14";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+
|
||||
+ pmx_led_usb_green: pmx-led-usb-green {
|
||||
+ marvell,pins = "mpp15";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+
|
||||
+ pmx_mcu_clk: pmx-mcu-clk {
|
||||
+ marvell,pins = "mpp16";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+
|
||||
+ pmx_mcu_act: pmx-mcu-act {
|
||||
+ marvell,pins = "mpp17";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+
|
||||
+ pmx_usb_power_off: pmx-usb-power-off {
|
||||
+ marvell,pins = "mpp21";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+
|
||||
+ pmx_led_sys_green: pmx-led-sys-green {
|
||||
+ marvell,pins = "mpp28";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+
|
||||
+ pmx_led_sys_orange: pmx-led-sys-orange {
|
||||
+ marvell,pins = "mpp29";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+
|
||||
+ pmx_btn_reset: pmx-btn-reset {
|
||||
+ marvell,pins = "mpp36";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+
|
||||
+ pmx_btn_copy: pmx-btn-copy {
|
||||
+ marvell,pins = "mpp37";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+
|
||||
+ pmx_led_copy_green: pmx-led-copy-green {
|
||||
+ marvell,pins = "mpp39";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+
|
||||
+ pmx_led_copy_red: pmx-led-copy-red {
|
||||
+ marvell,pins = "mpp40";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+
|
||||
+ pmx_led_sata1_green: pmx-led-sata1-green {
|
||||
+ marvell,pins = "mpp41";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+
|
||||
+ pmx_led_sata1_red: pmx-led-sata1-red {
|
||||
+ marvell,pins = "mpp42";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+
|
||||
+ pmx_beeper: pmx-beeper {
|
||||
+ marvell,pins = "mpp44";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+
|
||||
+ pmx_btn_power: pmx-btn-power {
|
||||
+ marvell,pins = "mpp46";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+
|
||||
+ pmx_pwr_sata1: pmx-pwr-sata1 {
|
||||
+ marvell,pins = "mpp47";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+
|
||||
+ pmx_pwr_off: pmx-pwr-off {
|
||||
+ marvell,pins = "mpp48";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ /* This board uses the pcf8563 RTC instead of the SoC RTC */
|
||||
+ rtc@10300 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ i2c@11000 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ pcf8563: pcf8563@51 {
|
||||
+ compatible = "nxp,pcf8563";
|
||||
+ reg = <0x51>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ serial@12000 {
|
||||
+ status = "ok";
|
||||
+ };
|
||||
+
|
||||
+ sata@80000 {
|
||||
+ status = "okay";
|
||||
+ nr-ports = <2>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio_keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ pinctrl-0 = <&pmx_btn_power &pmx_btn_copy &pmx_btn_reset>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ button@1 {
|
||||
+ label = "Power Button";
|
||||
+ linux,code = <KEY_POWER>;
|
||||
+ gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ button@2 {
|
||||
+ label = "Copy Button";
|
||||
+ linux,code = <KEY_COPY>;
|
||||
+ gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ button@3 {
|
||||
+ label = "Reset Button";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio-leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+ pinctrl-0 = <&pmx_led_sata1_green &pmx_led_sata1_red
|
||||
+ &pmx_led_sata2_green &pmx_led_sata2_red
|
||||
+ &pmx_led_sys_green &pmx_led_sys_orange
|
||||
+ &pmx_led_copy_green &pmx_led_copy_red
|
||||
+ &pmx_led_usb_green>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ green-sata2 {
|
||||
+ label = "nsa325:green:sata2";
|
||||
+ gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ red-sata2 {
|
||||
+ label = "nsa325:red:sata2";
|
||||
+ gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ green-usb {
|
||||
+ label = "nsa325:green:usb";
|
||||
+ gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ green-sys {
|
||||
+ label = "nsa325:green:sys";
|
||||
+ gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
|
||||
+ linux,default-trigger = "default-on";
|
||||
+ };
|
||||
+
|
||||
+ orange-sys {
|
||||
+ label = "nsa325:orange:sys";
|
||||
+ gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
|
||||
+ linux,default-trigger = "cpu0";
|
||||
+ };
|
||||
+
|
||||
+ green-copy {
|
||||
+ label = "nsa325:green:copy";
|
||||
+ gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ red-copy {
|
||||
+ label = "nsa325:red:copy";
|
||||
+ gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ green-sata1 {
|
||||
+ label = "nsa325:green:sata1";
|
||||
+ gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
|
||||
+ linux,default-trigger = "sata-disk";
|
||||
+ };
|
||||
+
|
||||
+ red-sata1 {
|
||||
+ label = "nsa325:red:sata1";
|
||||
+ gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio_poweroff {
|
||||
+ compatible = "gpio-poweroff";
|
||||
+ pinctrl-0 = <&pmx_pwr_off>;
|
||||
+ pinctrl-names = "default";
|
||||
+ gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ regulators {
|
||||
+ compatible = "simple-bus";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ pinctrl-0 = <&pmx_mcu_data &pmx_usb_power_off &pmx_pwr_sata1>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+/*
|
||||
+ watchdog_data: regulator@1 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "Watchdog Data";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+*/
|
||||
+
|
||||
+ usb_power: regulator@2 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ reg = <2>;
|
||||
+ 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@3 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ reg = <3>;
|
||||
+ regulator-name = "SATA1 Power";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio1 15 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&nand {
|
||||
+ status = "okay";
|
||||
+ chip-delay = <35>;
|
||||
+
|
||||
+ partition@0 {
|
||||
+ label = "uboot";
|
||||
+ reg = <0x0000000 0x0100000>;
|
||||
+ };
|
||||
+
|
||||
+ 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 {
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+ð0 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ ethernet0-port@0 {
|
||||
+ phy-handle = <ðphy0>;
|
||||
+ };
|
||||
+};
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/kirkwood-pogoplugv4.dts
|
||||
@@ -0,0 +1,162 @@
|
||||
@@ -0,0 +1,161 @@
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "kirkwood.dtsi"
|
||||
|
@ -90,11 +90,10 @@
|
|||
+ };
|
||||
+
|
||||
+ mvsdio@90000 {
|
||||
+ pinctrl-0 = <&pmx_sdio &pmx_sdio_cd &pmx_sdio_wp>;
|
||||
+ pinctrl-0 = <&pmx_sdio>;
|
||||
+ pinctrl-names = "default";
|
||||
+ status = "okay";
|
||||
+ cd-gpios = <&gpio0 27 1>;
|
||||
+ wp-gpios = <&gpio0 28 1>;
|
||||
+ cd-gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
|
@ -104,12 +103,12 @@
|
|||
+ pinctrl-names = "default";
|
||||
+ health {
|
||||
+ label = "status:green:health";
|
||||
+ gpios = <&gpio0 22 1>;
|
||||
+ gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "default-on";
|
||||
+ };
|
||||
+ fault {
|
||||
+ label = "status:red:fault";
|
||||
+ gpios = <&gpio0 24 1>;
|
||||
+ gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "none";
|
||||
+ };
|
||||
+ };
|
Loading…
Reference in a new issue