* [PATCH] regulator: core: Allow regulator_set_voltage for fixed regulators
From: Bjorn Andersson @ 2014-02-05 20:30 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1391493268-3242-1-git-send-email-bjorn.andersson@sonymobile.com>
Make it okay to call regulator_set_voltage on regulators with fixed
voltage if the requested range overlaps the current/configured voltage.
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
---
drivers/regulator/core.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index b38a6b6..0cd1a3b 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2395,6 +2395,7 @@ int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV)
struct regulator_dev *rdev = regulator->rdev;
int ret = 0;
int old_min_uV, old_max_uV;
+ int current_uV;
mutex_lock(&rdev->mutex);
@@ -2405,6 +2406,19 @@ int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV)
if (regulator->min_uV == min_uV && regulator->max_uV == max_uV)
goto out;
+ /* If we're trying to set a range that overlaps the current voltage,
+ * return succesfully even though the regulator does not support
+ * changing the voltage.
+ */
+ if (!(rdev->constraints->valid_ops_mask & REGULATOR_CHANGE_VOLTAGE)) {
+ current_uV = _regulator_get_voltage(rdev);
+ if (min_uV <= current_uV && current_uV <= max_uV) {
+ regulator->min_uV = min_uV;
+ regulator->max_uV = max_uV;
+ goto out;
+ }
+ }
+
/* sanity check */
if (!rdev->desc->ops->set_voltage &&
!rdev->desc->ops->set_voltage_sel) {
--
1.7.9.5
^ permalink raw reply related
* [PATCH 2/2] clocksource: Make clocksource register functions void
From: Thomas Gleixner @ 2014-02-05 20:39 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <52E0D575.5050702@linaro.org>
On Thu, 23 Jan 2014, Daniel Lezcano wrote:
> On 01/23/2014 08:12 AM, Yijing Wang wrote:
> > Currently, clocksource_register() and __clocksource_register_scale()
> > functions always return 0, it's pointless, make functions void.
> > And remove the dead code that check the clocksource_register_hz()
> > return value.
> >
> > Signed-off-by: Yijing Wang <wangyijing@huawei.com>
>
> Well, do we really want to change all these files to not take care of a return
> value ? What about is we have to check it again later ?
>
> I would recommend to investigate __clocksource_register_scale and the
> underneath functions if there is not an error to be returned in the call stack
> somewhere which is ignored today.
>
> The same applies for clocksource_register.
There is really no point in making it fail. It's so low level that
anything more than a proper printk/BUG/WARN is overkill.
Thanks,
tglx
^ permalink raw reply
* [PATCH 2/2] clocksource: Make clocksource register functions void
From: Thomas Gleixner @ 2014-02-05 20:40 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D46489C@AcuExch.aculab.com>
Yijing,
On Thu, 23 Jan 2014, David Laight wrote:
> From: Linuxppc-dev Tony Prisk
> > On 23/01/14 20:12, Yijing Wang wrote:
> > > Currently, clocksource_register() and __clocksource_register_scale()
> > > functions always return 0, it's pointless, make functions void.
> > > And remove the dead code that check the clocksource_register_hz()
> > > return value.
> > ......
> > > -static inline int clocksource_register_hz(struct clocksource *cs, u32 hz)
> > > +static inline void clocksource_register_hz(struct clocksource *cs, u32 hz)
> > > {
> > > return __clocksource_register_scale(cs, 1, hz);
> > > }
> >
> > This doesn't make sense - you are still returning a value on a function
> > declared void, and the return is now from a function that doesn't return
> > anything either ?!?!
> > Doesn't this throw a compile-time warning??
>
> It depends on the compiler.
> Recent gcc allow it.
> I don't know if it is actually valid C though.
>
> There is no excuse for it on lines like the above though.
Can you please resend with that fixed against 3.14-rc1 ?
Thanks,
tglx
^ permalink raw reply
* [PATCH 2/3] PCI: ARM: add support for virtual PCI host controller
From: Jason Gunthorpe @ 2014-02-05 20:53 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <3724624.kd9jZNUiTF@wuerfel>
On Wed, Feb 05, 2014 at 09:26:17PM +0100, Arnd Bergmann wrote:
> > > What you get out of "of_pci_range_to_resource(&range, np, &pci->io)"
> > > is not the resource you want to pass into pci_add_resource()
> > > later.
Right, of_pci_range_to_resource returns the CPU MMIO address. A big
problem here is that struct resource is being re-used for bus
physical, CPU MMIO, and Linux Driver addressing domains without any
helpful tagging.
typedef struct resource resource_bus;
typedef struct resource resource_cpu;
?
> > Do I need to open-code the resource translation from phys -> logical?
>
> I think we should have some common infrastructure that lets you
> get this right more easily.
The offset stuff seems to be very confusing to people, removing it
from the APIs and forcing drivers to talk about bus addresess, CPU
addresses and internal Linux addresses seems a bit more plain?
What do you think about something like this:
int of_pci_alloc_io(.. resources,
struct of_pci_range *range,
struct device_node *np)
{
struct resource bus_address, mmio_window, res;
bus_address.start = range->pci_addr;
bus_address.end = range->pci_addr + range->size - 1;
mmio_window.start = range->cpu_addr;
mmio_window.end = range->cpu_addr + range->size - 1;
/* Input bus_address - addresses seen on the bus
mmio_window - physical CPU address to create the bus
addreses
Output res - Address suitable for use in drivers
This does the pci_ioremap_io too */
pci_alloc_virtual_io_window(&bus_address, &mmio_window, &res);
/* bus_address - addresses seen on the bus
res - matching driver view for the bus addresses */
pci_add_resource_bus(&resources, &bus_address, &res);
}
And a similar function for MMIO that just omits
pci_alloc_virtual_io_window.
Jason
^ permalink raw reply
* [PATCH 0/4] DT support for kirkwood based Synology NAS boxes
From: Andrew Lunn @ 2014-02-05 21:05 UTC (permalink / raw)
To: linux-arm-kernel
This patchset adds support for a number of kirkwood bases Synology NAS
boxes. Patch #1 generalized the qnap power off driver so that i can
also be used for Synology devices. Patch #2 and #3 document vendor
prefixes and i2c trivial devices. Patch #4 adds the synology DT files.
Andrew Lunn (4):
Power: Reset: Generalize qnap-poweroff to with on Synology devices.
DT: Vendor prefixes: Add ricoh, ssi and synology
DT: i2c: Trivial: Add sii,s35390a
ARM: Kirkwood: Add support for many Synology NAS devices
.../devicetree/bindings/i2c/trivial-devices.txt | 1 +
.../bindings/power_supply/qnap-poweroff.txt | 5 +-
.../devicetree/bindings/vendor-prefixes.txt | 3 +
arch/arm/boot/dts/Makefile | 15 +++
arch/arm/boot/dts/kirkwood-ds109.dts | 33 ++++++
arch/arm/boot/dts/kirkwood-ds110jv10.dts | 33 ++++++
arch/arm/boot/dts/kirkwood-ds111.dts | 33 ++++++
arch/arm/boot/dts/kirkwood-ds112.dts | 34 ++++++
arch/arm/boot/dts/kirkwood-ds209.dts | 33 ++++++
arch/arm/boot/dts/kirkwood-ds210.dts | 35 ++++++
arch/arm/boot/dts/kirkwood-ds212.dts | 37 +++++++
arch/arm/boot/dts/kirkwood-ds212j.dts | 34 ++++++
arch/arm/boot/dts/kirkwood-ds409.dts | 34 ++++++
arch/arm/boot/dts/kirkwood-ds409slim.dts | 32 ++++++
arch/arm/boot/dts/kirkwood-ds411.dts | 35 ++++++
arch/arm/boot/dts/kirkwood-ds411j.dts | 34 ++++++
arch/arm/boot/dts/kirkwood-ds411slim.dts | 34 ++++++
arch/arm/boot/dts/kirkwood-rs212.dts | 34 ++++++
arch/arm/boot/dts/kirkwood-rs409.dts | 33 ++++++
arch/arm/boot/dts/kirkwood-rs411.dts | 34 ++++++
arch/arm/boot/dts/synology/alarm-led-12.dtsi | 28 +++++
arch/arm/boot/dts/synology/common.dtsi | 112 ++++++++++++++++++++
arch/arm/boot/dts/synology/ethernet-1.dtsi | 15 +++
arch/arm/boot/dts/synology/fan-alarm-18.dtsi | 22 ++++
arch/arm/boot/dts/synology/fan-alarm-35-1.dtsi | 22 ++++
arch/arm/boot/dts/synology/fan-alarm-35-3.dtsi | 32 ++++++
arch/arm/boot/dts/synology/fan-gpios-15.dtsi | 34 ++++++
arch/arm/boot/dts/synology/fan-gpios-32.dtsi | 34 ++++++
arch/arm/boot/dts/synology/fan-speed-100.dtsi | 20 ++++
arch/arm/boot/dts/synology/fan-speed-120.dtsi | 20 ++++
arch/arm/boot/dts/synology/fan-speed-150.dtsi | 20 ++++
arch/arm/boot/dts/synology/hdd-leds-20.dtsi | 90 ++++++++++++++++
arch/arm/boot/dts/synology/hdd-leds-21-1.dtsi | 36 +++++++
arch/arm/boot/dts/synology/hdd-leds-21-2.dtsi | 52 +++++++++
arch/arm/boot/dts/synology/hdd-leds-36.dtsi | 103 ++++++++++++++++++
arch/arm/boot/dts/synology/hdd-leds-38.dtsi | 52 +++++++++
arch/arm/boot/dts/synology/hdd-power-29.dtsi | 56 ++++++++++
arch/arm/boot/dts/synology/hdd-power-30-1.dtsi | 40 +++++++
arch/arm/boot/dts/synology/hdd-power-30-2.dtsi | 56 ++++++++++
arch/arm/boot/dts/synology/hdd-power-30-4.dtsi | 89 ++++++++++++++++
arch/arm/boot/dts/synology/hdd-power-31.dtsi | 40 +++++++
arch/arm/boot/dts/synology/hdd-power-34.dtsi | 73 +++++++++++++
arch/arm/boot/dts/synology/i2c-rtc-ricoh.dtsi | 18 ++++
arch/arm/boot/dts/synology/i2c-rtc-seiko.dtsi | 18 ++++
arch/arm/boot/dts/synology/pcie-2.dtsi | 19 ++++
drivers/power/reset/qnap-poweroff.c | 46 ++++++--
46 files changed, 1702 insertions(+), 11 deletions(-)
create mode 100644 arch/arm/boot/dts/kirkwood-ds109.dts
create mode 100644 arch/arm/boot/dts/kirkwood-ds110jv10.dts
create mode 100644 arch/arm/boot/dts/kirkwood-ds111.dts
create mode 100644 arch/arm/boot/dts/kirkwood-ds112.dts
create mode 100644 arch/arm/boot/dts/kirkwood-ds209.dts
create mode 100644 arch/arm/boot/dts/kirkwood-ds210.dts
create mode 100644 arch/arm/boot/dts/kirkwood-ds212.dts
create mode 100644 arch/arm/boot/dts/kirkwood-ds212j.dts
create mode 100644 arch/arm/boot/dts/kirkwood-ds409.dts
create mode 100644 arch/arm/boot/dts/kirkwood-ds409slim.dts
create mode 100644 arch/arm/boot/dts/kirkwood-ds411.dts
create mode 100644 arch/arm/boot/dts/kirkwood-ds411j.dts
create mode 100644 arch/arm/boot/dts/kirkwood-ds411slim.dts
create mode 100644 arch/arm/boot/dts/kirkwood-rs212.dts
create mode 100644 arch/arm/boot/dts/kirkwood-rs409.dts
create mode 100644 arch/arm/boot/dts/kirkwood-rs411.dts
create mode 100644 arch/arm/boot/dts/synology/alarm-led-12.dtsi
create mode 100644 arch/arm/boot/dts/synology/common.dtsi
create mode 100644 arch/arm/boot/dts/synology/ethernet-1.dtsi
create mode 100644 arch/arm/boot/dts/synology/fan-alarm-18.dtsi
create mode 100644 arch/arm/boot/dts/synology/fan-alarm-35-1.dtsi
create mode 100644 arch/arm/boot/dts/synology/fan-alarm-35-3.dtsi
create mode 100644 arch/arm/boot/dts/synology/fan-gpios-15.dtsi
create mode 100644 arch/arm/boot/dts/synology/fan-gpios-32.dtsi
create mode 100644 arch/arm/boot/dts/synology/fan-speed-100.dtsi
create mode 100644 arch/arm/boot/dts/synology/fan-speed-120.dtsi
create mode 100644 arch/arm/boot/dts/synology/fan-speed-150.dtsi
create mode 100644 arch/arm/boot/dts/synology/hdd-leds-20.dtsi
create mode 100644 arch/arm/boot/dts/synology/hdd-leds-21-1.dtsi
create mode 100644 arch/arm/boot/dts/synology/hdd-leds-21-2.dtsi
create mode 100644 arch/arm/boot/dts/synology/hdd-leds-36.dtsi
create mode 100644 arch/arm/boot/dts/synology/hdd-leds-38.dtsi
create mode 100644 arch/arm/boot/dts/synology/hdd-power-29.dtsi
create mode 100644 arch/arm/boot/dts/synology/hdd-power-30-1.dtsi
create mode 100644 arch/arm/boot/dts/synology/hdd-power-30-2.dtsi
create mode 100644 arch/arm/boot/dts/synology/hdd-power-30-4.dtsi
create mode 100644 arch/arm/boot/dts/synology/hdd-power-31.dtsi
create mode 100644 arch/arm/boot/dts/synology/hdd-power-34.dtsi
create mode 100644 arch/arm/boot/dts/synology/i2c-rtc-ricoh.dtsi
create mode 100644 arch/arm/boot/dts/synology/i2c-rtc-seiko.dtsi
create mode 100644 arch/arm/boot/dts/synology/pcie-2.dtsi
--
1.7.10.4
^ permalink raw reply
* [PATCH 1/4] Power: Reset: Generalize qnap-poweroff to with on Synology devices.
From: Andrew Lunn @ 2014-02-05 21:05 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1391634309-3123-1-git-send-email-andrew@lunn.ch>
The Synology NAS devices use a very similar mechanism to QNAP NAS
devices to power off. Both send a single charactor command to a PIC,
over the second serial port. However the baud rate and the command
differ. Generalize the driver to support this.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
cc: Anton Vorontsov <anton@enomsg.org>
---
.../bindings/power_supply/qnap-poweroff.txt | 5 ++-
drivers/power/reset/qnap-poweroff.c | 46 +++++++++++++++-----
2 files changed, 40 insertions(+), 11 deletions(-)
diff --git a/Documentation/devicetree/bindings/power_supply/qnap-poweroff.txt b/Documentation/devicetree/bindings/power_supply/qnap-poweroff.txt
index 0347d8350d94..4ac3ee80dead 100644
--- a/Documentation/devicetree/bindings/power_supply/qnap-poweroff.txt
+++ b/Documentation/devicetree/bindings/power_supply/qnap-poweroff.txt
@@ -6,8 +6,11 @@ Orion5x SoCs. Sending the character 'A', at 19200 baud, tells the
microcontroller to turn the power off. This driver adds a handler to
pm_power_off which is called to turn the power off.
+Synology NAS devices use a similar scheme, but a different baud rate,
+9660, and a different character, 1.
+
Required Properties:
-- compatible: Should be "qnap,power-off"
+- compatible: Should be "qnap,power-off" or "synology,power-off"
- reg: Address and length of the register set for UART1
- clocks: tclk clock
diff --git a/drivers/power/reset/qnap-poweroff.c b/drivers/power/reset/qnap-poweroff.c
index 37f56f7ee926..10c91fa2466c 100644
--- a/drivers/power/reset/qnap-poweroff.c
+++ b/drivers/power/reset/qnap-poweroff.c
@@ -1,5 +1,5 @@
/*
- * QNAP Turbo NAS Board power off
+ * QNAP Turbo NAS Board power off. Can also be used on Synology devices.
*
* Copyright (C) 2012 Andrew Lunn <andrew@lunn.ch>
*
@@ -25,17 +25,42 @@
#define UART1_REG(x) (base + ((UART_##x) << 2))
+struct power_off_cfg {
+ u32 baud;
+ char cmd;
+};
+
+static const struct power_off_cfg qnap_power_off_cfg = {
+ .baud = 19200,
+ .cmd = 'A',
+};
+
+static const struct power_off_cfg synology_power_off_cfg = {
+ .baud = 9600,
+ .cmd = '1',
+};
+
+static const struct of_device_id qnap_power_off_of_match_table[] = {
+ { .compatible = "qnap,power-off",
+ .data = (void *) &qnap_power_off_cfg,
+ },
+ { .compatible = "synology,power-off",
+ .data = (void *) &synology_power_off_cfg,
+ },
+ {}
+};
+
static void __iomem *base;
static unsigned long tclk;
+static struct power_off_cfg *cfg;
static void qnap_power_off(void)
{
- /* 19200 baud divisor */
- const unsigned divisor = ((tclk + (8 * 19200)) / (16 * 19200));
+ const unsigned divisor = ((tclk + (8 * cfg->baud)) / (16 * cfg->baud));
pr_err("%s: triggering power-off...\n", __func__);
- /* hijack UART1 and reset into sane state (19200,8n1) */
+ /* hijack UART1 and reset into sane state */
writel(0x83, UART1_REG(LCR));
writel(divisor & 0xff, UART1_REG(DLL));
writel((divisor >> 8) & 0xff, UART1_REG(DLM));
@@ -44,16 +69,21 @@ static void qnap_power_off(void)
writel(0x00, UART1_REG(FCR));
writel(0x00, UART1_REG(MCR));
- /* send the power-off command 'A' to PIC */
- writel('A', UART1_REG(TX));
+ /* send the power-off command to PIC */
+ writel(cfg->cmd, UART1_REG(TX));
}
static int qnap_power_off_probe(struct platform_device *pdev)
{
+ struct device_node *np = pdev->dev.of_node;
struct resource *res;
struct clk *clk;
char symname[KSYM_NAME_LEN];
+ const struct of_device_id *match =
+ of_match_node(qnap_power_off_of_match_table, np);
+ cfg = (struct power_off_cfg *)match->data;
+
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
dev_err(&pdev->dev, "Missing resource");
@@ -94,10 +124,6 @@ static int qnap_power_off_remove(struct platform_device *pdev)
return 0;
}
-static const struct of_device_id qnap_power_off_of_match_table[] = {
- { .compatible = "qnap,power-off", },
- {}
-};
MODULE_DEVICE_TABLE(of, qnap_power_off_of_match_table);
static struct platform_driver qnap_power_off_driver = {
--
1.7.10.4
^ permalink raw reply related
* [PATCH 2/4] DT: Vendor prefixes: Add ricoh, ssi and synology
From: Andrew Lunn @ 2014-02-05 21:05 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1391634309-3123-1-git-send-email-andrew@lunn.ch>
The following patches make use of vendor names ricoh, ssi and
synology. Add them to the vendor prefix list.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
Documentation/devicetree/bindings/vendor-prefixes.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 3f900cd51bf0..1629e8f33578 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -69,6 +69,7 @@ ralink Mediatek/Ralink Technology Corp.
ramtron Ramtron International
realtek Realtek Semiconductor Corp.
renesas Renesas Electronics Corporation
+ricoh Richoh Co. Ltd.
rockchip Fuzhou Rockchip Electronics Co., Ltd
samsung Samsung Semiconductor
sbs Smart Battery System
@@ -76,11 +77,13 @@ schindler Schindler
sil Silicon Image
silabs Silicon Laboratories
simtek
+sii Seiko Instruments, Inc.
sirf SiRF Technology, Inc.
snps Synopsys, Inc.
st STMicroelectronics
ste ST-Ericsson
stericsson ST-Ericsson
+synology Synology, Inc.
ti Texas Instruments
tlm Trusted Logic Mobility
toshiba Toshiba Corporation
--
1.7.10.4
^ permalink raw reply related
* [PATCH 3/4] DT: i2c: Trivial: Add sii,s35390a
From: Andrew Lunn @ 2014-02-05 21:05 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1391634309-3123-1-git-send-email-andrew@lunn.ch>
Add the Seiko Instruments Inc S35390a to the list of trivial i2c
devices.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
Documentation/devicetree/bindings/i2c/trivial-devices.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/i2c/trivial-devices.txt b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
index 1a1ac2e560e9..e11ed0fe770c 100644
--- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt
+++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
@@ -58,6 +58,7 @@ plx,pex8648 48-Lane, 12-Port PCI Express Gen 2 (5.0 GT/s) Switch
ramtron,24c64 i2c serial eeprom (24cxx)
ricoh,rs5c372a I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
samsung,24ad0xd1 S524AD0XF1 (128K/256K-bit Serial EEPROM for Low Power)
+sii,s35390a 2-wire CMOS real-time clock
st-micro,24c256 i2c serial eeprom (24cxx)
stm,m41t00 Serial Access TIMEKEEPER
stm,m41t62 Serial real-time clock (RTC) with alarm
--
1.7.10.4
^ permalink raw reply related
* [PATCH 4/4] ARM: Kirkwood: Add support for many Synology NAS devices
From: Andrew Lunn @ 2014-02-05 21:05 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1391634309-3123-1-git-send-email-andrew@lunn.ch>
Add device tree fragments and files to support many of the kirkwood
based Synology NAS devices. This is a translation of the board setup
file maintained by Ben Peddell <klightspeed@killerwolves.net>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested by Ben Peddell <klightspeed@killerwolves.net>
cc: Ben Peddell <klightspeed@killerwolves.net>
---
v2:
Fix gpio's which should be gpo.
Rebase onto v3-14-rc1
Update RTC nodes with vendor name.
Update SPI flash node with vendor name.
---
arch/arm/boot/dts/Makefile | 15 ++++
arch/arm/boot/dts/kirkwood-ds109.dts | 33 +++++++
arch/arm/boot/dts/kirkwood-ds110jv10.dts | 33 +++++++
arch/arm/boot/dts/kirkwood-ds111.dts | 33 +++++++
arch/arm/boot/dts/kirkwood-ds112.dts | 34 +++++++
arch/arm/boot/dts/kirkwood-ds209.dts | 33 +++++++
arch/arm/boot/dts/kirkwood-ds210.dts | 35 ++++++++
arch/arm/boot/dts/kirkwood-ds212.dts | 37 ++++++++
arch/arm/boot/dts/kirkwood-ds212j.dts | 34 +++++++
arch/arm/boot/dts/kirkwood-ds409.dts | 34 +++++++
arch/arm/boot/dts/kirkwood-ds409slim.dts | 32 +++++++
arch/arm/boot/dts/kirkwood-ds411.dts | 35 ++++++++
arch/arm/boot/dts/kirkwood-ds411j.dts | 34 +++++++
arch/arm/boot/dts/kirkwood-ds411slim.dts | 34 +++++++
arch/arm/boot/dts/kirkwood-rs212.dts | 34 +++++++
arch/arm/boot/dts/kirkwood-rs409.dts | 33 +++++++
arch/arm/boot/dts/kirkwood-rs411.dts | 34 +++++++
arch/arm/boot/dts/synology/alarm-led-12.dtsi | 28 ++++++
arch/arm/boot/dts/synology/common.dtsi | 112 ++++++++++++++++++++++++
arch/arm/boot/dts/synology/ethernet-1.dtsi | 15 ++++
arch/arm/boot/dts/synology/fan-alarm-18.dtsi | 22 +++++
arch/arm/boot/dts/synology/fan-alarm-35-1.dtsi | 22 +++++
arch/arm/boot/dts/synology/fan-alarm-35-3.dtsi | 32 +++++++
arch/arm/boot/dts/synology/fan-gpios-15.dtsi | 34 +++++++
arch/arm/boot/dts/synology/fan-gpios-32.dtsi | 34 +++++++
arch/arm/boot/dts/synology/fan-speed-100.dtsi | 20 +++++
arch/arm/boot/dts/synology/fan-speed-120.dtsi | 20 +++++
arch/arm/boot/dts/synology/fan-speed-150.dtsi | 20 +++++
arch/arm/boot/dts/synology/hdd-leds-20.dtsi | 90 +++++++++++++++++++
arch/arm/boot/dts/synology/hdd-leds-21-1.dtsi | 36 ++++++++
arch/arm/boot/dts/synology/hdd-leds-21-2.dtsi | 52 +++++++++++
arch/arm/boot/dts/synology/hdd-leds-36.dtsi | 103 ++++++++++++++++++++++
arch/arm/boot/dts/synology/hdd-leds-38.dtsi | 52 +++++++++++
arch/arm/boot/dts/synology/hdd-power-29.dtsi | 56 ++++++++++++
arch/arm/boot/dts/synology/hdd-power-30-1.dtsi | 40 +++++++++
arch/arm/boot/dts/synology/hdd-power-30-2.dtsi | 56 ++++++++++++
arch/arm/boot/dts/synology/hdd-power-30-4.dtsi | 89 +++++++++++++++++++
arch/arm/boot/dts/synology/hdd-power-31.dtsi | 40 +++++++++
arch/arm/boot/dts/synology/hdd-power-34.dtsi | 73 +++++++++++++++
arch/arm/boot/dts/synology/i2c-rtc-ricoh.dtsi | 18 ++++
arch/arm/boot/dts/synology/i2c-rtc-seiko.dtsi | 18 ++++
arch/arm/boot/dts/synology/pcie-2.dtsi | 19 ++++
42 files changed, 1658 insertions(+)
create mode 100644 arch/arm/boot/dts/kirkwood-ds109.dts
create mode 100644 arch/arm/boot/dts/kirkwood-ds110jv10.dts
create mode 100644 arch/arm/boot/dts/kirkwood-ds111.dts
create mode 100644 arch/arm/boot/dts/kirkwood-ds112.dts
create mode 100644 arch/arm/boot/dts/kirkwood-ds209.dts
create mode 100644 arch/arm/boot/dts/kirkwood-ds210.dts
create mode 100644 arch/arm/boot/dts/kirkwood-ds212.dts
create mode 100644 arch/arm/boot/dts/kirkwood-ds212j.dts
create mode 100644 arch/arm/boot/dts/kirkwood-ds409.dts
create mode 100644 arch/arm/boot/dts/kirkwood-ds409slim.dts
create mode 100644 arch/arm/boot/dts/kirkwood-ds411.dts
create mode 100644 arch/arm/boot/dts/kirkwood-ds411j.dts
create mode 100644 arch/arm/boot/dts/kirkwood-ds411slim.dts
create mode 100644 arch/arm/boot/dts/kirkwood-rs212.dts
create mode 100644 arch/arm/boot/dts/kirkwood-rs409.dts
create mode 100644 arch/arm/boot/dts/kirkwood-rs411.dts
create mode 100644 arch/arm/boot/dts/synology/alarm-led-12.dtsi
create mode 100644 arch/arm/boot/dts/synology/common.dtsi
create mode 100644 arch/arm/boot/dts/synology/ethernet-1.dtsi
create mode 100644 arch/arm/boot/dts/synology/fan-alarm-18.dtsi
create mode 100644 arch/arm/boot/dts/synology/fan-alarm-35-1.dtsi
create mode 100644 arch/arm/boot/dts/synology/fan-alarm-35-3.dtsi
create mode 100644 arch/arm/boot/dts/synology/fan-gpios-15.dtsi
create mode 100644 arch/arm/boot/dts/synology/fan-gpios-32.dtsi
create mode 100644 arch/arm/boot/dts/synology/fan-speed-100.dtsi
create mode 100644 arch/arm/boot/dts/synology/fan-speed-120.dtsi
create mode 100644 arch/arm/boot/dts/synology/fan-speed-150.dtsi
create mode 100644 arch/arm/boot/dts/synology/hdd-leds-20.dtsi
create mode 100644 arch/arm/boot/dts/synology/hdd-leds-21-1.dtsi
create mode 100644 arch/arm/boot/dts/synology/hdd-leds-21-2.dtsi
create mode 100644 arch/arm/boot/dts/synology/hdd-leds-36.dtsi
create mode 100644 arch/arm/boot/dts/synology/hdd-leds-38.dtsi
create mode 100644 arch/arm/boot/dts/synology/hdd-power-29.dtsi
create mode 100644 arch/arm/boot/dts/synology/hdd-power-30-1.dtsi
create mode 100644 arch/arm/boot/dts/synology/hdd-power-30-2.dtsi
create mode 100644 arch/arm/boot/dts/synology/hdd-power-30-4.dtsi
create mode 100644 arch/arm/boot/dts/synology/hdd-power-31.dtsi
create mode 100644 arch/arm/boot/dts/synology/hdd-power-34.dtsi
create mode 100644 arch/arm/boot/dts/synology/i2c-rtc-ricoh.dtsi
create mode 100644 arch/arm/boot/dts/synology/i2c-rtc-seiko.dtsi
create mode 100644 arch/arm/boot/dts/synology/pcie-2.dtsi
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index b9d6a8b485e0..6cf3a54ef7f1 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -89,6 +89,18 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \
kirkwood-dns325.dtb \
kirkwood-dockstar.dtb \
kirkwood-dreamplug.dtb \
+ kirkwood-ds109.dtb \
+ kirkwood-ds110jv10.dtb \
+ kirkwood-ds111.dtb \
+ kirkwood-ds209.dtb \
+ kirkwood-ds210.dtb \
+ kirkwood-ds212.dtb \
+ kirkwood-ds212j.dtb \
+ kirkwood-ds409.dtb \
+ kirkwood-ds409slim.dtb \
+ kirkwood-ds411.dtb \
+ kirkwood-ds411j.dtb \
+ kirkwood-ds411slim.dtb \
kirkwood-goflexnet.dtb \
kirkwood-guruplug-server-plus.dtb \
kirkwood-ib62x0.dtb \
@@ -111,6 +123,9 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \
kirkwood-nsa310a.dtb \
kirkwood-openblocks_a6.dtb \
kirkwood-openblocks_a7.dtb \
+ kirkwood-rs212.dtb \
+ kirkwood-rs409.dtb \
+ kirkwood-rs411.dtb \
kirkwood-sheevaplug.dtb \
kirkwood-sheevaplug-esata.dtb \
kirkwood-topkick.dtb \
diff --git a/arch/arm/boot/dts/kirkwood-ds109.dts b/arch/arm/boot/dts/kirkwood-ds109.dts
new file mode 100644
index 000000000000..bea085ad540a
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-ds109.dts
@@ -0,0 +1,33 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "kirkwood.dtsi"
+#include "kirkwood-6281.dtsi"
+#include "synology/common.dtsi"
+#include "synology/i2c-rtc-ricoh.dtsi"
+#include "synology/fan-speed-150.dtsi"
+#include "synology/fan-gpios-32.dtsi"
+#include "synology/fan-alarm-35-1.dtsi"
+#include "synology/hdd-leds-21-1.dtsi"
+
+/ {
+ model = "Synology DS109, DS110, DS110jv20";
+ compatible = "synology,ds109", "synology,ds110jv20",
+ "synology,ds110", "marvell,kirkwood";
+
+ memory {
+ device_type = "memory";
+ reg = <0x00000000 0x8000000>;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8";
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/kirkwood-ds110jv10.dts b/arch/arm/boot/dts/kirkwood-ds110jv10.dts
new file mode 100644
index 000000000000..d6b746952947
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-ds110jv10.dts
@@ -0,0 +1,33 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "kirkwood.dtsi"
+#include "kirkwood-6281.dtsi"
+#include "synology/common.dtsi"
+#include "synology/i2c-rtc-seiko.dtsi"
+#include "synology/fan-speed-150.dtsi"
+#include "synology/fan-gpios-32.dtsi"
+#include "synology/fan-alarm-35-1.dtsi"
+#include "synology/hdd-leds-21-1.dtsi"
+
+/ {
+ model = "Synology DS110j v10 and v30";
+ compatible = "synology,ds110jv10", "synology,ds110jv30",
+ "marvell,kirkwood";
+
+ memory {
+ device_type = "memory";
+ reg = <0x00000000 0x8000000>;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8";
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/kirkwood-ds111.dts b/arch/arm/boot/dts/kirkwood-ds111.dts
new file mode 100644
index 000000000000..5f51e088903f
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-ds111.dts
@@ -0,0 +1,33 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "kirkwood.dtsi"
+#include "kirkwood-6282.dtsi"
+#include "synology/pcie-2.dtsi"
+#include "synology/common.dtsi"
+#include "synology/i2c-rtc-seiko.dtsi"
+#include "synology/fan-speed-100.dtsi"
+#include "synology/fan-gpios-15.dtsi"
+#include "synology/fan-alarm-35-1.dtsi"
+#include "synology/hdd-leds-21-1.dtsi"
+
+/ {
+ model = "Synology DS111";
+ compatible = "synology,ds111", "marvell,kirkwood";
+
+ memory {
+ device_type = "memory";
+ reg = <0x00000000 0x8000000>;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8";
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/kirkwood-ds112.dts b/arch/arm/boot/dts/kirkwood-ds112.dts
new file mode 100644
index 000000000000..cda3203a0824
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-ds112.dts
@@ -0,0 +1,34 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "kirkwood.dtsi"
+#include "kirkwood-6282.dtsi"
+#include "synology/pcie-2.dtsi"
+#include "synology/common.dtsi"
+#include "synology/i2c-rtc-seiko.dtsi"
+#include "synology/fan-speed-100.dtsi"
+#include "synology/fan-gpios-15.dtsi"
+#include "synology/fan-alarm-35.dtsi"
+#include "synology/hdd-leds-21-2.dtsi"
+#include "synology/hdd-power-30.dtsi"
+
+/ {
+ model = "Synology DS111";
+ compatible = "synology,ds111", "marvell,kirkwood";
+
+ memory {
+ device_type = "memory";
+ reg = <0x00000000 0x8000000>;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8";
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/kirkwood-ds209.dts b/arch/arm/boot/dts/kirkwood-ds209.dts
new file mode 100644
index 000000000000..b2ebb423e129
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-ds209.dts
@@ -0,0 +1,33 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "kirkwood.dtsi"
+#include "kirkwood-6281.dtsi"
+#include "synology/common.dtsi"
+#include "synology/i2c-rtc-ricoh.dtsi"
+#include "synology/fan-speed-150.dtsi"
+#include "synology/fan-gpios-32.dtsi"
+#include "synology/fan-alarm-35-1.dtsi"
+#include "synology/hdd-leds-21-2.dtsi"
+#include "synology/hdd-power-31.dtsi"
+
+/ {
+ model = "Synology DS209";
+ compatible = "synology,ds209", "marvell,kirkwood";
+
+ memory {
+ device_type = "memory";
+ reg = <0x00000000 0x8000000>;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8";
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/kirkwood-ds210.dts b/arch/arm/boot/dts/kirkwood-ds210.dts
new file mode 100644
index 000000000000..8623dd63f44d
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-ds210.dts
@@ -0,0 +1,35 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "kirkwood.dtsi"
+#include "kirkwood-6281.dtsi"
+#include "synology/common.dtsi"
+#include "synology/i2c-rtc-seiko.dtsi"
+#include "synology/fan-speed-150.dtsi"
+#include "synology/fan-gpios-32.dtsi"
+#include "synology/fan-alarm-35-1.dtsi"
+#include "synology/hdd-leds-21-2.dtsi"
+#include "synology/hdd-power-31.dtsi"
+
+/ {
+ model = "Synology DS210 v10, v20, v30, DS211j";
+ compatible = "synology,ds210jv10", "synology,ds210jv20",
+ "synology,ds210jv30", "synology,ds211j",
+ "marvell,kirkwood";
+
+ memory {
+ device_type = "memory";
+ reg = <0x00000000 0x8000000>;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8";
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/kirkwood-ds212.dts b/arch/arm/boot/dts/kirkwood-ds212.dts
new file mode 100644
index 000000000000..89e091ce2174
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-ds212.dts
@@ -0,0 +1,37 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "kirkwood.dtsi"
+#include "kirkwood-6282.dtsi"
+#include "synology/pcie-2.dtsi"
+#include "synology/common.dtsi"
+#include "synology/i2c-rtc-seiko.dtsi"
+#include "synology/fan-speed-100.dtsi"
+#include "synology/fan-gpios-15.dtsi"
+#include "synology/fan-alarm-35-1.dtsi"
+#include "synology/hdd-leds-21-2.dtsi"
+#include "synology/hdd-power-30-2.dtsi"
+
+/ {
+ model = "Synology DS212, DS212p v10, v20, DS213air v10, DS213 v10";
+ compatible = "synology,ds212", "synology,ds212pv10",
+ "synology,ds212pv10", "synology,ds212pv20",
+ "synology,ds213airv10", "synology,ds213v10",
+ "marvell,kirkwood";
+
+ memory {
+ device_type = "memory";
+ reg = <0x00000000 0x8000000>;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8";
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/kirkwood-ds212j.dts b/arch/arm/boot/dts/kirkwood-ds212j.dts
new file mode 100644
index 000000000000..ed14b7bb695e
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-ds212j.dts
@@ -0,0 +1,34 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "kirkwood.dtsi"
+#include "kirkwood-6281.dtsi"
+#include "synology/common.dtsi"
+#include "synology/i2c-rtc-seiko.dtsi"
+#include "synology/fan-speed-100.dtsi"
+#include "synology/fan-gpios-32.dtsi"
+#include "synology/fan-alarm-35-1.dtsi"
+#include "synology/hdd-leds-21-2.dtsi"
+#include "synology/hdd-power-29.dtsi"
+
+/ {
+ model = "Synology DS212j v10, v20";
+ compatible = "synology,ds212jv10", "synology,ds212jv20",
+ "marvell,kirkwood";
+
+ memory {
+ device_type = "memory";
+ reg = <0x00000000 0x8000000>;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8";
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/kirkwood-ds409.dts b/arch/arm/boot/dts/kirkwood-ds409.dts
new file mode 100644
index 000000000000..7000de1add08
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-ds409.dts
@@ -0,0 +1,34 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "kirkwood.dtsi"
+#include "kirkwood-6281.dtsi"
+#include "synology/common.dtsi"
+#include "synology/i2c-rtc-ricoh.dtsi"
+#include "synology/ethernet-1.dtsi"
+#include "synology/fan-speed-120.dtsi"
+#include "synology/fan-gpios-15.dtsi"
+#include "synology/fan-alarm-18.dtsi"
+#include "synology/hdd-leds-36.dtsi"
+#include "synology/alarm-led-12.dtsi"
+
+/ {
+ model = "Synology DS409, DS410j";
+ compatible = "synology,ds409", "synology,ds410j", "marvell,kirkwood";
+
+ memory {
+ device_type = "memory";
+ reg = <0x00000000 0x8000000>;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8";
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/kirkwood-ds409slim.dts b/arch/arm/boot/dts/kirkwood-ds409slim.dts
new file mode 100644
index 000000000000..0ba525a594f7
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-ds409slim.dts
@@ -0,0 +1,32 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "kirkwood.dtsi"
+#include "kirkwood-6281.dtsi"
+#include "synology/common.dtsi"
+#include "synology/i2c-rtc-ricoh.dtsi"
+#include "synology/fan-speed-120.dtsi"
+#include "synology/fan-gpios-32.dtsi"
+#include "synology/fan-alarm-35-1.dtsi"
+#include "synology/hdd-leds-20.dtsi"
+
+/ {
+ model = "Synology 409slim";
+ compatible = "synology,ds409slim", "marvell,kirkwood";
+
+ memory {
+ device_type = "memory";
+ reg = <0x00000000 0x8000000>;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8";
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/kirkwood-ds411.dts b/arch/arm/boot/dts/kirkwood-ds411.dts
new file mode 100644
index 000000000000..4c1ca8e85559
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-ds411.dts
@@ -0,0 +1,35 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "kirkwood.dtsi"
+#include "kirkwood-6282.dtsi"
+#include "synology/pcie-2.dtsi"
+#include "synology/common.dtsi"
+#include "synology/i2c-rtc-seiko.dtsi"
+#include "synology/ethernet-1.dtsi"
+#include "synology/fan-speed-100.dtsi"
+#include "synology/fan-gpios-15.dtsi"
+#include "synology/fan-alarm-35-1.dtsi"
+#include "synology/hdd-leds-36.dtsi"
+#include "synology/hdd-power-34.dtsi"
+
+/ {
+ model = "Synology DS411, DS413jv10";
+ compatible = "synology,ds411", "synology,ds413jv10", "marvell,kirkwood";
+
+ memory {
+ device_type = "memory";
+ reg = <0x00000000 0x8000000>;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8";
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/kirkwood-ds411j.dts b/arch/arm/boot/dts/kirkwood-ds411j.dts
new file mode 100644
index 000000000000..7f08a46ddabb
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-ds411j.dts
@@ -0,0 +1,34 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "kirkwood.dtsi"
+#include "kirkwood-6281.dtsi"
+#include "synology/common.dtsi"
+#include "synology/i2c-rtc-seiko.dtsi"
+#include "synology/ethernet-1.dtsi"
+#include "synology/fan-speed-120.dtsi"
+#include "synology/fan-gpios-15.dtsi"
+#include "synology/fan-alarm-18.dtsi"
+#include "synology/hdd-leds-36.dtsi"
+#include "synology/alarm-led-12.dtsi"
+
+/ {
+ model = "Synology DS411j";
+ compatible = "synology,ds411j", "marvell,kirkwood";
+
+ memory {
+ device_type = "memory";
+ reg = <0x00000000 0x8000000>;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8";
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/kirkwood-ds411slim.dts b/arch/arm/boot/dts/kirkwood-ds411slim.dts
new file mode 100644
index 000000000000..2e6d66f37002
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-ds411slim.dts
@@ -0,0 +1,34 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "kirkwood.dtsi"
+#include "kirkwood-6282.dtsi"
+#include "synology/pcie-2.dtsi"
+#include "synology/common.dtsi"
+#include "synology/i2c-rtc-seiko.dtsi"
+#include "synology/ethernet-1.dtsi"
+#include "synology/fan-speed-100.dtsi"
+#include "synology/fan-gpios-15.dtsi"
+#include "synology/fan-alarm-35-1.dtsi"
+#include "synology/hdd-leds-36.dtsi"
+
+/ {
+ model = "Synology DS411slim";
+ compatible = "synology,ds411slim", "marvell,kirkwood";
+
+ memory {
+ device_type = "memory";
+ reg = <0x00000000 0x8000000>;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8";
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/kirkwood-rs212.dts b/arch/arm/boot/dts/kirkwood-rs212.dts
new file mode 100644
index 000000000000..edc797464983
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-rs212.dts
@@ -0,0 +1,34 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "kirkwood.dtsi"
+#include "kirkwood-6282.dtsi"
+#include "synology/pcie-2.dtsi"
+#include "synology/common.dtsi"
+#include "synology/i2c-rtc-seiko.dtsi"
+#include "synology/fan-speed-100.dtsi"
+#include "synology/fan-gpios-15.dtsi"
+#include "synology/fan-alarm-35-3.dtsi"
+#include "synology/hdd-leds-38.dtsi"
+#include "synology/hdd-power-30-2.dtsi"
+
+/ {
+ model = "Synology RS212";
+ compatible = "synology,rs212", "marvell,kirkwood";
+
+ memory {
+ device_type = "memory";
+ reg = <0x00000000 0x8000000>;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8";
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/kirkwood-rs409.dts b/arch/arm/boot/dts/kirkwood-rs409.dts
new file mode 100644
index 000000000000..906664a99602
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-rs409.dts
@@ -0,0 +1,33 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "kirkwood.dtsi"
+#include "kirkwood-6281.dtsi"
+#include "synology/common.dtsi"
+#include "synology/i2c-rtc-ricoh.dtsi"
+#include "synology/ethernet-1.dtsi"
+#include "synology/fan-speed-120.dtsi"
+#include "synology/fan-gpios-15.dtsi"
+#include "synology/fan-alarm-18.dtsi"
+#include "synology/hdd-leds-36.dtsi"
+
+/ {
+ model = "Synology RS409";
+ compatible = "synology,rs409", "marvell,kirkwood";
+
+ memory {
+ device_type = "memory";
+ reg = <0x00000000 0x8000000>;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8";
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/kirkwood-rs411.dts b/arch/arm/boot/dts/kirkwood-rs411.dts
new file mode 100644
index 000000000000..75c806ea0dc9
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-rs411.dts
@@ -0,0 +1,34 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+#include "kirkwood.dtsi"
+#include "kirkwood-6282.dtsi"
+#include "synology/pcie-2.dtsi"
+#include "synology/common.dtsi"
+#include "synology/i2c-rtc-seiko.dtsi"
+#include "synology/ethernet-1.dtsi"
+#include "synology/fan-speed-100.dtsi"
+#include "synology/fan-gpios-15.dtsi"
+#include "synology/fan-alarm-35-3.dtsi"
+#include "synology/hdd-leds-36.dtsi"
+
+/ {
+ model = "Synology RS411 RS812";
+ compatible = "synology,rs411", "synology,rs812", "marvell,kirkwood";
+
+ memory {
+ device_type = "memory";
+ reg = <0x00000000 0x8000000>;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8";
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/synology/alarm-led-12.dtsi b/arch/arm/boot/dts/synology/alarm-led-12.dtsi
new file mode 100644
index 000000000000..e6ea8f07d1a5
--- /dev/null
+++ b/arch/arm/boot/dts/synology/alarm-led-12.dtsi
@@ -0,0 +1,28 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/ {
+ ocp at f1000000 {
+ pinctrl: pinctrl at 10000 {
+
+ pmx_led_12: pmx-led-12 {
+ marvell,pins = "mpp12";
+ marvell,function = "gpio";
+ };
+ };
+ };
+ gpio-leds {
+ compatible = "gpio-leds";
+ pinctrl-0 = <&pmx_led_12>;
+ pinctrl-names = "default";
+ hdd1-green {
+ label = "synology:alarm";
+ gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/synology/common.dtsi b/arch/arm/boot/dts/synology/common.dtsi
new file mode 100644
index 000000000000..fb078c4f9a62
--- /dev/null
+++ b/arch/arm/boot/dts/synology/common.dtsi
@@ -0,0 +1,112 @@
+/*
+ * Nodes which are common to all Synology devices
+ *
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ mbus {
+ pcie-controller {
+ status = "okay";
+
+ pcie at 1,0 {
+ status = "okay";
+ };
+ };
+ };
+ ocp at f1000000 {
+ i2c at 11000 {
+ status = "okay";
+ clock-frequency = <400000>;
+ pinctrl-0 = <&pmx_twsi0>;
+ pinctrl-names = "default";
+ };
+ serial at 12000 {
+ status = "okay";
+ pinctrl-0 = <&pmx_uart0>;
+ pinctrl-names = "default";
+ };
+ serial at 12100 {
+ status = "okay";
+ pinctrl-0 = <&pmx_uart1>;
+ pinctrl-names = "default";
+ };
+ poweroff at 12100 {
+ compatible = "synology,power-off";
+ reg = <0x12000 0x100>;
+ clocks = <&gate_clk 7>;
+ };
+ spi at 10600 {
+ status = "okay";
+ pinctrl-0 = <&pmx_spi>;
+ pinctrl-names = "default";
+
+ m25p80 at 0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "st,m25p80";
+ reg = <0>;
+ spi-max-frequency = <20000000>;
+ mode = <0>;
+
+ partition at 00000000 {
+ reg = <0x00000000 0x00080000>;
+ label = "RedBoot";
+ };
+
+ partition at 00080000 {
+ reg = <0x00080000 0x00200000>;
+ label = "zImage";
+ };
+
+ partition at 00280000 {
+ reg = <0x00280000 0x00140000>;
+ label = "rd.gz";
+ };
+ partition at 003c0000 {
+ reg = <0x003c0000 0x00010000>;
+ label = "vendor";
+ };
+ partition at 003d0000 {
+ reg = <0x003d0000 0x00020000>;
+ label = "RedBoot config";
+ };
+ partition at 003f0000 {
+ reg = <0x003f0000 0x00010000>;
+ label = "FIS directory";
+ };
+ };
+ };
+ sata at 80000 {
+ pinctrl-0 = <&pmx_sata0 &pmx_sata1>;
+ pinctrl-names = "default";
+ status = "okay";
+ nr-ports = <2>;
+ };
+ };
+ gpio_fan {
+ compatible = "gpio-fan";
+ };
+};
+
+&mdio {
+ status = "okay";
+
+ ethphy0: ethernet-phy {
+ device_type = "ethernet-phy";
+ reg = <8>;
+ };
+};
+
+ð0 {
+ status = "okay";
+ ethernet0-port at 0 {
+ phy-handle = <ðphy0>;
+ };
+};
diff --git a/arch/arm/boot/dts/synology/ethernet-1.dtsi b/arch/arm/boot/dts/synology/ethernet-1.dtsi
new file mode 100644
index 000000000000..bf00eff53bbc
--- /dev/null
+++ b/arch/arm/boot/dts/synology/ethernet-1.dtsi
@@ -0,0 +1,15 @@
+&mdio {
+ status = "okay";
+
+ ethphy1: ethernet-phy {
+ device_type = "ethernet-phy";
+ reg = <9>;
+ };
+};
+
+ð0 {
+ status = "okay";
+ ethernet1-port at 0 {
+ phy-handle = <ðphy1>;
+ };
+};
diff --git a/arch/arm/boot/dts/synology/fan-alarm-18.dtsi b/arch/arm/boot/dts/synology/fan-alarm-18.dtsi
new file mode 100644
index 000000000000..d323eb0d2109
--- /dev/null
+++ b/arch/arm/boot/dts/synology/fan-alarm-18.dtsi
@@ -0,0 +1,22 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/ {
+ ocp at f1000000 {
+ pinctrl: pinctrl at 10000 {
+
+ pmx_fan_18: pmx-fan-18 {
+ marvell,pins = "mpp18";
+ marvell,function = "gpo";
+ };
+ };
+ };
+ gpio_fan {
+ alarm-gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
+ };
+};
diff --git a/arch/arm/boot/dts/synology/fan-alarm-35-1.dtsi b/arch/arm/boot/dts/synology/fan-alarm-35-1.dtsi
new file mode 100644
index 000000000000..12e52fdae870
--- /dev/null
+++ b/arch/arm/boot/dts/synology/fan-alarm-35-1.dtsi
@@ -0,0 +1,22 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/ {
+ ocp at f1000000 {
+ pinctrl: pinctrl at 10000 {
+
+ pmx_fan_35: pmx-fan-35 {
+ marvell,pins = "mpp35";
+ marvell,function = "gpio";
+ };
+ };
+ };
+ gpio_fan {
+ alarm-gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
+ };
+};
diff --git a/arch/arm/boot/dts/synology/fan-alarm-35-3.dtsi b/arch/arm/boot/dts/synology/fan-alarm-35-3.dtsi
new file mode 100644
index 000000000000..e2a44f402bf0
--- /dev/null
+++ b/arch/arm/boot/dts/synology/fan-alarm-35-3.dtsi
@@ -0,0 +1,32 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/ {
+ ocp at f1000000 {
+ pinctrl: pinctrl at 10000 {
+
+ pmx_fan_35: pmx-fan-35 {
+ marvell,pins = "mpp35";
+ marvell,function = "gpio";
+ };
+ pmx_fan_44: pmx-fan-44 {
+ marvell,pins = "mpp44";
+ marvell,function = "gpio";
+ };
+ pmx_fan_45: pmx-fan-45 {
+ marvell,pins = "mpp45";
+ marvell,function = "gpio";
+ };
+ };
+ };
+ gpio_fan {
+ alarm-gpios = <&gpio1 3 GPIO_ACTIVE_HIGH
+ &gpio1 12 GPIO_ACTIVE_HIGH
+ &gpio1 13 GPIO_ACTIVE_HIGH>;
+ };
+};
diff --git a/arch/arm/boot/dts/synology/fan-gpios-15.dtsi b/arch/arm/boot/dts/synology/fan-gpios-15.dtsi
new file mode 100644
index 000000000000..e27cba942eed
--- /dev/null
+++ b/arch/arm/boot/dts/synology/fan-gpios-15.dtsi
@@ -0,0 +1,34 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/ {
+ ocp at f1000000 {
+ pinctrl: pinctrl at 10000 {
+
+ pmx_fan_15: pmx-fan-15 {
+ marvell,pins = "mpp15";
+ marvell,function = "gpio";
+ };
+ pmx_fan_16: pmx-fan-16 {
+ marvell,pins = "mpp16";
+ marvell,function = "gpio";
+ };
+ pmx_fan_17: pmx-fan-17 {
+ marvell,pins = "mpp17";
+ marvell,function = "gpio";
+ };
+ };
+ };
+ gpio_fan {
+ pinctrl-0 = <&pmx_fan_15 &pmx_fan_16 &pmx_fan_17>;
+ pinctrl-names = "default";
+ gpios = <&gpio0 15 GPIO_ACTIVE_HIGH
+ &gpio0 16 GPIO_ACTIVE_HIGH
+ &gpio0 17 GPIO_ACTIVE_HIGH>;
+ };
+};
diff --git a/arch/arm/boot/dts/synology/fan-gpios-32.dtsi b/arch/arm/boot/dts/synology/fan-gpios-32.dtsi
new file mode 100644
index 000000000000..d4fd393e71a8
--- /dev/null
+++ b/arch/arm/boot/dts/synology/fan-gpios-32.dtsi
@@ -0,0 +1,34 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/ {
+ ocp at f1000000 {
+ pinctrl: pinctrl at 10000 {
+
+ pmx_fan_32: pmx-fan-32 {
+ marvell,pins = "mpp32";
+ marvell,function = "gpio";
+ };
+ pmx_fan_33: pmx-fan-33 {
+ marvell,pins = "mpp33";
+ marvell,function = "gpo";
+ };
+ pmx_fan_34: pmx-fan-34 {
+ marvell,pins = "mpp34";
+ marvell,function = "gpio";
+ };
+ };
+ };
+ gpio_fan {
+ pinctrl-0 = <&pmx_fan_32 &pmx_fan_33 &pmx_fan_34>;
+ pinctrl-names = "default";
+ gpios = <&gpio1 0 GPIO_ACTIVE_HIGH
+ &gpio1 1 GPIO_ACTIVE_HIGH
+ &gpio1 2 GPIO_ACTIVE_HIGH>;
+ };
+};
diff --git a/arch/arm/boot/dts/synology/fan-speed-100.dtsi b/arch/arm/boot/dts/synology/fan-speed-100.dtsi
new file mode 100644
index 000000000000..5188ba59a9b2
--- /dev/null
+++ b/arch/arm/boot/dts/synology/fan-speed-100.dtsi
@@ -0,0 +1,20 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/ {
+ gpio_fan {
+ gpio-fan,speed-map = < 0 0
+ 2500 1
+ 3100 2
+ 3800 3
+ 4600 4
+ 4800 5
+ 4900 6
+ 5000 7 >;
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/synology/fan-speed-120.dtsi b/arch/arm/boot/dts/synology/fan-speed-120.dtsi
new file mode 100644
index 000000000000..90157070492c
--- /dev/null
+++ b/arch/arm/boot/dts/synology/fan-speed-120.dtsi
@@ -0,0 +1,20 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/ {
+ gpio_fan {
+ gpio-fan,speed-map = < 0 0
+ 2500 1
+ 2700 2
+ 3000 4
+ 3600 3
+ 3800 5
+ 3900 6
+ 4300 7 >;
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/synology/fan-speed-150.dtsi b/arch/arm/boot/dts/synology/fan-speed-150.dtsi
new file mode 100644
index 000000000000..6abc36915886
--- /dev/null
+++ b/arch/arm/boot/dts/synology/fan-speed-150.dtsi
@@ -0,0 +1,20 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/ {
+ gpio_fan {
+ gpio-fan,speed-map = < 0 0
+ 2200 1
+ 2500 2
+ 3000 4
+ 3300 3
+ 3700 5
+ 3800 6
+ 4200 7 >;
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/synology/hdd-leds-20.dtsi b/arch/arm/boot/dts/synology/hdd-leds-20.dtsi
new file mode 100644
index 000000000000..e6663ea7014c
--- /dev/null
+++ b/arch/arm/boot/dts/synology/hdd-leds-20.dtsi
@@ -0,0 +1,90 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/ {
+ ocp at f1000000 {
+ pinctrl: pinctrl at 10000 {
+
+ pmx_led_20: pmx-led-20 {
+ marvell,pins = "mpp20";
+ marvell,function = "gpio";
+ };
+ pmx_led_21: pmx-led-21 {
+ marvell,pins = "mpp21";
+ marvell,function = "gpio";
+ };
+ pmx_led_22: pmx-led-22 {
+ marvell,pins = "mpp22";
+ marvell,function = "gpio";
+ };
+ pmx_led_23: pmx-led-23 {
+ marvell,pins = "mpp23";
+ marvell,function = "gpio";
+ };
+ pmx_led_24: pmx-led-24 {
+ marvell,pins = "mpp24";
+ marvell,function = "gpio";
+ };
+ pmx_led_25: pmx-led-25 {
+ marvell,pins = "mpp25";
+ marvell,function = "gpio";
+ };
+ pmx_led_26: pmx-led-26 {
+ marvell,pins = "mpp26";
+ marvell,function = "gpio";
+ };
+ pmx_led_27: pmx-led-27 {
+ marvell,pins = "mpp27";
+ marvell,function = "gpio";
+ };
+ pmx_led_28: pmx-led-28 {
+ marvell,pins = "mpp28";
+ marvell,function = "gpio";
+ };
+ };
+ };
+ gpio-leds {
+ compatible = "gpio-leds";
+ pinctrl-0 = <&pmx_led_20 &pmx_led_21 &pmx_led_22
+ &pmx_led_23 &pmx_led_24 &pmx_led_25
+ &pmx_led_26 &pmx_led_27>;
+ pinctrl-names = "default";
+ hdd1-green {
+ label = "synology:green:hdd1";
+ gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
+ };
+ hdd1-amber {
+ label = "synology:amber:hdd1";
+ gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
+ };
+ hdd2-green {
+ label = "synology:green:hdd2";
+ gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
+ };
+ hdd2-amber {
+ label = "synology:amber:hdd2";
+ gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
+ };
+ hdd3-green {
+ label = "synology:green:hdd3";
+ gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
+ };
+ hdd3-amber {
+ label = "synology:amber:hdd3";
+ gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
+ };
+ hdd4-green {
+ label = "synology:green:hdd4";
+ gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
+ };
+ hdd4-amber {
+ label = "synology:amber:hdd4";
+ gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/synology/hdd-leds-21-1.dtsi b/arch/arm/boot/dts/synology/hdd-leds-21-1.dtsi
new file mode 100644
index 000000000000..034323f9ffb0
--- /dev/null
+++ b/arch/arm/boot/dts/synology/hdd-leds-21-1.dtsi
@@ -0,0 +1,36 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/ {
+ ocp at f1000000 {
+ pinctrl: pinctrl at 10000 {
+
+ pmx_led_21: pmx-led-21 {
+ marvell,pins = "mpp21";
+ marvell,function = "gpio";
+ };
+ pmx_led_23: pmx-led-23 {
+ marvell,pins = "mpp23";
+ marvell,function = "gpio";
+ };
+ };
+ };
+ gpio-leds {
+ compatible = "gpio-leds";
+ pinctrl-0 = <&pmx_led_21 &pmx_led_23>;
+ pinctrl-names = "default";
+ hdd1-green {
+ label = "synology:green:hdd1";
+ gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
+ };
+ hdd1-amber {
+ label = "synology:amber:hdd1";
+ gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/synology/hdd-leds-21-2.dtsi b/arch/arm/boot/dts/synology/hdd-leds-21-2.dtsi
new file mode 100644
index 000000000000..446a28f2200b
--- /dev/null
+++ b/arch/arm/boot/dts/synology/hdd-leds-21-2.dtsi
@@ -0,0 +1,52 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/ {
+ ocp at f1000000 {
+ pinctrl: pinctrl at 10000 {
+
+ pmx_led_20: pmx-led-20 {
+ marvell,pins = "mpp20";
+ marvell,function = "gpio";
+ };
+ pmx_led_21: pmx-led-21 {
+ marvell,pins = "mpp21";
+ marvell,function = "gpio";
+ };
+ pmx_led_22: pmx-led-22 {
+ marvell,pins = "mpp22";
+ marvell,function = "gpio";
+ };
+ pmx_led_23: pmx-led-23 {
+ marvell,pins = "mpp23";
+ marvell,function = "gpio";
+ };
+ };
+ };
+ gpio-leds {
+ compatible = "gpio-leds";
+ pinctrl-0 = <&pmx_led_21 &pmx_led_23 &pmx_led_20 &pmx_led_22>;
+ pinctrl-names = "default";
+ hdd1-green {
+ label = "synology:green:hdd1";
+ gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
+ };
+ hdd1-amber {
+ label = "synology:amber:hdd1";
+ gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
+ };
+ hdd2-green {
+ label = "synology:green:hdd2";
+ gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
+ };
+ hdd2-amber {
+ label = "synology:amber:hdd2";
+ gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/synology/hdd-leds-36.dtsi b/arch/arm/boot/dts/synology/hdd-leds-36.dtsi
new file mode 100644
index 000000000000..9541c0c943e6
--- /dev/null
+++ b/arch/arm/boot/dts/synology/hdd-leds-36.dtsi
@@ -0,0 +1,103 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/ {
+ ocp at f1000000 {
+ pinctrl: pinctrl at 10000 {
+
+ pmx_led_36: pmx-led-36 {
+ marvell,pins = "mpp36";
+ marvell,function = "gpio";
+ };
+ pmx_led_37: pmx-led-37 {
+ marvell,pins = "mpp37";
+ marvell,function = "gpio";
+ };
+ pmx_led_38: pmx-led-38 {
+ marvell,pins = "mpp38";
+ marvell,function = "gpio";
+ };
+ pmx_led_39: pmx-led-39 {
+ marvell,pins = "mpp39";
+ marvell,function = "gpio";
+ };
+ pmx_led_40: pmx-led-40 {
+ marvell,pins = "mpp40";
+ marvell,function = "gpio";
+ };
+ pmx_led_41: pmx-led-41 {
+ marvell,pins = "mpp41";
+ marvell,function = "gpio";
+ };
+ pmx_led_42: pmx-led-42 {
+ marvell,pins = "mpp42";
+ marvell,function = "gpio";
+ };
+ pmx_led_43: pmx-led-43 {
+ marvell,pins = "mpp43";
+ marvell,function = "gpio";
+ };
+ pmx_led_44: pmx-led-44 {
+ marvell,pins = "mpp44";
+ marvell,function = "gpio";
+ };
+ pmx_led_45: pmx-led-45 {
+ marvell,pins = "mpp45";
+ marvell,function = "gpio";
+ };
+ };
+ };
+ gpio-leds {
+ compatible = "gpio-leds";
+ pinctrl-0 = <&pmx_led_36 &pmx_led_37 &pmx_led_38
+ &pmx_led_39 &pmx_led_40 &pmx_led_41
+ &pmx_led_42 &pmx_led_43 &pmx_led_44
+ &pmx_led_45>;
+ pinctrl-names = "default";
+ hdd1-green {
+ label = "synology:green:hdd1";
+ gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
+ };
+ hdd1-amber {
+ label = "synology:amber:hdd1";
+ gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
+ };
+ hdd2-green {
+ label = "synology:green:hdd2";
+ gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
+ };
+ hdd2-amber {
+ label = "synology:amber:hdd2";
+ gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
+ };
+ hdd3-green {
+ label = "synology:green:hdd3";
+ gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
+ };
+ hdd3-amber {
+ label = "synology:amber:hdd3";
+ gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
+ };
+ hdd4-green {
+ label = "synology:green:hdd4";
+ gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
+ };
+ hdd4-amber {
+ label = "synology:amber:hdd4";
+ gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
+ };
+ hdd5-green {
+ label = "synology:green:hdd5";
+ gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
+ };
+ hdd5-amber {
+ label = "synology:amber:hdd5";
+ gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/synology/hdd-leds-38.dtsi b/arch/arm/boot/dts/synology/hdd-leds-38.dtsi
new file mode 100644
index 000000000000..d2fe351a0808
--- /dev/null
+++ b/arch/arm/boot/dts/synology/hdd-leds-38.dtsi
@@ -0,0 +1,52 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/ {
+ ocp at f1000000 {
+ pinctrl: pinctrl at 10000 {
+
+ pmx_led_38: pmx-led-38 {
+ marvell,pins = "mpp38";
+ marvell,function = "gpio";
+ };
+ pmx_led_39: pmx-led-39 {
+ marvell,pins = "mpp39";
+ marvell,function = "gpio";
+ };
+ pmx_led_36: pmx-led-36 {
+ marvell,pins = "mpp36";
+ marvell,function = "gpio";
+ };
+ pmx_led_37: pmx-led-37 {
+ marvell,pins = "mpp37";
+ marvell,function = "gpio";
+ };
+ };
+ };
+ gpio-leds {
+ compatible = "gpio-leds";
+ pinctrl-0 = <&pmx_led_38 &pmx_led_39 &pmx_led_36 &pmx_led_37>;
+ pinctrl-names = "default";
+ hdd1-green {
+ label = "synology:green:hdd1";
+ gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
+ };
+ hdd1-amber {
+ label = "synology:amber:hdd1";
+ gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
+ };
+ hdd2-green {
+ label = "synology:green:hdd2";
+ gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
+ };
+ hdd2-amber {
+ label = "synology:amber:hdd2";
+ gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/synology/hdd-power-29.dtsi b/arch/arm/boot/dts/synology/hdd-power-29.dtsi
new file mode 100644
index 000000000000..8b08c86ab942
--- /dev/null
+++ b/arch/arm/boot/dts/synology/hdd-power-29.dtsi
@@ -0,0 +1,56 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/ {
+ ocp at f1000000 {
+ pinctrl: pinctrl at 10000 {
+
+ pmx_hdd1_pwr_29: pmx-hdd1-pwr-29 {
+ marvell,pins = "mpp29";
+ marvell,function = "gpio";
+ };
+ pmx_hdd2_pwr_31: pmx-hdd2-pwr-31 {
+ marvell,pins = "mpp31";
+ marvell,function = "gpio";
+ };
+ };
+ };
+
+ regulators {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ pinctrl-0 = <&pmx_hdd1_pwr_29 &pmx_hdd2_pwr_31>;
+ pinctrl-names = "default";
+
+ hdd1_power: regulator at 1 {
+ compatible = "regulator-fixed";
+ reg = <1>;
+ regulator-name = "hdd1power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ startup-delay-us = <5000000>;
+ gpio = <&gpio0 29 GPIO_ACTIVE_HIGH>;
+ };
+ hdd2_power: regulator at 2 {
+ compatible = "regulator-fixed";
+ reg = <2>;
+ regulator-name = "hdd2power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ startup-delay-us = <5000000>;
+ gpio = <&gpio0 31 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/synology/hdd-power-30-1.dtsi b/arch/arm/boot/dts/synology/hdd-power-30-1.dtsi
new file mode 100644
index 000000000000..b0998d4e231f
--- /dev/null
+++ b/arch/arm/boot/dts/synology/hdd-power-30-1.dtsi
@@ -0,0 +1,40 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/ {
+ ocp at f1000000 {
+ pinctrl: pinctrl at 10000 {
+
+ pmx_hdd1_pwr_30: pmx-hdd-pwr-30 {
+ marvell,pins = "mpp30";
+ marvell,function = "gpio";
+ };
+ };
+ };
+
+ regulators {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ pinctrl-0 = <&pmx_hdd1_pwr_30>;
+ pinctrl-names = "default";
+
+ hdd1_power: regulator at 1 {
+ compatible = "regulator-fixed";
+ reg = <1>;
+ regulator-name = "hdd1power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ startup-delay-us = <5000000>;
+ gpio = <&gpio0 30 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/synology/hdd-power-30-2.dtsi b/arch/arm/boot/dts/synology/hdd-power-30-2.dtsi
new file mode 100644
index 000000000000..766e6352d5af
--- /dev/null
+++ b/arch/arm/boot/dts/synology/hdd-power-30-2.dtsi
@@ -0,0 +1,56 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/ {
+ ocp at f1000000 {
+ pinctrl: pinctrl at 10000 {
+
+ pmx_hdd1_pwr_30: pmx-hdd-pwr-30 {
+ marvell,pins = "mpp30";
+ marvell,function = "gpio";
+ };
+ pmx_hdd2_pwr_34: pmx-hdd2-pwr-34 {
+ marvell,pins = "mpp34";
+ marvell,function = "gpio";
+ };
+ };
+ };
+
+ regulators {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ pinctrl-0 = <&pmx_hdd1_pwr_30 &pmx_hdd2_pwr_34>;
+ pinctrl-names = "default";
+
+ hdd1_power: regulator at 1 {
+ compatible = "regulator-fixed";
+ reg = <1>;
+ regulator-name = "hdd1power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ startup-delay-us = <5000000>;
+ gpio = <&gpio0 30 GPIO_ACTIVE_HIGH>;
+ };
+ hdd2_power: regulator at 2 {
+ compatible = "regulator-fixed";
+ reg = <2>;
+ regulator-name = "hdd2power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ startup-delay-us = <5000000>;
+ gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/synology/hdd-power-30-4.dtsi b/arch/arm/boot/dts/synology/hdd-power-30-4.dtsi
new file mode 100644
index 000000000000..5bbced207965
--- /dev/null
+++ b/arch/arm/boot/dts/synology/hdd-power-30-4.dtsi
@@ -0,0 +1,89 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/ {
+ ocp at f1000000 {
+ pinctrl: pinctrl at 10000 {
+
+ pmx_hdd1_pwr_30: pmx-hdd-pwr-30 {
+ marvell,pins = "mpp30";
+ marvell,function = "gpio";
+ };
+ pmx_hdd2_pwr_34: pmx-hdd2-pwr-34 {
+ marvell,pins = "mpp34";
+ marvell,function = "gpio";
+ };
+ pmx_hdd3_pwr_44: pmx-hdd3-pwr-44 {
+ marvell,pins = "mpp44";
+ marvell,function = "gpio";
+ };
+ pmx_hdd4_pwr_45: pmx-hdd4-pwr-45 {
+ marvell,pins = "mpp45";
+ marvell,function = "gpio";
+ };
+ };
+ };
+
+ regulators {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ pinctrl-0 = <&pmx_hdd1_pwr_30 &pmx_hdd2_pwr_34
+ &pmx_hdd3_pwr_44 &pmx_hdd4_pwr_45>;
+ pinctrl-names = "default";
+
+ hdd1_power: regulator at 1 {
+ compatible = "regulator-fixed";
+ reg = <1>;
+ regulator-name = "hdd1power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ startup-delay-us = <5000000>;
+ gpio = <&gpio0 30 GPIO_ACTIVE_HIGH>;
+ };
+ hdd2_power: regulator at 2 {
+ compatible = "regulator-fixed";
+ reg = <2>;
+ regulator-name = "hdd2power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ startup-delay-us = <5000000>;
+ gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>;
+ };
+ hdd3_power: regulator at 3 {
+ compatible = "regulator-fixed";
+ reg = <3>;
+ regulator-name = "hdd3power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ startup-delay-us = <5000000>;
+ gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>;
+ };
+ hdd4_power: regulator at 4 {
+ compatible = "regulator-fixed";
+ reg = <4>;
+ regulator-name = "hdd3power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ startup-delay-us = <5000000>;
+ gpio = <&gpio1 32 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/synology/hdd-power-31.dtsi b/arch/arm/boot/dts/synology/hdd-power-31.dtsi
new file mode 100644
index 000000000000..0774ecdcaf64
--- /dev/null
+++ b/arch/arm/boot/dts/synology/hdd-power-31.dtsi
@@ -0,0 +1,40 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/ {
+ ocp at f1000000 {
+ pinctrl: pinctrl at 10000 {
+
+ pmx_hdd2_pwr_31: pmx-hdd2-pwr-31 {
+ marvell,pins = "mpp31";
+ marvell,function = "gpio";
+ };
+ };
+ };
+
+ regulators {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ pinctrl-0 = <&pmx_hdd2_pwr_31>;
+ pinctrl-names = "default";
+
+ hdd2_power: regulator at 1 {
+ compatible = "regulator-fixed";
+ reg = <1>;
+ regulator-name = "hdd2power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ startup-delay-us = <5000000>;
+ gpio = <&gpio0 31 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/synology/hdd-power-34.dtsi b/arch/arm/boot/dts/synology/hdd-power-34.dtsi
new file mode 100644
index 000000000000..d90becf582f1
--- /dev/null
+++ b/arch/arm/boot/dts/synology/hdd-power-34.dtsi
@@ -0,0 +1,73 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/ {
+ ocp at f1000000 {
+ pinctrl: pinctrl at 10000 {
+
+ pmx_hdd2_pwr_34: pmx-hdd2-pwr-34 {
+ marvell,pins = "mpp34";
+ marvell,function = "gpio";
+ };
+ pmx_hdd3_pwr_44: pmx-hdd3-pwr-44 {
+ marvell,pins = "mpp44";
+ marvell,function = "gpio";
+ };
+ pmx_hdd4_pwr_45: pmx-hdd4-pwr-45 {
+ marvell,pins = "mpp45";
+ marvell,function = "gpio";
+ };
+ };
+ };
+
+ regulators {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ pinctrl-0 = <&pmx_hdd2_pwr_34 &pmx_hdd3_pwr_44
+ &pmx_hdd4_pwr_45>;
+ pinctrl-names = "default";
+
+ hdd2_power: regulator at 2 {
+ compatible = "regulator-fixed";
+ reg = <2>;
+ regulator-name = "hdd2power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ startup-delay-us = <5000000>;
+ gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>;
+ };
+ hdd3_power: regulator at 3 {
+ compatible = "regulator-fixed";
+ reg = <3>;
+ regulator-name = "hdd3power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ startup-delay-us = <5000000>;
+ gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>;
+ };
+ hdd4_power: regulator at 4 {
+ compatible = "regulator-fixed";
+ reg = <4>;
+ regulator-name = "hdd3power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ startup-delay-us = <5000000>;
+ gpio = <&gpio1 32 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/synology/i2c-rtc-ricoh.dtsi b/arch/arm/boot/dts/synology/i2c-rtc-ricoh.dtsi
new file mode 100644
index 000000000000..920ad215462d
--- /dev/null
+++ b/arch/arm/boot/dts/synology/i2c-rtc-ricoh.dtsi
@@ -0,0 +1,18 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/ {
+ ocp at f1000000 {
+ i2c at 11000 {
+ rs5c372: rs5c372 at 32 {
+ compatible = "ricoh,rs5c372a";
+ reg = <0x32>;
+ };
+ };
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/synology/i2c-rtc-seiko.dtsi b/arch/arm/boot/dts/synology/i2c-rtc-seiko.dtsi
new file mode 100644
index 000000000000..4b5054bb4a87
--- /dev/null
+++ b/arch/arm/boot/dts/synology/i2c-rtc-seiko.dtsi
@@ -0,0 +1,18 @@
+/*
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/ {
+ ocp at f1000000 {
+ i2c at 11000 {
+ s35390a: s35390a at 30 {
+ compatible = "sii,s35390a";
+ reg = <0x30>;
+ };
+ };
+ };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/synology/pcie-2.dtsi b/arch/arm/boot/dts/synology/pcie-2.dtsi
new file mode 100644
index 000000000000..e34ebb5515c2
--- /dev/null
+++ b/arch/arm/boot/dts/synology/pcie-2.dtsi
@@ -0,0 +1,19 @@
+/*
+ * Nodes which are common to all Synology devices
+ *
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * 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.
+ */
+
+/ {
+ mbus {
+ pcie-controller {
+ pcie at 2,0 {
+ status = "okay";
+ };
+ };
+ };
+};
\ No newline at end of file
--
1.7.10.4
^ permalink raw reply related
* Weird sched_clock behaviour during boot with -rc1
From: Josh Cartwright @ 2014-02-05 21:47 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20140204220045.GC20528@codeaurora.org>
On Tue, Feb 04, 2014 at 02:00:45PM -0800, Stephen Boyd wrote:
> On 02/04, John Stultz wrote:
> > On 02/04/2014 10:36 AM, Will Deacon wrote:
> > > Hi guys,
> > >
> > > Booting -rc1 on my TC2 gives the following strange entries in the dmesg:
> > >
> > >
> > > Uncompressing Linux... done, booting the kernel.
> > > [ 0.000000] Booting Linux on physical CPU 0x0
> > >
> > > [...]
> > >
> > > [ 0.000000] HighMem zone: 329728 pages, LIFO batch:31
> > > [ 7.789662] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956969942ns
> > > [ 0.000129] PERCPU: Embedded 9 pages/cpu @ee7bd000 s12800 r8192 d15872 u36864
> > >
> > > [...]
> > >
> > > [ 0.868297] NR_IRQS:16 nr_irqs:16 16
> > > [ 0.886350] Architected cp15 timer(s) running at 24.00MHz (phys).
> > > [ 2915.164998] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 2863311519744ns
> > > [ 0.000002] Switching to timer-based delay loop
> > > [ 0.014249] Console: colour dummy device 80x30
> > >
> > >
> > > so it looks like something whacky goes on during sched_clock registration.
> > > Sure enough, we're doing a pr_info in-between updating cs.* and calling
> > > update_sched_clock(), so moving the print sorts things out (diff below).
> >
> > Yea... we have to be particularly careful with sched_clock to avoid
> > locks since we don't want to deadlock, but in this case
> > sched_clock_register is a little too relaxed here.
> >
> > Stephen: Would it make sense to set cd.suspended = true at the top of
> > the registration? That should block any sched_clock calls from getting
> > half-updated data, but still allow the sched_clock_update function to work.
> >
>
> That would work, but why can't we just hold the write seqlock
> during the registration? We would need to make a lockeless
> version of update_sched_clock() but that doesn't look too hard.
> It might actually turn out nicer because we call
> update_sched_clock() here just to set the epoch_cyc but we have
> to reset the epoch_ns back to 0 to start the count off right.
>
> How about this? The only concern is calling read_sched_clock()
> inside the seqlock, but I don't think that's a concern and if it
> is we can call it outside the lock at the beginning of this
> function.
If we go down this route, it looks there is an opportunity to rearrange
the logic a bit to front load the clocksource calculations, minimizing
the amount of time the lock is held.
----8<----
diff --git a/kernel/time/sched_clock.c b/kernel/time/sched_clock.c
index e5387a0..9bad1f7 100644
--- a/kernel/time/sched_clock.c
+++ b/kernel/time/sched_clock.c
@@ -116,20 +116,40 @@ static enum hrtimer_restart sched_clock_poll(struct hrtimer *hrt)
void __init sched_clock_register(u64 (*read)(void), int bits,
unsigned long rate)
{
+ u64 res, wrap, new_mask;
+ u32 new_mult, new_shift;
+ ktime_t new_wrap_kt;
unsigned long r;
- u64 res, wrap;
char r_unit;
if (cd.rate > rate)
return;
WARN_ON(!irqs_disabled());
+
+ /* calculate the mult/shift to convert counter ticks to ns. */
+ clocks_calc_mult_shift(&new_mult, &new_shift, rate, NSEC_PER_SEC, 3600);
+
+ new_mask = CLOCKSOURCE_MASK(bits);
+
+ /* calculate how many ns until we wrap */
+ wrap = clocks_calc_max_nsecs(new_mult, new_shift, 0, new_mask);
+ new_wrap_kt = ns_to_ktime(wrap - (wrap >> 3));
+
+ raw_write_seqcount_begin(&cd.seq);
read_sched_clock = read;
- sched_clock_mask = CLOCKSOURCE_MASK(bits);
+ sched_clock_mask = new_mask;
cd.rate = rate;
+ cd.wrap_kt = new_wrap_kt;
+ cd.mult = new_mult;
+ cd.shift = new_shift;
- /* calculate the mult/shift to convert counter ticks to ns. */
- clocks_calc_mult_shift(&cd.mult, &cd.shift, rate, NSEC_PER_SEC, 3600);
+ /*
+ * Ensure that sched_clock() starts off at 0ns
+ */
+ cd.epoch_ns = 0;
+ cd.epoch_cyc = read_sched_clock();
+ raw_write_seqcount_end(&cd.seq);
r = rate;
/*
@@ -145,22 +165,12 @@ void __init sched_clock_register(u64 (*read)(void), int bits,
} else
r_unit = ' ';
- /* calculate how many ns until we wrap */
- wrap = clocks_calc_max_nsecs(cd.mult, cd.shift, 0, sched_clock_mask);
- cd.wrap_kt = ns_to_ktime(wrap - (wrap >> 3));
-
/* calculate the ns resolution of this counter */
- res = cyc_to_ns(1ULL, cd.mult, cd.shift);
+ res = cyc_to_ns(1ULL, new_mult, new_shift);
+
pr_info("sched_clock: %u bits at %lu%cHz, resolution %lluns, wraps every %lluns\n",
bits, r, r_unit, res, wrap);
- update_sched_clock();
-
- /*
- * Ensure that sched_clock() starts off at 0ns
- */
- cd.epoch_ns = 0;
-
/* Enable IRQ time accounting if we have a fast enough sched_clock */
if (irqtime > 0 || (irqtime == -1 && rate >= 1000000))
enable_sched_clock_irqtime();
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
^ permalink raw reply related
* [PATCH 08/51] arm, hw-breakpoint: Fix CPU hotplug callback registration
From: Srivatsa S. Bhat @ 2014-02-05 22:06 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20140205220251.19080.92336.stgit@srivatsabhat.in.ibm.com>
Subsystems that want to register CPU hotplug callbacks, as well as perform
initialization for the CPUs that are already online, often do it as shown
below:
get_online_cpus();
for_each_online_cpu(cpu)
init_cpu(cpu);
register_cpu_notifier(&foobar_cpu_notifier);
put_online_cpus();
This is wrong, since it is prone to ABBA deadlocks involving the
cpu_add_remove_lock and the cpu_hotplug.lock (when running concurrently
with CPU hotplug operations).
Instead, the correct and race-free way of performing the callback
registration is:
cpu_maps_update_begin();
for_each_online_cpu(cpu)
init_cpu(cpu);
/* Note the use of the double underscored version of the API */
__register_cpu_notifier(&foobar_cpu_notifier);
cpu_maps_update_done();
Fix the hw-breakpoint code in arm by using this latter form of callback
registration.
Cc: Will Deacon <will.deacon@arm.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
---
arch/arm/kernel/hw_breakpoint.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c
index 3d44660..eaa7fcf 100644
--- a/arch/arm/kernel/hw_breakpoint.c
+++ b/arch/arm/kernel/hw_breakpoint.c
@@ -1072,6 +1072,8 @@ static int __init arch_hw_breakpoint_init(void)
core_num_brps = get_num_brps();
core_num_wrps = get_num_wrps();
+ cpu_maps_update_begin();
+
/*
* We need to tread carefully here because DBGSWENABLE may be
* driven low on this core and there isn't an architected way to
@@ -1088,6 +1090,7 @@ static int __init arch_hw_breakpoint_init(void)
if (!cpumask_empty(&debug_err_mask)) {
core_num_brps = 0;
core_num_wrps = 0;
+ cpu_maps_update_done();
return 0;
}
@@ -1107,7 +1110,10 @@ static int __init arch_hw_breakpoint_init(void)
TRAP_HWBKPT, "breakpoint debug exception");
/* Register hotplug and PM notifiers. */
- register_cpu_notifier(&dbg_reset_nb);
+ __register_cpu_notifier(&dbg_reset_nb);
+
+ cpu_maps_update_done();
+
pm_init();
return 0;
}
^ permalink raw reply related
* [PATCH 09/51] arm, kvm: Fix CPU hotplug callback registration
From: Srivatsa S. Bhat @ 2014-02-05 22:06 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20140205220251.19080.92336.stgit@srivatsabhat.in.ibm.com>
Subsystems that want to register CPU hotplug callbacks, as well as perform
initialization for the CPUs that are already online, often do it as shown
below:
get_online_cpus();
for_each_online_cpu(cpu)
init_cpu(cpu);
register_cpu_notifier(&foobar_cpu_notifier);
put_online_cpus();
This is wrong, since it is prone to ABBA deadlocks involving the
cpu_add_remove_lock and the cpu_hotplug.lock (when running concurrently
with CPU hotplug operations).
Instead, the correct and race-free way of performing the callback
registration is:
cpu_maps_update_begin();
for_each_online_cpu(cpu)
init_cpu(cpu);
/* Note the use of the double underscored version of the API */
__register_cpu_notifier(&foobar_cpu_notifier);
cpu_maps_update_done();
Fix the kvm code in arm by using this latter form of callback registration.
Cc: Christoffer Dall <christoffer.dall@linaro.org>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: kvmarm at lists.cs.columbia.edu
Cc: kvm at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
---
arch/arm/kvm/arm.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
index 1d8248e..e2ef4c4 100644
--- a/arch/arm/kvm/arm.c
+++ b/arch/arm/kvm/arm.c
@@ -1050,21 +1050,26 @@ int kvm_arch_init(void *opaque)
}
}
+ cpu_maps_update_begin();
+
err = init_hyp_mode();
if (err)
goto out_err;
- err = register_cpu_notifier(&hyp_init_cpu_nb);
+ err = __register_cpu_notifier(&hyp_init_cpu_nb);
if (err) {
kvm_err("Cannot register HYP init CPU notifier (%d)\n", err);
goto out_err;
}
+ cpu_maps_update_done();
+
hyp_cpu_pm_init();
kvm_coproc_table_init();
return 0;
out_err:
+ cpu_maps_update_done();
return err;
}
^ permalink raw reply related
* [PATCH 28/51] arm64, hw_breakpoint.c: Fix CPU hotplug callback registration
From: Srivatsa S. Bhat @ 2014-02-05 22:09 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20140205220251.19080.92336.stgit@srivatsabhat.in.ibm.com>
Subsystems that want to register CPU hotplug callbacks, as well as perform
initialization for the CPUs that are already online, often do it as shown
below:
get_online_cpus();
for_each_online_cpu(cpu)
init_cpu(cpu);
register_cpu_notifier(&foobar_cpu_notifier);
put_online_cpus();
This is wrong, since it is prone to ABBA deadlocks involving the
cpu_add_remove_lock and the cpu_hotplug.lock (when running concurrently
with CPU hotplug operations).
Instead, the correct and race-free way of performing the callback
registration is:
cpu_maps_update_begin();
for_each_online_cpu(cpu)
init_cpu(cpu);
/* Note the use of the double underscored version of the API */
__register_cpu_notifier(&foobar_cpu_notifier);
cpu_maps_update_done();
Fix the hw-breakpoint code in arm64 by using this latter form of callback
registration.
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Lorenzo Pieralisi <Lorenzo.Pieralisi@arm.com>
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
---
arch/arm64/kernel/hw_breakpoint.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/kernel/hw_breakpoint.c b/arch/arm64/kernel/hw_breakpoint.c
index f17f581..24e88d0 100644
--- a/arch/arm64/kernel/hw_breakpoint.c
+++ b/arch/arm64/kernel/hw_breakpoint.c
@@ -913,6 +913,8 @@ static int __init arch_hw_breakpoint_init(void)
pr_info("found %d breakpoint and %d watchpoint registers.\n",
core_num_brps, core_num_wrps);
+ cpu_maps_update_begin();
+
/*
* Reset the breakpoint resources. We assume that a halting
* debugger will leave the world in a nice state for us.
@@ -927,7 +929,10 @@ static int __init arch_hw_breakpoint_init(void)
TRAP_HWBKPT, "hw-watchpoint handler");
/* Register hotplug notifier. */
- register_cpu_notifier(&hw_breakpoint_reset_nb);
+ __register_cpu_notifier(&hw_breakpoint_reset_nb);
+
+ cpu_maps_update_done();
+
/* Register cpu_suspend hw breakpoint restore hook */
cpu_suspend_set_dbg_restorer(hw_breakpoint_reset);
^ permalink raw reply related
* [PATCH 29/51] arm64, debug-monitors: Fix CPU hotplug callback registration
From: Srivatsa S. Bhat @ 2014-02-05 22:09 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20140205220251.19080.92336.stgit@srivatsabhat.in.ibm.com>
Subsystems that want to register CPU hotplug callbacks, as well as perform
initialization for the CPUs that are already online, often do it as shown
below:
get_online_cpus();
for_each_online_cpu(cpu)
init_cpu(cpu);
register_cpu_notifier(&foobar_cpu_notifier);
put_online_cpus();
This is wrong, since it is prone to ABBA deadlocks involving the
cpu_add_remove_lock and the cpu_hotplug.lock (when running concurrently
with CPU hotplug operations).
Instead, the correct and race-free way of performing the callback
registration is:
cpu_maps_update_begin();
for_each_online_cpu(cpu)
init_cpu(cpu);
/* Note the use of the double underscored version of the API */
__register_cpu_notifier(&foobar_cpu_notifier);
cpu_maps_update_done();
Fix the debug-monitors code in arm64 by using this latter form of callback
registration.
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
---
arch/arm64/kernel/debug-monitors.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/kernel/debug-monitors.c b/arch/arm64/kernel/debug-monitors.c
index 636ba8b..959a16b 100644
--- a/arch/arm64/kernel/debug-monitors.c
+++ b/arch/arm64/kernel/debug-monitors.c
@@ -155,12 +155,16 @@ static struct notifier_block os_lock_nb = {
static int debug_monitors_init(void)
{
+ cpu_maps_update_begin();
+
/* Clear the OS lock. */
smp_call_function(clear_os_lock, NULL, 1);
clear_os_lock(NULL);
/* Register hotplug handler. */
- register_cpu_notifier(&os_lock_nb);
+ __register_cpu_notifier(&os_lock_nb);
+
+ cpu_maps_update_done();
return 0;
}
postcore_initcall(debug_monitors_init);
^ permalink raw reply related
* [PATCH] pci: Add support for creating a generic host_bridge from device tree
From: Tanmay Inamdar @ 2014-02-05 22:26 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <7398333.9L5KlyFggU@wuerfel>
Hello Liviu,
I did not get the first email of this particular patch on any of
subscribed mailing lists (don't know why), hence replying here.
+struct pci_host_bridge *
+pci_host_bridge_of_init(struct device *parent, int busno, struct pci_ops *ops,
+ void *host_data, struct list_head *resources)
+{
+ struct pci_bus *root_bus;
+ struct pci_host_bridge *bridge;
+
+ /* first parse the host bridge bus ranges */
+ if (pci_host_bridge_of_get_ranges(parent->of_node, resources))
+ return NULL;
+
+ /* then create the root bus */
+ root_bus = pci_create_root_bus(parent, busno, ops, host_data, resources);
+ if (!root_bus)
+ return NULL;
+
+ bridge = to_pci_host_bridge(root_bus->bridge);
+
+ return bridge;
+}
You are keeping the domain_nr inside pci_host_bridge structure. In
above API, domain_nr is required in 'pci_find_bus' function called
from 'pci_create_root_bus'. Since the bridge is allocated after
creating root bus, 'pci_find_bus' always gets domain_nr as 0. This
will cause problem for scanning multiple domains.
On Mon, Feb 3, 2014 at 10:46 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Monday 03 February 2014 18:33:48 Liviu Dudau wrote:
>> +/**
>> + * pci_host_bridge_of_get_ranges - Parse PCI host bridge resources from DT
>> + * @dev: device node of the host bridge having the range property
>> + * @resources: list where the range of resources will be added after DT parsing
>> + *
>> + * This function will parse the "ranges" property of a PCI host bridge device
>> + * node and setup the resource mapping based on its content. It is expected
>> + * that the property conforms with the Power ePAPR document.
>> + *
>> + * Each architecture will then apply their filtering based on the limitations
>> + * of each platform. One general restriction seems to be the number of IO space
>> + * ranges, the PCI framework makes intensive use of struct resource management,
>> + * and for IORESOURCE_IO types they can only be requested if they are contained
>> + * within the global ioport_resource, so that should be limited to one IO space
>> + * range.
>
> Actually we have quite a different set of restrictions around I/O space on ARM32
> at the moment: Each host bridge can have its own 64KB range in an arbitrary
> location on MMIO space, and the total must not exceed 2MB of I/O space.
>
>> + */
>> +static int pci_host_bridge_of_get_ranges(struct device_node *dev,
>> + struct list_head *resources)
>> +{
>> + struct resource *res;
>> + struct of_pci_range range;
>> + struct of_pci_range_parser parser;
>> + int err;
>> +
>> + pr_info("PCI host bridge %s ranges:\n", dev->full_name);
>> +
>> + /* Check for ranges property */
>> + err = of_pci_range_parser_init(&parser, dev);
>> + if (err)
>> + return err;
>> +
>> + pr_debug("Parsing ranges property...\n");
>> + for_each_of_pci_range(&parser, &range) {
>> + /* Read next ranges element */
>> + pr_debug("pci_space: 0x%08x pci_addr:0x%016llx ",
>> + range.pci_space, range.pci_addr);
>> + pr_debug("cpu_addr:0x%016llx size:0x%016llx\n",
>> + range.cpu_addr, range.size);
>> +
>> + /* If we failed translation or got a zero-sized region
>> + * (some FW try to feed us with non sensical zero sized regions
>> + * such as power3 which look like some kind of attempt
>> + * at exposing the VGA memory hole) then skip this range
>> + */
>> + if (range.cpu_addr == OF_BAD_ADDR || range.size == 0)
>> + continue;
>> +
>> + res = kzalloc(sizeof(struct resource), GFP_KERNEL);
>> + if (!res) {
>> + err = -ENOMEM;
>> + goto bridge_ranges_nomem;
>> + }
>> +
>> + of_pci_range_to_resource(&range, dev, res);
>> +
>> + pci_add_resource_offset(resources, res,
>> + range.cpu_addr - range.pci_addr);
>> + }
>
> I believe of_pci_range_to_resource() will return the MMIO aperture for the
> I/O space window here, which is not what you are supposed to pass into
> pci_add_resource_offset.
>
>> +EXPORT_SYMBOL(pci_host_bridge_of_init);
>
> EXPORT_SYMBOL_GPL
>
>> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
>> index 6e34498..16febae 100644
>> --- a/drivers/pci/probe.c
>> +++ b/drivers/pci/probe.c
>> @@ -1787,6 +1787,17 @@ struct pci_bus *pci_create_root_bus(struct device *parent, int bus,
>> list_for_each_entry_safe(window, n, resources, list) {
>> list_move_tail(&window->list, &bridge->windows);
>> res = window->res;
>> + /*
>> + * IO resources are stored in the kernel with a CPU start
>> + * address of zero. Adjust the data accordingly and remember
>> + * the offset
>> + */
>> + if (resource_type(res) == IORESOURCE_IO) {
>> + bridge->io_offset = res->start;
>> + res->end -= res->start;
>> + window->offset -= res->start;
>> + res->start = 0;
>> + }
>> offset = window->offset;
>> if (res->flags & IORESOURCE_BUS)
>
> Won't this break all existing host bridges?
>
> Arnd
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [PATCH] clk: respect the clock dependencies in of_clk_init
From: Sebastian Hesselbarth @ 2014-02-05 23:11 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1391554766-11285-1-git-send-email-gregory.clement@free-electrons.com>
On 02/04/2014 11:59 PM, Gregory CLEMENT wrote:
> Until now the clock providers were initialized in the order found in
> the device tree. This led to have the dependencies between the clocks
> not respected: children clocks could be initialized before their
> parent clocks.
>
> Instead of forcing each platform to manage its own initialization order,
> this patch adds this work inside the framework itself.
>
> Using the data of the device tree the of_clk_init function now delayed
> the initialization of a clock provider if its parent provider was not
> ready yet.
>
> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
> [...]
> this patch could solve the issues we get on severals mvebu platform
> since 3.14-rc1. This is an alternate solution of the patch set sent by
> Sebastian. However as it modifies the clock framework itself, it is
> more sensible.
>
> I find this solution more elegant than changing the order of the
> initialization of the clock at the platform level. However as it
> should be tested on more platforms that only the mvebu ones, it would
> take some time, and I don't want to still have "broken" platform
> during more release candidate. So at the end this patch should be part
> of the 3.15 kernel.
Gregory,
I admit, your patch is more general and I am looking forward to revert
the reorder fix as soon as this is ready :)
BTW, what happened to the early device discussion? Couldn't this be
picked up here to allow -EPROBE_DEFER also for those early drivers?
Sebastian
^ permalink raw reply
* [PATCH v5 02/20] clocksource: orion: Use atomic access for shared registers
From: Ezequiel Garcia @ 2014-02-05 23:19 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20140205191035.GZ8533@titan.lakedaemon.net>
On Wed, Feb 05, 2014 at 02:10:35PM -0500, Jason Cooper wrote:
> On Mon, Jan 27, 2014 at 12:27:02PM -0300, Ezequiel Garcia wrote:
> > Replace the driver-specific thread-safe shared register API
> > by the recently introduced atomic_io_clear_set().
> >
> > Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> > Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
> > Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
> > ---
> > drivers/clocksource/time-orion.c | 28 ++++++++++------------------
> > 1 file changed, 10 insertions(+), 18 deletions(-)
>
> The MMIO patch this depends on:
>
> c5ca95b507c8 ARM: 7930/1: Introduce atomic MMIO modify
>
> made it in to v3.14-rc1. It looks like this change is independent of
> the rest of the watchdog series, so:
>
> Acked-by: Jason Cooper <jason@lakedaemon.net>
>
Thanks, Jason.
Daniel: If you can pick this I'll drop it from the next watchdog patchset
submission.
--
Ezequiel Garc?a, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
^ permalink raw reply
* [PATCHv2 2/2] arm: Get rid of meminfo
From: Santosh Shilimkar @ 2014-02-05 23:21 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1391558551-31395-3-git-send-email-lauraa@codeaurora.org>
On Tuesday 04 February 2014 07:02 PM, Laura Abbott wrote:
> memblock is now fully integrated into the kernel and is the prefered
> method for tracking memory. Rather than reinvent the wheel with
> meminfo, migrate to using memblock directly instead of meminfo as
> an intermediate.
>
> Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
> ---
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
^ permalink raw reply
* [PATCH v5 2/3] clocksource: keystone: add bindings for keystone timer
From: Rob Herring @ 2014-02-05 23:36 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <52F28875.9000200@ti.com>
On Wed, Feb 5, 2014 at 12:52 PM, Ivan Khoronzhuk <ivan.khoronzhuk@ti.com> wrote:
>
> On 02/05/2014 07:41 PM, Rob Herring wrote:
>>
>> On Wed, Feb 5, 2014 at 10:18 AM, Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
>> wrote:
>>>
>>> On 02/05/2014 04:39 PM, Rob Herring wrote:
>>>>
>>>> On Wed, Feb 5, 2014 at 7:47 AM, Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
>>>> wrote:
>>>>>
>>>>> This patch provides bindings for the 64-bit timer in the KeyStone
>>>>> architecture devices. The timer can be configured as a general-purpose
>>>>> 64-bit
>>>>> timer, dual general-purpose 32-bit timers. When configured as dual
>>>>> 32-bit
>>>>> timers, each half can operate in conjunction (chain mode) or
>>>>> independently
>>>>> (unchained mode) of each other.
>>>>
>>>> This is software configurable or h/w design time configurations?
>>>>
>>>> Rob
>>>>
>>> This is h/w design time configurations
>>
>> Then it seems like the binding should provide for describing those
>> differences either with a property or different compatible strings.
>>
>> Rob
>
> Oh..sorry, seems I didn't catch, this is configurable by software.
> These configurations are like modes in which timer can work
> and they are not different hardware IPs. It depends on driver in
> which mode it should work.
In that case,
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply
* [PATCH] ARM: mm: Fix the memblock allocation for LPAE machines
From: Santosh Shilimkar @ 2014-02-05 23:39 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1391285687-20534-1-git-send-email-santosh.shilimkar@ti.com>
Russell,
On Saturday 01 February 2014 03:14 PM, Santosh Shilimkar wrote:
> Commit ad6492b8 added much needed memblock_virt_alloc_low() and further
> commit 07bacb3 {memblock, bootmem: restore goal for alloc_low} fixed the
> issue with low memory limit thansk to Yinghai. But even after all these fixes,
> there is still one case where the limit check done with ARCH_LOW_ADDRESS_LIMIT
> for low memory fails. Russell pointed out the issue with 32 bit LPAE machines
> in below thread.
> https://lkml.org/lkml/2014/1/28/364
>
> Since on some LPAE machines where memory start address is beyond 4GB,
> the low memory marker in memblock will be set to default
> ARCH_LOW_ADDRESS_LIMIT which is wrong. We can fix this by letting
> architectures set the ARCH_LOW_ADDRESS_LIMIT using another export
> similar to memblock_set_current_limit() but am not sure whether
> its worth the trouble. Tell me if you think otherwise.
>
> Rather am just trying to fix that one broken case using memblock_virt_alloc()
> in setup code since the memblock.current_limit is updated appropriately
> makes it work on all ARM 32 bit machines.
>
> Cc: Yinghai Lu <yinghai@kernel.org>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: Strashko, Grygorii <grygorii.strashko@ti.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> ---
Whats you say here ? We should get the fix for the
issue. If you are ok, I can drop the patch in patch system.
> arch/arm/kernel/setup.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
> index b0df976..1e8b030 100644
> --- a/arch/arm/kernel/setup.c
> +++ b/arch/arm/kernel/setup.c
> @@ -731,7 +731,7 @@ static void __init request_standard_resources(const struct machine_desc *mdesc)
> kernel_data.end = virt_to_phys(_end - 1);
>
> for_each_memblock(memory, region) {
> - res = memblock_virt_alloc_low(sizeof(*res), 0);
> + res = memblock_virt_alloc(sizeof(*res), 0);
> res->name = "System RAM";
> res->start = __pfn_to_phys(memblock_region_memory_base_pfn(region));
> res->end = __pfn_to_phys(memblock_region_memory_end_pfn(region)) - 1;
>
^ permalink raw reply
* [PATCH] ARM: mm: Fix the memblock allocation for LPAE machines
From: Russell King - ARM Linux @ 2014-02-05 23:48 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <52F2CBC0.3030305@ti.com>
On Wed, Feb 05, 2014 at 06:39:44PM -0500, Santosh Shilimkar wrote:
> Russell,
>
> On Saturday 01 February 2014 03:14 PM, Santosh Shilimkar wrote:
> > Commit ad6492b8 added much needed memblock_virt_alloc_low() and further
> > commit 07bacb3 {memblock, bootmem: restore goal for alloc_low} fixed the
> > issue with low memory limit thansk to Yinghai. But even after all these fixes,
> > there is still one case where the limit check done with ARCH_LOW_ADDRESS_LIMIT
> > for low memory fails. Russell pointed out the issue with 32 bit LPAE machines
> > in below thread.
> > https://lkml.org/lkml/2014/1/28/364
> >
> > Since on some LPAE machines where memory start address is beyond 4GB,
> > the low memory marker in memblock will be set to default
> > ARCH_LOW_ADDRESS_LIMIT which is wrong. We can fix this by letting
> > architectures set the ARCH_LOW_ADDRESS_LIMIT using another export
> > similar to memblock_set_current_limit() but am not sure whether
> > its worth the trouble. Tell me if you think otherwise.
> >
> > Rather am just trying to fix that one broken case using memblock_virt_alloc()
> > in setup code since the memblock.current_limit is updated appropriately
> > makes it work on all ARM 32 bit machines.
> >
> > Cc: Yinghai Lu <yinghai@kernel.org>
> > Cc: Russell King <linux@arm.linux.org.uk>
> > Cc: Strashko, Grygorii <grygorii.strashko@ti.com>
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> > ---
> Whats you say here ? We should get the fix for the
> issue. If you are ok, I can drop the patch in patch system.
Is this still an issue, or has Tejun fixed it by some other means? I've not
noticed anything being broken at the moment.
Can you confirm whether we still have an issue without this patch please?
Thanks.
--
FTTC broadband for 0.8mile line: 5.8Mbps down 500kbps up. Estimation
in database were 13.1 to 19Mbit for a good line, about 7.5+ for a bad.
Estimate before purchase was "up to 13.2Mbit".
^ permalink raw reply
* [PATCH] ARM: shmobile: r8a7790: Correct SYS DMAC clock defines
From: Simon Horman @ 2014-02-06 0:25 UTC (permalink / raw)
To: linux-arm-kernel
This brings the implementation into line with the documentation.
This problem was introduced when SYS DMAC clock defines were added by
ac991dce6498b5fc ("ARM: shmobile: r8a7790: Add clock index macros for DT
sources") in v3.13-rc2. I do not believe this results in any problems as
these defines do not appear to be used anywhere yet.
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
include/dt-bindings/clock/r8a7790-clock.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/dt-bindings/clock/r8a7790-clock.h b/include/dt-bindings/clock/r8a7790-clock.h
index 859e9be..6548a5f 100644
--- a/include/dt-bindings/clock/r8a7790-clock.h
+++ b/include/dt-bindings/clock/r8a7790-clock.h
@@ -46,8 +46,8 @@
#define R8A7790_CLK_MSIOF1 8
#define R8A7790_CLK_MSIOF3 15
#define R8A7790_CLK_SCIFB2 16
-#define R8A7790_CLK_SYS_DMAC0 18
-#define R8A7790_CLK_SYS_DMAC1 19
+#define R8A7790_CLK_SYS_DMAC1 18
+#define R8A7790_CLK_SYS_DMAC0 19
/* MSTP3 */
#define R8A7790_CLK_TPU0 4
--
1.8.5.2
^ permalink raw reply related
* [PATCH v5 1/3] clocksource: timer-keystone: introduce clocksource driver for Keystone
From: Josh Cartwright @ 2014-02-06 0:35 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1391608060-10760-2-git-send-email-ivan.khoronzhuk@ti.com>
Hey Ivan-
On Wed, Feb 05, 2014 at 03:47:38PM +0200, Ivan Khoronzhuk wrote:
> Add broadcast clock-event device for the Keystone arch.
>
> The timer can be configured as a general-purpose 64-bit timer,
> dual general-purpose 32-bit timers. When configured as dual 32-bit
> timers, each half can operate in conjunction (chain mode) or
> independently (unchained mode) of each other.
>
> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
> Acked-by: Santosh shilimkar <santosh.shilimkar@ti.com>
> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
> ---
> drivers/clocksource/Makefile | 1 +
> drivers/clocksource/timer-keystone.c | 233 +++++++++++++++++++++++++++++++++++
> 2 files changed, 234 insertions(+)
> create mode 100644 drivers/clocksource/timer-keystone.c
>
> diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile
> index c7ca50a..4abe5aa 100644
> --- a/drivers/clocksource/Makefile
> +++ b/drivers/clocksource/Makefile
> @@ -37,3 +37,4 @@ obj-$(CONFIG_ARM_ARCH_TIMER) += arm_arch_timer.o
> obj-$(CONFIG_ARM_GLOBAL_TIMER) += arm_global_timer.o
> obj-$(CONFIG_CLKSRC_METAG_GENERIC) += metag_generic.o
> obj-$(CONFIG_ARCH_HAS_TICK_BROADCAST) += dummy_timer.o
> +obj-$(CONFIG_ARCH_KEYSTONE) += timer-keystone.o
> diff --git a/drivers/clocksource/timer-keystone.c b/drivers/clocksource/timer-keystone.c
> new file mode 100644
> index 0000000..2299666
> --- /dev/null
> +++ b/drivers/clocksource/timer-keystone.c
> +static void __init keystone_timer_init(struct device_node *np)
> +{
> + struct clock_event_device *event_dev = &timer.event_dev;
> + unsigned long rate;
> + struct clk *clk;
> + int irq, error;
> + u32 tgcr;
> +
> + irq = irq_of_parse_and_map(np, 0);
> + if (irq == NO_IRQ) {
> + pr_err("%s: failed to map interrupts\n", __func__);
> + return;
> + }
> +
> + timer.base = of_iomap(np, 0);
> + if (!timer.base) {
> + pr_err("%s: failed to map registers\n", __func__);
> + return;
> + }
> +
> + clk = of_clk_get(np, 0);
> + if (!clk) {
This condition should be IS_ERR(clk).
> + pr_err("%s: failed to get clock\n", __func__);
> + iounmap(timer.base);
> + return;
> + }
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
^ permalink raw reply
* [PATCH 1/3] clk: rcar-h2: fix sd0/sd1 divisor table
From: Kuninori Morimoto @ 2014-02-06 0:43 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <2298259.CqC51XrMZM@avalon>
Hi all
> > >>> The clk_div_table for cpg_sd01_div_table[] concurs with the manual
> > >>> but not with values found in the device itself (which are also the
> > >>> same as the ones in arch/arm/mach-shmobile/clock-r8a7790.c).
> > >>>
> > >>> Update the clk-rcar-gen2.c driver to have the same table as the one
> > >>> used by the mach-shmobile driver which work once further issues are
> > >>> fixed in the clk-rcar-gen2.c driver.
> > >>>
> > >>> Part of the fix for the following error where the driver reports the
> > >>>
> > >>> output as 1MHz but is really 97.5MHz:
> > >>> sh_mobile_sdhi ee100000.sd: mmc0 base at 0xee100000 clock rate 1
> > >>> MHz
> > >>>
> > >>> [ben.dooks at codethink.co.uk: updated patch description]
> > >>> Signed-off-by: William Towle <william.towle@codethink.co.uk>
> > >>> Reviewed-by: Ben Dooks <ben.dooks@codethink.co.uk>
(snip)
> > >>> static const struct clk_div_table cpg_sd01_div_table[] = {
> > >>> + { 0, 2 }, { 1, 3 }, { 2, 4 }, { 3, 6 },
> > >>> + { 4, 8 },
> > >>>
> > >>> { 5, 12 }, { 6, 16 }, { 7, 18 }, { 8, 24 },
> > >>> { 10, 36 }, { 11, 48 }, { 12, 10 }, { 0, 0 },
(snip)
> > > I would like feedback from Renesas on this issue if possible. I can
> > > have a quick try at setting the clock value to 10 in u-boot and scope
> > > it out and see what happens.
> > >
> > > Magnus or Morimoto-san, is there a chance this could be reviewed by
> > > someone in Renesas who has knowledge of the hardware block?
> > >
> > > [PS, added Kuninori Morimoto to this[
> >
> > I got William to do a quick test with the following u-boot command
> > mw.l 0xE6150074 0xCCC
> >
> > sdhi0 showed 156MHz output, and it seemed to work. So there is a
> > distinct possibility that the sdh clock also supports setting 12
> > for a /10
>
> Thank you for trying it out. I'd like feedback from Renesas as well, assuming
> we don't get a "don't do that or it will cause the universe to collapse -
> woops, too late" nack, let's respin this patch and merge the two tables
> instead.
I ask it to Renesas HW team.
Please wait
Best regards
---
Kuninori Morimoto
^ permalink raw reply
* [PATCH] ARM: mm: Fix the memblock allocation for LPAE machines
From: Santosh Shilimkar @ 2014-02-06 0:50 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20140205234815.GU26684@n2100.arm.linux.org.uk>
On Wednesday 05 February 2014 06:48 PM, Russell King - ARM Linux wrote:
> On Wed, Feb 05, 2014 at 06:39:44PM -0500, Santosh Shilimkar wrote:
>> Russell,
>>
>> On Saturday 01 February 2014 03:14 PM, Santosh Shilimkar wrote:
>>> Commit ad6492b8 added much needed memblock_virt_alloc_low() and further
>>> commit 07bacb3 {memblock, bootmem: restore goal for alloc_low} fixed the
>>> issue with low memory limit thansk to Yinghai. But even after all these fixes,
>>> there is still one case where the limit check done with ARCH_LOW_ADDRESS_LIMIT
>>> for low memory fails. Russell pointed out the issue with 32 bit LPAE machines
>>> in below thread.
>>> https://lkml.org/lkml/2014/1/28/364
>>>
>>> Since on some LPAE machines where memory start address is beyond 4GB,
>>> the low memory marker in memblock will be set to default
>>> ARCH_LOW_ADDRESS_LIMIT which is wrong. We can fix this by letting
>>> architectures set the ARCH_LOW_ADDRESS_LIMIT using another export
>>> similar to memblock_set_current_limit() but am not sure whether
>>> its worth the trouble. Tell me if you think otherwise.
>>>
>>> Rather am just trying to fix that one broken case using memblock_virt_alloc()
>>> in setup code since the memblock.current_limit is updated appropriately
>>> makes it work on all ARM 32 bit machines.
>>>
>>> Cc: Yinghai Lu <yinghai@kernel.org>
>>> Cc: Russell King <linux@arm.linux.org.uk>
>>> Cc: Strashko, Grygorii <grygorii.strashko@ti.com>
>>> Cc: Andrew Morton <akpm@linux-foundation.org>
>>> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>>> ---
>> Whats you say here ? We should get the fix for the
>> issue. If you are ok, I can drop the patch in patch system.
>
> Is this still an issue, or has Tejun fixed it by some other means? I've not
> noticed anything being broken at the moment.
>
> Can you confirm whether we still have an issue without this patch please?
>
Fixes for all cases exist except 'LPAE + memory start beyond 4 GB'.
This case is still broken and hence I posted the $subject patch.
Regards,
Santosh
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox