DT support for kirkwood based Synology NAS boxes
Subsystems (4)
v5 cover DT support for kirkwood based Synology NAS boxes
This patchset adds support for around 30 kirkwood bases Synology NAS boxes. Patch #1 documents vendor prefixes. Patch #2 generalizes the qnap power off driver so that it can also be used for Synology devices. Patch #3 and #4 fix i2c trivial device and qnap vendor prefixes. Patch #5 adds the synology DT files.
v2:
Typo fix in qnap-poweroff.c
Use ricoy stock ticker instead of ricoh
Describe the lego structure of the hardware
v3:
Merge synology dtsi files into a single dtsi file
v4:
Various minor fixes to synology dtsi file
v5:
Fix typos in commit messages
Remove unnecessary casts in qnap-poweroff.c
Fix qnap vendor prefix
Andrew Lunn (3):
DT: Vendor prefixes: Add ricoh, qnap, sii and synology
Power: Reset: Generalize qnap-poweroff to work on Synology devices.
DT: i2c: Trivial: Add sii, s35390a, fix ricoh vendor prefix
Ben Peddell (2):
ARM: Kirkwood: Fix qnap vendor prefix
ARM: Kirkwood: Add support for many Synology NAS devices
.../devicetree/bindings/i2c/trivial-devices.txt | 3 +- .../bindings/power_supply/qnap-poweroff.txt | 5 +- .../devicetree/bindings/vendor-prefixes.txt | 4 + arch/arm/boot/dts/Makefile | 15 + arch/arm/boot/dts/kirkwood-ds109.dts | 41 + arch/arm/boot/dts/kirkwood-ds110jv10.dts | 41 + arch/arm/boot/dts/kirkwood-ds111.dts | 44 ++ arch/arm/boot/dts/kirkwood-ds112.dts | 48 ++ arch/arm/boot/dts/kirkwood-ds209.dts | 44 ++ arch/arm/boot/dts/kirkwood-ds210.dts | 46 ++ arch/arm/boot/dts/kirkwood-ds212.dts | 47 ++ arch/arm/boot/dts/kirkwood-ds212j.dts | 41 + arch/arm/boot/dts/kirkwood-ds409.dts | 48 ++ arch/arm/boot/dts/kirkwood-ds409slim.dts | 40 + arch/arm/boot/dts/kirkwood-ds411.dts | 52 ++ arch/arm/boot/dts/kirkwood-ds411j.dts | 48 ++ arch/arm/boot/dts/kirkwood-ds411slim.dts | 48 ++ arch/arm/boot/dts/kirkwood-rs212.dts | 48 ++ arch/arm/boot/dts/kirkwood-rs409.dts | 44 ++ arch/arm/boot/dts/kirkwood-rs411.dts | 44 ++ arch/arm/boot/dts/kirkwood-synology.dtsi | 871 +++++++++++++++++++++ arch/arm/boot/dts/kirkwood-ts219.dtsi | 4 +- drivers/power/reset/qnap-poweroff.c | 49 +- 23 files changed, 1659 insertions(+), 16 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/kirkwood-synology.dtsi
Signature · 1 line
1.8.3.2
PATCH v5 1/5 DT: Vendor prefixes: Add ricoh, qnap, sii and synology
From: Andrew Lunn <[email protected]>
The following patches make use of vendor names:
* ricoy (Ricoh Co. Ltd.);
* qnapsz (QNAP Systems, Inc.);
* sii (Seiko Instruments, Inc.); and
* synology (Synology, Inc.)
Add them to the vendor prefix list.
---
v2:
Use stock ticker for Ricoh as vendor name
s/Richoh/Ricoh/
v5:
Add vendor prefix for QNAP
--- Documentation/devicetree/bindings/vendor-prefixes.txt | 4 ++++ 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.txt +4 -0
@@ -68,10 +68,12 @@ picochip Picochip Ltd powervr PowerVR (deprecated, use img) qca Qualcomm Atheros, Inc. qcom Qualcomm Technologies, Inc +qnapsz QNAP Systems, Inc. ralink Mediatek/Ralink Technology Corp. ramtron Ramtron International realtek Realtek Semiconductor Corp. renesas Renesas Electronics Corporation +ricoy Ricoh Co. Ltd. rockchip Fuzhou Rockchip Electronics Co., Ltd samsung Samsung Semiconductor sbs Smart Battery System
@@ -79,12 +81,14 @@ schindler Schindler sil Silicon Image silabs Silicon Laboratories simtek +sii Seiko Instruments, Inc. sirf SiRF Technology, Inc. snps Synopsys, Inc. spansion Spansion Inc. st STMicroelectronics ste ST-Ericsson stericsson ST-Ericsson +synology Synology, Inc. ti Texas Instruments tlm Trusted Logic Mobility toshiba Toshiba Corporation
Signature · 1 line
1.8.3.2
PATCH v5 2/5 Power: Reset: Generalize qnap-poweroff to work on Synology devices.
In reply to klightspeed at killerwolves.netFrom: Andrew Lunn <[email protected]>
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.
--- .../bindings/power_supply/qnap-poweroff.txt | 5 ++- drivers/power/reset/qnap-poweroff.c | 49 ++++++++++++++++------ 2 files changed, 41 insertions(+), 13 deletions(-)
Documentation/devicetree/bindings/power_supply/qnap-poweroff.txt +4 -1
@@ -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, +9600, 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
drivers/power/reset/qnap-poweroff.c +37 -12
87 lines not on this page · raw message
Signature · 1 line
1.8.3.2
PATCH v5 3/5 DT: i2c: Trivial: Add sii, s35390a, fix ricoh vendor prefix
In reply to klightspeed at killerwolves.netFrom: Andrew Lunn <[email protected]>
Add the Seiko Instruments Inc S35390a to the list of trivial i2c devices. At the same time, correct the vendor prefix for ricoh, which should be the ticker symbol ricoy.
--- Documentation/devicetree/bindings/i2c/trivial-devices.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/i2c/trivial-devices.txt +2 -1
@@ -56,8 +56,9 @@ ovti,ov5642 OV5642: Color CMOS QSXGA (5-megapixel) Image Sensor with OmniBSI an pericom,pt7c4338 Real-time Clock Module 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 +ricoy,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
Signature · 1 line
1.8.3.2
PATCH v5 4/5 ARM: Kirkwood: Fix qnap vendor prefix
In reply to klightspeed at killerwolves.netCorrect the vendor prefix for qnap, which should be the stock ticker symbol qnapsz.
--- Documentation/devicetree/bindings/power_supply/qnap-poweroff.txt | 2 +- arch/arm/boot/dts/kirkwood-ts219.dtsi | 4 ++-- drivers/power/reset/qnap-poweroff.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/power_supply/qnap-poweroff.txt +1 -1
@@ -10,7 +10,7 @@ Synology NAS devices use a similar scheme, but a different baud rate, 9600, and a different character, '1'. Required Properties: -- compatible: Should be "qnap,power-off" or "synology,power-off" +- compatible: Should be "qnapsz,power-off" or "synology,power-off" - reg: Address and length of the register set for UART1 - clocks: tclk clock
arch/arm/boot/dts/kirkwood-ts219.dtsi +2 -2
@@ -1,6 +1,6 @@ / { model = "QNAP TS219 family"; - compatible = "qnap,ts219", "marvell,kirkwood"; + compatible = "qnapsz,ts219", "marvell,kirkwood"; memory { device_type = "memory";
@@ -46,7 +46,7 @@ pinctrl-names = "default"; }; poweroff at 12100 { - compatible = "qnap,power-off"; + compatible = "qnapsz,power-off"; reg = <0x12000 0x100>; clocks = <&gate_clk 7>; };
drivers/power/reset/qnap-poweroff.c +1 -1
@@ -41,7 +41,7 @@ static const struct power_off_cfg synology_power_off_cfg = { };static const struct of_device_id qnap_power_off_of_match_table[] = { - { .compatible ="qnap,power-off" , + { .compatible ="qnapsz,power-off" , .data = &qnap_power_off_cfg, }, { .compatible ="synology,power-off" ,
Signature · 1 line
1.8.3.2
PATCH v5 4/5 ARM: Kirkwood: Fix qnap vendor prefix
Quoted 2 lines · klightspeed at killerwolves.net
Correct the vendor prefix for qnap, which should be the stock ticker symbol qnapsz.
No. This is an ABI change which appears to be gratuitous.
Perhaps it's really necessary, and perhaps it's harmless because it won't *really* break compatibility with existing firmware because these boxes have *always* shipped with a DTB built into the kernel or something.
In which case all I'm complaining about is the fact that you didn't properly address that in the commit comment and *explain* why it was OK...
Signature · 9 lines
David Woodhouse Open Source Technology Centre David.Woodhouse at intel.com Intel Corporation -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 5745 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140219/cb468199/attachment.bin>
PATCH v5 4/5 ARM: Kirkwood: Fix qnap vendor prefix
In reply to klightspeed at killerwolves.netdrivers/power/reset/qnap-poweroff.c static const struct power_off_cfg synology_power_off_cfg = { · line 46
Quoted 12 lines
drivers/power/reset/qnap-poweroff.c +1
-1@@ -41,7 +41,7 @@ static const struct power_off_cfg synology_power_off_cfg = { };static const struct of_device_id qnap_power_off_of_match_table[] = { - { .compatible ="qnap,power-off" , + { .compatible ="qnapsz,power-off" , .data = &qnap_power_off_cfg, },
Hi Ben
This causes issues for devices using old DT blobs. You need to keep the old entry as well as supporting the new vendor prefix.
We need to consider, is it worth the hassle of changing the prefix, since it has been in use for a long time. I think using the stock ticker is a "rule of thumb" and not a strict requirement.
Andrew
PATCH v5 4/5 ARM: Kirkwood: Fix qnap vendor prefix
Quoted 15 lines · Andrew Lunn
drivers/power/reset/qnap-poweroff.c static const struct power_off_cfg synology_power_off_cfg = { · line 46
Quoted 12 lines
drivers/power/reset/qnap-poweroff.c +1
-1@@ -41,7 +41,7 @@ static const struct power_off_cfg synology_power_off_cfg = { };static const struct of_device_id qnap_power_off_of_match_table[] = { - { .compatible ="qnap,power-off" , + { .compatible ="qnapsz,power-off" , .data = &qnap_power_off_cfg, },Hi Ben
Quoted 6 lines
This causes issues for devices using old DT blobs. You need to keep the old entry as well as supporting the new vendor prefix.
We need to consider, is it worth the hassle of changing the prefix, since it has been in use for a long time. I think using the stock ticker is a "rule of thumb" and not a strict requirement.
So, in this case it would be best to change qnapsz back to qnap in patch #1, and completely remove this patch?
PATCH v5 4/5 ARM: Kirkwood: Fix qnap vendor prefix
Quoted 19 lines · Ben Peddell
Quoted 18 lines · Andrew Lunn
drivers/power/reset/qnap-poweroff.c static const struct power_off_cfg synology_power_off_cfg = { · line 46
Quoted 12 lines
drivers/power/reset/qnap-poweroff.c +1
-1@@ -41,7 +41,7 @@ static const struct power_off_cfg synology_power_off_cfg = { };static const struct of_device_id qnap_power_off_of_match_table[] = { - { .compatible ="qnap,power-off" , + { .compatible ="qnapsz,power-off" , .data = &qnap_power_off_cfg, },Hi Ben
This causes issues for devices using old DT blobs. You need to keep the old entry as well as supporting the new vendor prefix.
Quoted 6 lines
Quoted 3 lines
We need to consider, is it worth the hassle of changing the prefix, since it has been in use for a long time. I think using the stock ticker is a "rule of thumb" and not a strict requirement.
So, in this case it would be best to change qnapsz back to qnap in patch #1, and completely remove this patch?
If we already have users of the qnap prefix, yes please.
Thanks,
Mark.
PATCH v5 5/5 ARM: Kirkwood: Add support for many Synology NAS devices
In reply to klightspeed at killerwolves.netFrom: "[email protected]" <[email protected]>
Add device tree fragments and files to support many of the kirkwood based Synology NAS devices. This is a modification of Andrew Lunn's <[email protected]> translation of the board setup file maintained by Ben Peddell <[email protected]>
The Ricoh RS5C372 RTC was used in all 2009 units and some 2010 units. All other Synology Kirkwood-based DiskStations and RackStations use the Seiko S35390A RTC.
Most of the 1-bay and 2-bay units use the GPIOs that are multiplexed with the built-in SATA interface activity/presence pins on mpp 20-23, while the 4-bay units use ge01 and a PCIe SATA controller, and put the software controlled HDD leds on mpp 36-43.
Most of the 6281 units with HDD power controls use mpp 29 and 31, while most of the 6282 units with HDD power controls use mpp 30, 34, 44 and 45 and provide a model ID on mpp 28, 29, 46 and 47. Pre-2012 units and most 4-bay units didn't have a separate power control for HDD1. These power controls are presumably to limit startup current from the 12V brick power supply.
Instead of using separate dtsi files in a synology directory, this patch uses a single dtsi file containing all of the modules for these boards, with all of the modules not common to all boards disabled. The board dts files then enable the appropriate modules for their boards.
---
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.
Add a description of the lego
Use ricoy, i.e. the stock ticker
v3:
Merge Synology dtsi files into single dtsi file
v4:
Various minor fixes to synology dtsi file
--- arch/arm/boot/dts/Makefile | 15 + arch/arm/boot/dts/kirkwood-ds109.dts | 41 ++ arch/arm/boot/dts/kirkwood-ds110jv10.dts | 41 ++ arch/arm/boot/dts/kirkwood-ds111.dts | 44 ++ arch/arm/boot/dts/kirkwood-ds112.dts | 48 ++ arch/arm/boot/dts/kirkwood-ds209.dts | 44 ++ arch/arm/boot/dts/kirkwood-ds210.dts | 46 ++ arch/arm/boot/dts/kirkwood-ds212.dts | 47 ++ arch/arm/boot/dts/kirkwood-ds212j.dts | 41 ++ arch/arm/boot/dts/kirkwood-ds409.dts | 48 ++ arch/arm/boot/dts/kirkwood-ds409slim.dts | 40 ++ arch/arm/boot/dts/kirkwood-ds411.dts | 52 ++ arch/arm/boot/dts/kirkwood-ds411j.dts | 48 ++ arch/arm/boot/dts/kirkwood-ds411slim.dts | 48 ++ arch/arm/boot/dts/kirkwood-rs212.dts | 48 ++ arch/arm/boot/dts/kirkwood-rs409.dts | 44 ++ arch/arm/boot/dts/kirkwood-rs411.dts | 44 ++ arch/arm/boot/dts/kirkwood-synology.dtsi | 871 +++++++++++++++++++++++++++++++ 18 files changed, 1610 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/kirkwood-synology.dtsi
arch/arm/boot/dts/Makefile +15 -0
@@ -90,6 +90,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 \
@@ -112,6 +124,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 \
arch/arm/boot/dts/kirkwood-ds109.dts new file +41 -0
41 lines not on this page · raw message
arch/arm/boot/dts/kirkwood-ds110jv10.dts new file +41 -0
41 lines not on this page · raw message
arch/arm/boot/dts/kirkwood-ds111.dts new file +44 -0
44 lines not on this page · raw message
arch/arm/boot/dts/kirkwood-ds112.dts new file +48 -0
48 lines not on this page · raw message
arch/arm/boot/dts/kirkwood-ds209.dts new file +44 -0
44 lines not on this page · raw message
arch/arm/boot/dts/kirkwood-ds210.dts new file +46 -0
46 lines not on this page · raw message
arch/arm/boot/dts/kirkwood-ds212.dts new file +47 -0
47 lines not on this page · raw message
arch/arm/boot/dts/kirkwood-ds212j.dts new file +41 -0
41 lines not on this page · raw message
arch/arm/boot/dts/kirkwood-ds409.dts new file +48 -0
48 lines not on this page · raw message
arch/arm/boot/dts/kirkwood-ds409slim.dts new file +40 -0
@@ -0,0 +1,40 @@ +/* + * Andrew Lunn <[email protected]> + * Ben Peddell <[email protected]> + * + * 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 "kirkwood-synology.dtsi" + +/ { + model = "Synology 409slim"; + compatible = "synology,ds409slim", "marvell,kirkwood"; + + memory { + device_type = "memory"; + reg = <0x00000000 0x8000000>; + }; + + chosen { + bootargs = "console=ttyS0,115200n8"; + }; + + gpio-fan-150-32-35 { + status = "okay"; + }; + + gpio-leds-hdd-20 { + status = "okay"; + }; +}; + +&rs5c372 { + status = "okay"; +};
arch/arm/boot/dts/kirkwood-ds411.dts new file +52 -0
52 lines not on this page · raw message
arch/arm/boot/dts/kirkwood-ds411j.dts new file +48 -0
48 lines not on this page · raw message
arch/arm/boot/dts/kirkwood-ds411slim.dts new file +48 -0
48 lines not on this page · raw message
arch/arm/boot/dts/kirkwood-rs212.dts new file +48 -0
48 lines not on this page · raw message
arch/arm/boot/dts/kirkwood-rs409.dts new file +44 -0
44 lines not on this page · raw message
arch/arm/boot/dts/kirkwood-rs411.dts new file +44 -0
44 lines not on this page · raw message
arch/arm/boot/dts/kirkwood-synology.dtsi new file +871 -0
871 lines not on this page · raw message
Signature · 1 line
1.8.3.2