* [PATCH RFC RFT 0/2] ARM: Kirkwood: Synology DT files @ 2014-01-06 23:47 Andrew Lunn [not found] ` <1389052027-16819-1-git-send-email-andrew-g2DYL2Zd6BY@public.gmane.org> 0 siblings, 1 reply; 16+ messages in thread From: Andrew Lunn @ 2014-01-06 23:47 UTC (permalink / raw) To: Jason Cooper Cc: linux ARM, klightspeed-aslSrjg9ejhWX4hkXwHRhw, devicetree-u79uwXL29TY76Z2rM5mHXA, Andrew Lunn This patchset adds support for a few different Kirkwood based Synology NAS boxes. I've taken the board file created by Ben Peddell and converted it into DT files. Request for Comment: Synology hardware design uses a number of sub-designs which get repeated across boards. Hence i have a lot of .dtsi files, 25 in total. I decided to place these into a subdirectory arch/arm/boot/dts/synology. Is this a good idea, or is it preferred to keep them alongside the .dts files? Request for Testing: This patch adds support for around 30 different boards. Most .dts files support a couple of different models. I don't have any of this hardware. None of this is tested. Andrew Lunn (2): Power: Reset: Generalize qnap-poweroff to with on Synology devices. ARM: Kirkwood: Add support for many Synology NAS devices 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 +++++++--- 43 files changed, 1694 insertions(+), 10 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 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <1389052027-16819-1-git-send-email-andrew-g2DYL2Zd6BY@public.gmane.org>]
* [PATCH RFC RFT 1/2] Power: Reset: Generalize qnap-poweroff to with on Synology devices. [not found] ` <1389052027-16819-1-git-send-email-andrew-g2DYL2Zd6BY@public.gmane.org> @ 2014-01-06 23:47 ` Andrew Lunn 2014-01-06 23:47 ` [PATCH RFC RFT 2/2] ARM: Kirkwood: Add support for many Synology NAS devices Andrew Lunn 2014-01-09 5:18 ` [PATCH RFC RFT 0/2] ARM: Kirkwood: Synology DT files Ben Peddell 2 siblings, 0 replies; 16+ messages in thread From: Andrew Lunn @ 2014-01-06 23:47 UTC (permalink / raw) To: Jason Cooper Cc: linux ARM, klightspeed-aslSrjg9ejhWX4hkXwHRhw, devicetree-u79uwXL29TY76Z2rM5mHXA, Andrew Lunn 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-g2DYL2Zd6BY@public.gmane.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-g2DYL2Zd6BY@public.gmane.org> * @@ -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 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH RFC RFT 2/2] ARM: Kirkwood: Add support for many Synology NAS devices [not found] ` <1389052027-16819-1-git-send-email-andrew-g2DYL2Zd6BY@public.gmane.org> 2014-01-06 23:47 ` [PATCH RFC RFT 1/2] Power: Reset: Generalize qnap-poweroff to with on Synology devices Andrew Lunn @ 2014-01-06 23:47 ` Andrew Lunn 2014-01-09 2:05 ` Ben Peddell 2014-01-09 5:18 ` [PATCH RFC RFT 0/2] ARM: Kirkwood: Synology DT files Ben Peddell 2 siblings, 1 reply; 16+ messages in thread From: Andrew Lunn @ 2014-01-06 23:47 UTC (permalink / raw) To: Jason Cooper Cc: linux ARM, klightspeed-aslSrjg9ejhWX4hkXwHRhw, devicetree-u79uwXL29TY76Z2rM5mHXA, Andrew Lunn 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-aslSrjg9ejhWX4hkXwHRhw@public.gmane.org> Signed-off-by: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org> cc: Ben Peddell <klightspeed-aslSrjg9ejhWX4hkXwHRhw@public.gmane.org> --- 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 d57c1a65b24f..dc5ec1c57b43 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -78,6 +78,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 \ @@ -98,6 +110,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-g2DYL2Zd6BY@public.gmane.org> + * + * 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-g2DYL2Zd6BY@public.gmane.org> + * + * 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-g2DYL2Zd6BY@public.gmane.org> + * + * 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-g2DYL2Zd6BY@public.gmane.org> + * + * 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-g2DYL2Zd6BY@public.gmane.org> + * + * 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-g2DYL2Zd6BY@public.gmane.org> + * + * 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-g2DYL2Zd6BY@public.gmane.org> + * + * 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-g2DYL2Zd6BY@public.gmane.org> + * + * 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-g2DYL2Zd6BY@public.gmane.org> + * + * 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-g2DYL2Zd6BY@public.gmane.org> + * + * 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-g2DYL2Zd6BY@public.gmane.org> + * + * 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-g2DYL2Zd6BY@public.gmane.org> + * + * 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-g2DYL2Zd6BY@public.gmane.org> + * + * 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-g2DYL2Zd6BY@public.gmane.org> + * + * 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-g2DYL2Zd6BY@public.gmane.org> + * + * 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-g2DYL2Zd6BY@public.gmane.org> + * + * 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-g2DYL2Zd6BY@public.gmane.org> + * + * 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@f1000000 { + pinctrl: pinctrl@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..386074f3b6a2 --- /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-g2DYL2Zd6BY@public.gmane.org> + * + * 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@1,0 { + status = "okay"; + }; + }; + }; + ocp@f1000000 { + i2c@11000 { + status = "okay"; + clock-frequency = <400000>; + pinctrl-0 = <&pmx_twsi0>; + pinctrl-names = "default"; + }; + serial@12000 { + status = "okay"; + pinctrl-0 = <&pmx_uart0>; + pinctrl-names = "default"; + }; + serial@12100 { + status = "okay"; + pinctrl-0 = <&pmx_uart1>; + pinctrl-names = "default"; + }; + poweroff@12100 { + compatible = "synology,power-off"; + reg = <0x12000 0x100>; + clocks = <&gate_clk 7>; + }; + spi@10600 { + status = "okay"; + pinctrl-0 = <&pmx_spi>; + pinctrl-names = "default"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "m25p80"; + reg = <0>; + spi-max-frequency = <20000000>; + mode = <0>; + + partition@00000000 { + reg = <0x00000000 0x00080000>; + label = "RedBoot"; + }; + + partition@00080000 { + reg = <0x00080000 0x00200000>; + label = "zImage"; + }; + + partition@00280000 { + reg = <0x00280000 0x00140000>; + label = "rd.gz"; + }; + partition@003c0000 { + reg = <0x003c0000 0x00010000>; + label = "vendor"; + }; + partition@003d0000 { + reg = <0x003d0000 0x00020000>; + label = "RedBoot config"; + }; + partition@003f0000 { + reg = <0x003f0000 0x00010000>; + label = "FIS directory"; + }; + }; + }; + sata@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@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@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..af9efc076808 --- /dev/null +++ b/arch/arm/boot/dts/synology/fan-alarm-18.dtsi @@ -0,0 +1,22 @@ +/* + * Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org> + * + * 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@f1000000 { + pinctrl: pinctrl@10000 { + + pmx_fan_18: pmx-fan-18 { + marvell,pins = "mpp18"; + marvell,function = "gpio"; + }; + }; + }; + 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-g2DYL2Zd6BY@public.gmane.org> + * + * 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@f1000000 { + pinctrl: pinctrl@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-g2DYL2Zd6BY@public.gmane.org> + * + * 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@f1000000 { + pinctrl: pinctrl@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-g2DYL2Zd6BY@public.gmane.org> + * + * 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@f1000000 { + pinctrl: pinctrl@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..aea1a0dce906 --- /dev/null +++ b/arch/arm/boot/dts/synology/fan-gpios-32.dtsi @@ -0,0 +1,34 @@ +/* + * Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org> + * + * 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@f1000000 { + pinctrl: pinctrl@10000 { + + pmx_fan_32: pmx-fan-32 { + marvell,pins = "mpp32"; + marvell,function = "gpio"; + }; + pmx_fan_33: pmx-fan-33 { + marvell,pins = "mpp33"; + marvell,function = "gpio"; + }; + 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-g2DYL2Zd6BY@public.gmane.org> + * + * 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-g2DYL2Zd6BY@public.gmane.org> + * + * 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-g2DYL2Zd6BY@public.gmane.org> + * + * 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-g2DYL2Zd6BY@public.gmane.org> + * + * 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@f1000000 { + pinctrl: pinctrl@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-g2DYL2Zd6BY@public.gmane.org> + * + * 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@f1000000 { + pinctrl: pinctrl@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-g2DYL2Zd6BY@public.gmane.org> + * + * 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@f1000000 { + pinctrl: pinctrl@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-g2DYL2Zd6BY@public.gmane.org> + * + * 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@f1000000 { + pinctrl: pinctrl@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-g2DYL2Zd6BY@public.gmane.org> + * + * 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@f1000000 { + pinctrl: pinctrl@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-g2DYL2Zd6BY@public.gmane.org> + * + * 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@f1000000 { + pinctrl: pinctrl@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@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@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-g2DYL2Zd6BY@public.gmane.org> + * + * 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@f1000000 { + pinctrl: pinctrl@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@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-g2DYL2Zd6BY@public.gmane.org> + * + * 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@f1000000 { + pinctrl: pinctrl@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@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@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-g2DYL2Zd6BY@public.gmane.org> + * + * 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@f1000000 { + pinctrl: pinctrl@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@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@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@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@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-g2DYL2Zd6BY@public.gmane.org> + * + * 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@f1000000 { + pinctrl: pinctrl@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@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-g2DYL2Zd6BY@public.gmane.org> + * + * 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@f1000000 { + pinctrl: pinctrl@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@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@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@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..98a23588ee62 --- /dev/null +++ b/arch/arm/boot/dts/synology/i2c-rtc-ricoh.dtsi @@ -0,0 +1,18 @@ +/* + * Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org> + * + * 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@f1000000 { + i2c@11000 { + rs5c372: rs5c372@32 { + compatible = "rs5c372"; + 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..3dd0d554ac66 --- /dev/null +++ b/arch/arm/boot/dts/synology/i2c-rtc-seiko.dtsi @@ -0,0 +1,18 @@ +/* + * Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org> + * + * 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@f1000000 { + i2c@11000 { + s35390a: s35390a@30 { + compatible = "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-g2DYL2Zd6BY@public.gmane.org> + * + * 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@2,0 { + status = "okay"; + }; + }; + }; +}; \ No newline at end of file -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH RFC RFT 2/2] ARM: Kirkwood: Add support for many Synology NAS devices 2014-01-06 23:47 ` [PATCH RFC RFT 2/2] ARM: Kirkwood: Add support for many Synology NAS devices Andrew Lunn @ 2014-01-09 2:05 ` Ben Peddell 0 siblings, 0 replies; 16+ messages in thread From: Ben Peddell @ 2014-01-09 2:05 UTC (permalink / raw) To: Andrew Lunn, Jason Cooper; +Cc: devicetree, linux ARM On 07/01/14 09:47, Andrew Lunn wrote: > 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> [snip] > 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..aea1a0dce906 > --- /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@f1000000 { > + pinctrl: pinctrl@10000 { > + > + pmx_fan_32: pmx-fan-32 { > + marvell,pins = "mpp32"; > + marvell,function = "gpio"; > + }; > + pmx_fan_33: pmx-fan-33 { > + marvell,pins = "mpp33"; > + marvell,function = "gpio"; This should be "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>; > + }; > +}; ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH RFC RFT 0/2] ARM: Kirkwood: Synology DT files [not found] ` <1389052027-16819-1-git-send-email-andrew-g2DYL2Zd6BY@public.gmane.org> 2014-01-06 23:47 ` [PATCH RFC RFT 1/2] Power: Reset: Generalize qnap-poweroff to with on Synology devices Andrew Lunn 2014-01-06 23:47 ` [PATCH RFC RFT 2/2] ARM: Kirkwood: Add support for many Synology NAS devices Andrew Lunn @ 2014-01-09 5:18 ` Ben Peddell [not found] ` <52CE312B.3060108-aslSrjg9ejhWX4hkXwHRhw@public.gmane.org> 2 siblings, 1 reply; 16+ messages in thread From: Ben Peddell @ 2014-01-09 5:18 UTC (permalink / raw) To: Andrew Lunn, Jason Cooper; +Cc: linux ARM, devicetree-u79uwXL29TY76Z2rM5mHXA On 07/01/14 09:47, Andrew Lunn wrote: > Request for Testing: > > This patch adds support for around 30 different boards. Most .dts > files support a couple of different models. I don't have any of this > hardware. None of this is tested. Tested by Ben Peddell <klightspeed-aslSrjg9ejhWX4hkXwHRhw@public.gmane.org> (specifically kirkwood-ds210.dts on DS211j) To get running on the stock bootloader, I needed to extend the initramfs to fill the entire rd.gz flash partition, configure the kernel to use the dtb appended to it, configure it to ignore the information passed to it by the bootloader, and add the following nodes to the dts: /chosen { linux,initrd-start = <0x800040>; linux,initrd-end = <0x940000>; }; -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <52CE312B.3060108-aslSrjg9ejhWX4hkXwHRhw@public.gmane.org>]
* Re: [PATCH RFC RFT 0/2] ARM: Kirkwood: Synology DT files [not found] ` <52CE312B.3060108-aslSrjg9ejhWX4hkXwHRhw@public.gmane.org> @ 2014-01-09 16:55 ` Andrew Lunn [not found] ` <20140109165557.GB9681-g2DYL2Zd6BY@public.gmane.org> 0 siblings, 1 reply; 16+ messages in thread From: Andrew Lunn @ 2014-01-09 16:55 UTC (permalink / raw) To: Ben Peddell Cc: Andrew Lunn, Jason Cooper, devicetree-u79uwXL29TY76Z2rM5mHXA, linux ARM On Thu, Jan 09, 2014 at 03:18:35PM +1000, Ben Peddell wrote: > On 07/01/14 09:47, Andrew Lunn wrote: > > Request for Testing: > > > > This patch adds support for around 30 different boards. Most .dts > > files support a couple of different models. I don't have any of this > > hardware. None of this is tested. > > Tested by Ben Peddell <klightspeed-aslSrjg9ejhWX4hkXwHRhw@public.gmane.org> (specifically kirkwood-ds210.dts on DS211j) Hi Ben Thanks for testing. I will fix the gpo and send a v2 sometime. I should also check if there are any more gpo's i have as gpio's. > To get running on the stock bootloader, I needed to extend the > initramfs to fill the entire rd.gz flash partition, configure the > kernel to use the dtb appended to it, configure it to ignore the > information passed to it by the bootloader, and add the following > nodes to the dts: > > /chosen { > linux,initrd-start = <0x800040>; > linux,initrd-end = <0x940000>; > }; Do you know why these initrd properties are needed? There is only one other board in mainline that requires this. I also wonder what implications this has. u-boot has the capability of reading the initrd from disc to RAM and passing its location to the kernel. By hard coding these values, are we blocking that? Thanks Andrew -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <20140109165557.GB9681-g2DYL2Zd6BY@public.gmane.org>]
* Re: [PATCH RFC RFT 0/2] ARM: Kirkwood: Synology DT files [not found] ` <20140109165557.GB9681-g2DYL2Zd6BY@public.gmane.org> @ 2014-01-10 1:01 ` Ben Peddell [not found] ` <52CF4652.3030207-aslSrjg9ejhWX4hkXwHRhw@public.gmane.org> 0 siblings, 1 reply; 16+ messages in thread From: Ben Peddell @ 2014-01-10 1:01 UTC (permalink / raw) To: Andrew Lunn; +Cc: Jason Cooper, devicetree-u79uwXL29TY76Z2rM5mHXA, linux ARM On Thu, Jan 09, 2014 at 05:55:57PM +0100, Andrew Lunn wrote: > On Thu, Jan 09, 2014 at 03:18:35PM +1000, Ben Peddell wrote: >> On 07/01/14 09:47, Andrew Lunn wrote: >>> Request for Testing: >>> >>> This patch adds support for around 30 different boards. Most .dts >>> files support a couple of different models. I don't have any of this >>> hardware. None of this is tested. >> >> Tested by Ben Peddell <klightspeed-aslSrjg9ejhWX4hkXwHRhw@public.gmane.org> (specifically kirkwood-ds210.dts on DS211j) > > Hi Ben > > Thanks for testing. I will fix the gpo and send a v2 sometime. I > should also check if there are any more gpo's i have as gpio's. There are only a few pins that are GPOs - from marvell,kirkwood-pinctrl.txt, they are 1, 2, 3, 5, 7, 10, 18, 19 and 33. > >> To get running on the stock bootloader, I needed to extend the >> initramfs to fill the entire rd.gz flash partition, configure the >> kernel to use the dtb appended to it, configure it to ignore the >> information passed to it by the bootloader, and add the following >> nodes to the dts: >> >> /chosen { >> linux,initrd-start = <0x800040>; >> linux,initrd-end = <0x940000>; >> }; > > Do you know why these initrd properties are needed? There is only one > other board in mainline that requires this. I also wonder what > implications this has. u-boot has the capability of reading the initrd > from disc to RAM and passing its location to the kernel. By hard > coding these values, are we blocking that? The stock Marvell bootloader is a little broken as it passes the kernel the _source_ address of the initrd rather than the _load_ address. Thus the bootloader passes the address 0xf8280040 rather than the address 0x00800040. It appears the initrd address in the devicetree structure (which is filled in from what is passed by the bootloader when CONFIG_ARM_ATAG_DTB_COMPAT is set) is processed _after_ the address in the initrd= kernel parameter is processed. Rather than putting the initrd address into the DTS, it would probably be better to have the person compiling the kernel configure it with e.g.: CONFIG_CMDLINE="initrd=0x00800040,0x0013FFC0 earlyprintk panic=5" CONFIG_CMDLINE_EXTEND=y CONFIG_ARM_APPENDED_DTB=y CONFIG_ARM_ATAG_DTB_COMPAT=n -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <52CF4652.3030207-aslSrjg9ejhWX4hkXwHRhw@public.gmane.org>]
* Re: [PATCH RFC RFT 0/2] ARM: Kirkwood: Synology DT files [not found] ` <52CF4652.3030207-aslSrjg9ejhWX4hkXwHRhw@public.gmane.org> @ 2014-01-10 11:28 ` Russell King - ARM Linux [not found] ` <20140110112846.GG27432-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org> 0 siblings, 1 reply; 16+ messages in thread From: Russell King - ARM Linux @ 2014-01-10 11:28 UTC (permalink / raw) To: Ben Peddell Cc: Andrew Lunn, devicetree-u79uwXL29TY76Z2rM5mHXA, Jason Cooper, linux ARM On Fri, Jan 10, 2014 at 11:01:06AM +1000, Ben Peddell wrote: > It appears the initrd address in the devicetree structure (which is > filled in from what is passed by the bootloader when > CONFIG_ARM_ATAG_DTB_COMPAT is set) is processed _after_ the address in > the initrd= kernel parameter is processed. That's wrong. Kernel parameters should always override what's passed by boot loaders etc. -- 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". -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <20140110112846.GG27432-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>]
* Re: [PATCH RFC RFT 0/2] ARM: Kirkwood: Synology DT files [not found] ` <20140110112846.GG27432-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org> @ 2014-01-10 14:09 ` Ben Peddell [not found] ` <52CFFF07.5080806-aslSrjg9ejhWX4hkXwHRhw@public.gmane.org> 0 siblings, 1 reply; 16+ messages in thread From: Ben Peddell @ 2014-01-10 14:09 UTC (permalink / raw) To: Russell King - ARM Linux Cc: Andrew Lunn, devicetree-u79uwXL29TY76Z2rM5mHXA, Jason Cooper, linux ARM On 10/01/14 21:28, Russell King - ARM Linux wrote: > On Fri, Jan 10, 2014 at 11:01:06AM +1000, Ben Peddell wrote: >> It appears the initrd address in the devicetree structure (which is >> filled in from what is passed by the bootloader when >> CONFIG_ARM_ATAG_DTB_COMPAT is set) is processed _after_ the address in >> the initrd= kernel parameter is processed. > > That's wrong. Kernel parameters should always override what's passed by > boot loaders etc. In that case, what I saw was a bug - note that this only occurs when DeviceTree is enabled: __ __ _ _ | \/ | __ _ _ ____ _____| | | | |\/| |/ _` | '__\ \ / / _ \ | | | | | | (_| | | \ V / __/ | | |_| |_|\__,_|_| \_/ \___|_|_| _ _ ____ _ | | | | | __ ) ___ ___ | |_ | | | |___| _ \ / _ \ / _ \| __| | |_| |___| |_) | (_) | (_) | |_ \___/ |____/ \___/ \___/ \__| ** LOADER ** ** MARVELL BOARD: Synology Disk Station LE U-Boot 1.1.4 (Jul 6 2010 - 19:26:08) Marvell version: 3.4.4 U-Boot code: 00600000 -> 0067FFF0 BSS: -> 0068B43C Soc: 88F6281 A1 (DDR2) CPU running @ 1200Mhz L2 running @ 480Mhz SysClock = 400Mhz , TClock = 200Mhz DRAM CAS Latency = 6 tRP = 6 tRAS = 18 tRCD=6 DRAM CS[0] base 0x00000000 size 128MB DRAM Total size 128MB 16bit width [4096kB@f8000000] Flash: 4 MB Addresses 8M - 0M are saved for the U-Boot usage. Mem malloc Initialization (8M - 7M): Done Using default environment CPU : Marvell Feroceon (Rev 1) Streaming disabled Write allocate disabled Module 1 is AUDIO USB 0: host mode Synology Model: DS211j Fan Status: Good Net: egiga0 [PRIME] Hit any key to stop autoboot: 0 Marvell>> setenv ipaddr 192.168.200.62 Marvell>> setenv serverip 192.168.200.16 Marvell>> tftp 0x01000000 uImage-3.13-rc7-ds211j-git-fdt Using egiga0 device TFTP from server 192.168.200.16; our IP address is 192.168.200.62 Filename 'uImage-3.13-rc7-ds211j-git-fdt'. Load address: 0x1000000 Loading: ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ######################################################### done Bytes transferred = 1954736 (1dd3b0 hex) Marvell>> setenv bootargs console=ttyS0,115200 ip=off initrd=0x00800040,0x0013FFC0 root=/dev/md0 rw syno_hw_version=DS211j ihd_num=2 netif_num=1 earlyprintk Marvell>> bootm 0x01000000 0xf8280000 ## Booting image at 01000000 ... Bad Magic Number Marvell>> tftp 0x01000000 uImage-3.13-rc7-ds211j-git-fdt Using egiga0 device TFTP from server 192.168.200.16; our IP address is 192.168.200.62 Filename 'uImage-3.13-rc7-ds211j-git-fdt'. Load address: 0x1000000 Loading: ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ######################################################### done Bytes transferred = 1954800 (1dd3f0 hex) Marvell>> bootm 0x01000000 0xf8280000 ## Booting image at 01000000 ... Image Name: linux-3.13-rc7-ds211j+ Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 1954736 Bytes = 1.9 MB Load Address: 00008000 Entry Point: 00008000 Verifying Checksum ... OK OK ## Loading Ramdisk Image at f8280000 ... Image Name: altair-boot Image Type: ARM Linux RAMDisk Image (unknown compression) Data Size: 1022268 Bytes = 998.3 kB Load Address: 00800000 Entry Point: 00800000 Verifying Checksum ... OK Starting kernel ... Uncompressing Linux... done, booting the kernel. [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 3.13.0-rc7-ds211j+ (root@lurch) (gcc version 4.8.2 (Gentoo 4.8.2 p1.3, pie-0.5.8) ) #2 Thu Jan 9 08:52:24 EST 2014 [ 0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977 [ 0.000000] CPU: VIVT data cache, VIVT instruction cache [ 0.000000] Machine model: Synology DS210 v10, v20, v30, DS211j [ 0.000000] bootconsole [earlycon0] enabled [ 0.000000] INITRD: 0xf8280040+0x000f993c is not a memory region - disabling initrd [ 0.000000] Memory policy: Data cache writeback [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512 [ 0.000000] Kernel command line: console=ttyS0,115200 ip=off initrd=0x00800040,0x0013FFC0 root=/dev/md0 rw syno_hw_version=DS211j ihd_num=2 netif_num=1 earlyprintk [ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes) [ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) [ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) [ 0.000000] Memory: 124716K/131072K available (3466K kernel code, 191K rwdata, 1084K rodata, 166K init, 215K bss, 6356K reserved) [ 0.000000] Virtual kernel memory layout: [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) [ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB) [ 0.000000] vmalloc : 0xc8800000 - 0xff000000 ( 872 MB) [ 0.000000] lowmem : 0xc0000000 - 0xc8000000 ( 128 MB) [ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB) [ 0.000000] .text : 0xc0008000 - 0xc0479d6c (4552 kB) [ 0.000000] .init : 0xc047a000 - 0xc04a380c ( 167 kB) [ 0.000000] .data : 0xc04a4000 - 0xc04d3e80 ( 192 kB) [ 0.000000] .bss : 0xc04d3e80 - 0xc0509b30 ( 216 kB) [ 0.000000] NR_IRQS:114 [ 0.000000] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 21474836475ns [ 0.000000] Console: colour dummy device 80x30 [ 0.004804] Calibrating delay loop... 1191.11 BogoMIPS (lpj=5955584) [ 0.092919] pid_max: default: 32768 minimum: 301 [ 0.097708] Mount-cache hash table entries: 512 [ 0.104591] CPU: Testing write buffer coherency: ok [ 0.109822] Setting up static identity map for 0x348060 - 0x3480b8 [ 0.117170] devtmpfs: initialized [ 0.121538] xor: measuring software checksum speed [ 0.220035] arm4regs : 1084.400 MB/sec [ 0.320030] 8regs : 651.200 MB/sec [ 0.420029] 32regs : 901.200 MB/sec [ 0.424280] xor: using function: arm4regs (1084.400 MB/sec) [ 0.429916] pinctrl core: initialized pinctrl subsystem [ 0.436009] regulator-dummy: no parameters [ 0.440606] NET: Registered protocol family 16 [ 0.445560] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.455243] cpuidle: using governor ladder [ 0.459410] cpuidle: using governor menu [ 0.463559] Kirkwood: MV88F6281-A1, TCLK=0. [ 0.467921] Feroceon L2: Enabling L2 [ 0.471615] Feroceon L2: Cache support initialised, in WT override mode. [ 0.478793] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set [ 0.494565] No ATAGs? [ 0.507801] bio: create slab <bio-0> at 0 [ 0.680061] raid6: int32x1 100 MB/s [ 0.850266] raid6: int32x2 131 MB/s [ 1.020409] raid6: int32x4 123 MB/s [ 1.190124] raid6: int32x8 130 MB/s [ 1.193936] raid6: using algorithm int32x2 (131 MB/s) [ 1.199042] raid6: using intx1 recovery algorithm [ 1.204120] hdd2power: Failed to request enable GPIO31: -517 [ 1.209988] reg-fixed-voltage 1.regulator: Failed to register regulator: -517 [ 1.217197] platform 1.regulator: Driver reg-fixed-voltage requests probe deferral [ 1.225708] SCSI subsystem initialized [ 1.231520] Switched to clocksource orion_clocksource [ 1.249315] NET: Registered protocol family 2 [ 1.254161] TCP established hash table entries: 1024 (order: 0, 4096 bytes) [ 1.261187] TCP bind hash table entries: 1024 (order: 0, 4096 bytes) [ 1.267625] TCP: Hash tables configured (established 1024 bind 1024) [ 1.274087] TCP: reno registered [ 1.277385] UDP hash table entries: 256 (order: 0, 4096 bytes) [ 1.283303] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) [ 1.289768] NET: Registered protocol family 1 [ 1.294402] RPC: Registered named UNIX socket transport module. [ 1.300373] RPC: Registered udp transport module. [ 1.305150] RPC: Registered tcp transport module. [ 1.309911] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 1.316588] Trying to unpack rootfs image as initramfs... [ 1.322063] Unable to handle kernel paging request at virtual address b8280040 [ 1.329334] pgd = c0004000 [ 1.332118] [b8280040] *pgd=00000000 [ 1.335766] Internal error: Oops: 5 [#1] ARM [ 1.340098] Modules linked in: [ 1.343232] CPU: 0 PID: 1 Comm: swapper Not tainted 3.13.0-rc7-ds211j+ #2 [ 1.350072] task: c7839bc0 ti: c783a000 task.ti: c783a000 [ 1.355529] PC is at unpack_to_rootfs+0xa8/0x2b0 [ 1.360206] LR is at unpack_to_rootfs+0x44/0x2b0 [ 1.364883] pc : [<c047c998>] lr : [<c047c934>] psr: 20000053 [ 1.364883] sp : c783be40 ip : 000008d8 fp : 00000000 [ 1.376474] r10: 00000000 r9 : 00000068 r8 : c047d020 [ 1.381755] r7 : c049d068 r6 : b8280040 r5 : 000f993c r4 : c049d068 [ 1.388329] r3 : 00000000 r2 : 00000000 r1 : 00000000 r0 : c7924000 [ 1.394905] Flags: nzCv IRQs on FIQs off Mode SVC_32 ISA ARM Segment kernel [ 1.402343] Control: 0005397f Table: 00004000 DAC: 00000017 [ 1.408140] Process swapper (pid: 1, stack limit = 0xc783a1c0) [ 1.414024] Stack: (0xc783be40 to 0xc783c000) [ 1.418446] be40: 00000000 c04a34fc c04d3f00 c047d020 00000000 00000000 c04d3f4c c0343368 [ 1.426671] be60: c03f85f6 c04d3f50 00000000 c04a34fc c04d3f00 c047d020 00000068 c04d3f50 [ 1.434897] be80: c04d3f4c c047d074 ffffffff 00000000 c04c1b5c c04fffc4 c04c1b5c c049023c [ 1.443121] bea0: 00000068 00000000 c783a038 c0343368 c041909f c783becc 00000020 c783becc [ 1.451346] bec0: 00000000 c049031c c041909f 00000000 00000020 00000005 c049bbc8 c04a34fc [ 1.459572] bee0: c04d3f00 c047d020 00000068 00000000 c783a038 c000869c c782b6a0 c00d89c0 [ 1.467797] bf00: c782b700 c782b6a0 00000000 c782b6a0 c034c50c c04f7914 00000000 c00d8c5c [ 1.476023] bf20: 00000068 c060edf7 00000000 c0031dc8 60000053 c0457d84 c0457704 00000068 [ 1.484247] bf40: 00000005 00000005 00000001 00000005 c049bbc8 c04a34fc c04d3f00 c04d3f00 [ 1.492473] bf60: 00000068 c049bbd8 00000000 c047ab14 00000005 00000005 c047a478 c002f124 [ 1.500697] bf80: 00000000 00000000 00000000 c0340fb4 00000000 00000000 00000000 00000000 [ 1.508923] bfa0: 00000000 c0340fbc 00000000 c000e050 00000000 00000000 00000000 00000000 [ 1.517147] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 1.525373] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000 [ 1.533606] [<c047c998>] (unpack_to_rootfs+0xa8/0x2b0) from [<c047d074>] (populate_rootfs+0x54/0x224) [ 1.542873] [<c047d074>] (populate_rootfs+0x54/0x224) from [<c000869c>] (do_one_initcall+0x94/0x13c) [ 1.552055] [<c000869c>] (do_one_initcall+0x94/0x13c) from [<c047ab14>] (kernel_init_freeable+0xf8/0x1b8) [ 1.561671] [<c047ab14>] (kernel_init_freeable+0xf8/0x1b8) from [<c0340fbc>] (kernel_init+0x8/0x100) [ 1.570852] [<c0340fbc>] (kernel_init+0x8/0x100) from [<c000e050>] (ret_from_fork+0x14/0x24) [ 1.579339] Code: 1a000056 e3550000 0a000054 e1c7a1d0 (e5d63000) [ 1.585525] ---[ end trace 4e31448959d8cde7 ]--- [ 1.590212] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b [ 1.590212] -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <52CFFF07.5080806-aslSrjg9ejhWX4hkXwHRhw@public.gmane.org>]
* Re: [PATCH RFC RFT 0/2] ARM: Kirkwood: Synology DT files [not found] ` <52CFFF07.5080806-aslSrjg9ejhWX4hkXwHRhw@public.gmane.org> @ 2014-01-10 14:25 ` Andrew Lunn [not found] ` <20140110142548.GG9681-g2DYL2Zd6BY@public.gmane.org> 0 siblings, 1 reply; 16+ messages in thread From: Andrew Lunn @ 2014-01-10 14:25 UTC (permalink / raw) To: Ben Peddell Cc: Russell King - ARM Linux, Andrew Lunn, Jason Cooper, linux ARM, devicetree-u79uwXL29TY76Z2rM5mHXA On Sat, Jan 11, 2014 at 12:09:11AM +1000, Ben Peddell wrote: > On 10/01/14 21:28, Russell King - ARM Linux wrote: > > On Fri, Jan 10, 2014 at 11:01:06AM +1000, Ben Peddell wrote: > >> It appears the initrd address in the devicetree structure (which is > >> filled in from what is passed by the bootloader when > >> CONFIG_ARM_ATAG_DTB_COMPAT is set) is processed _after_ the address in > >> the initrd= kernel parameter is processed. > > > > That's wrong. Kernel parameters should always override what's passed by > > boot loaders etc. > > In that case, what I saw was a bug - note that this only occurs when > DeviceTree is enabled: > > > __ __ _ _ > | \/ | __ _ _ ____ _____| | | > | |\/| |/ _` | '__\ \ / / _ \ | | > | | | | (_| | | \ V / __/ | | > |_| |_|\__,_|_| \_/ \___|_|_| > _ _ ____ _ > | | | | | __ ) ___ ___ | |_ > | | | |___| _ \ / _ \ / _ \| __| > | |_| |___| |_) | (_) | (_) | |_ > \___/ |____/ \___/ \___/ \__| ** LOADER ** > ** MARVELL BOARD: Synology Disk Station LE > > U-Boot 1.1.4 (Jul 6 2010 - 19:26:08) Marvell version: 3.4.4 > > U-Boot code: 00600000 -> 0067FFF0 BSS: -> 0068B43C > > Soc: 88F6281 A1 (DDR2) > CPU running @ 1200Mhz L2 running @ 480Mhz > SysClock = 400Mhz , TClock = 200Mhz > > DRAM CAS Latency = 6 tRP = 6 tRAS = 18 tRCD=6 > DRAM CS[0] base 0x00000000 size 128MB > DRAM Total size 128MB 16bit width > [4096kB@f8000000] Flash: 4 MB > Addresses 8M - 0M are saved for the U-Boot usage. > Mem malloc Initialization (8M - 7M): Done > Using default environment > > > CPU : Marvell Feroceon (Rev 1) > > Streaming disabled > Write allocate disabled > > Module 1 is AUDIO > > USB 0: host mode > > Synology Model: DS211j > Fan Status: Good > > Net: egiga0 [PRIME] > Hit any key to stop autoboot: 0 > Marvell>> setenv ipaddr 192.168.200.62 > Marvell>> setenv serverip 192.168.200.16 > Marvell>> tftp 0x01000000 uImage-3.13-rc7-ds211j-git-fdt > Using egiga0 device > TFTP from server 192.168.200.16; our IP address is 192.168.200.62 > Filename 'uImage-3.13-rc7-ds211j-git-fdt'. > Load address: 0x1000000 > Loading: ################################################################# > ################################################################# > ################################################################# > ################################################################# > ################################################################# > ######################################################### > done So here you load the kernel into RAM at 0x0100 0000. > Bytes transferred = 1954736 (1dd3b0 hex) > Marvell>> setenv bootargs console=ttyS0,115200 ip=off initrd=0x00800040,0x0013FFC0 root=/dev/md0 rw syno_hw_version=DS211j ihd_num=2 netif_num=1 earlyprintk I don't see you loading the initrd into RAM at 0x0080 0000. > Marvell>> bootm 0x01000000 0xf8280000 And here you tell it the initrd is at 0xf8280000. > ## Booting image at 01000000 ... > Bad Magic Number > Marvell>> tftp 0x01000000 uImage-3.13-rc7-ds211j-git-fdt > Using egiga0 device > TFTP from server 192.168.200.16; our IP address is 192.168.200.62 > Filename 'uImage-3.13-rc7-ds211j-git-fdt'. > Load address: 0x1000000 > Loading: ################################################################# > ################################################################# > ################################################################# > ################################################################# > ################################################################# > ######################################################### > done > Bytes transferred = 1954800 (1dd3f0 hex) > Marvell>> bootm 0x01000000 0xf8280000 > ## Booting image at 01000000 ... > Image Name: linux-3.13-rc7-ds211j+ > Image Type: ARM Linux Kernel Image (uncompressed) > Data Size: 1954736 Bytes = 1.9 MB > Load Address: 00008000 > Entry Point: 00008000 > Verifying Checksum ... OK > OK > ## Loading Ramdisk Image at f8280000 ... > Image Name: altair-boot > Image Type: ARM Linux RAMDisk Image (unknown compression) > Data Size: 1022268 Bytes = 998.3 kB > Load Address: 00800000 > Entry Point: 00800000 > Verifying Checksum ... OK > > Starting kernel ... > > Uncompressing Linux... done, booting the kernel. > [ 0.000000] Booting Linux on physical CPU 0x0 > [ 0.000000] Linux version 3.13.0-rc7-ds211j+ (root@lurch) (gcc version 4.8.2 (Gentoo 4.8.2 p1.3, pie-0.5.8) ) #2 Thu Jan 9 08:52:24 EST 2014 > [ 0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977 > [ 0.000000] CPU: VIVT data cache, VIVT instruction cache > [ 0.000000] Machine model: Synology DS210 v10, v20, v30, DS211j > [ 0.000000] bootconsole [earlycon0] enabled > [ 0.000000] INITRD: 0xf8280040+0x000f993c is not a memory region - disabling initrd The kernel is correct. There is no RAM here. That is in the IOMEM space. Andrew -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <20140110142548.GG9681-g2DYL2Zd6BY@public.gmane.org>]
* Re: [PATCH RFC RFT 0/2] ARM: Kirkwood: Synology DT files [not found] ` <20140110142548.GG9681-g2DYL2Zd6BY@public.gmane.org> @ 2014-01-10 14:37 ` Sebastian Hesselbarth 2014-01-10 14:38 ` Ben Peddell 2014-01-10 14:58 ` Russell King - ARM Linux 2 siblings, 0 replies; 16+ messages in thread From: Sebastian Hesselbarth @ 2014-01-10 14:37 UTC (permalink / raw) To: Andrew Lunn, Ben Peddell Cc: Russell King - ARM Linux, Jason Cooper, linux ARM, devicetree-u79uwXL29TY76Z2rM5mHXA On 01/10/14 15:25, Andrew Lunn wrote: > On Sat, Jan 11, 2014 at 12:09:11AM +1000, Ben Peddell wrote: >> ** MARVELL BOARD: Synology Disk Station LE >> >> U-Boot 1.1.4 (Jul 6 2010 - 19:26:08) Marvell version: 3.4.4 >> >> U-Boot code: 00600000 -> 0067FFF0 BSS: -> 0068B43C >> >> Soc: 88F6281 A1 (DDR2) >> CPU running @ 1200Mhz L2 running @ 480Mhz >> SysClock = 400Mhz , TClock = 200Mhz >> >> DRAM CAS Latency = 6 tRP = 6 tRAS = 18 tRCD=6 >> DRAM CS[0] base 0x00000000 size 128MB >> DRAM Total size 128MB 16bit width >> [4096kB@f8000000] Flash: 4 MB ... >> Uncompressing Linux... done, booting the kernel. >> [ 0.000000] Booting Linux on physical CPU 0x0 >> [ 0.000000] Linux version 3.13.0-rc7-ds211j+ (root@lurch) (gcc version 4.8.2 (Gentoo 4.8.2 p1.3, pie-0.5.8) ) #2 Thu Jan 9 08:52:24 EST 2014 >> [ 0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977 >> [ 0.000000] CPU: VIVT data cache, VIVT instruction cache >> [ 0.000000] Machine model: Synology DS210 v10, v20, v30, DS211j >> [ 0.000000] bootconsole [earlycon0] enabled >> [ 0.000000] INITRD: 0xf8280040+0x000f993c is not a memory region - disabling initrd > > The kernel is correct. There is no RAM here. That is in the IOMEM > space. Looks like a dirty trick to mount the initrd directly from the boot device remap which is at 0xf8000000 by default. Copying the image from the boot device to ram in u-boot and pass the correct initrd address should help here. Or we need a mbus ranges entry for it, too. Sebastian -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH RFC RFT 0/2] ARM: Kirkwood: Synology DT files [not found] ` <20140110142548.GG9681-g2DYL2Zd6BY@public.gmane.org> 2014-01-10 14:37 ` Sebastian Hesselbarth @ 2014-01-10 14:38 ` Ben Peddell 2014-01-10 14:43 ` Andrew Lunn 2014-01-10 14:58 ` Russell King - ARM Linux 2 siblings, 1 reply; 16+ messages in thread From: Ben Peddell @ 2014-01-10 14:38 UTC (permalink / raw) To: Andrew Lunn Cc: Russell King - ARM Linux, Jason Cooper, linux ARM, devicetree-u79uwXL29TY76Z2rM5mHXA On 11/01/14 00:25, Andrew Lunn wrote: > On Sat, Jan 11, 2014 at 12:09:11AM +1000, Ben Peddell wrote: >> On 10/01/14 21:28, Russell King - ARM Linux wrote: >>> On Fri, Jan 10, 2014 at 11:01:06AM +1000, Ben Peddell wrote: >>>> It appears the initrd address in the devicetree structure (which is >>>> filled in from what is passed by the bootloader when >>>> CONFIG_ARM_ATAG_DTB_COMPAT is set) is processed _after_ the address in >>>> the initrd= kernel parameter is processed. >>> >>> That's wrong. Kernel parameters should always override what's passed by >>> boot loaders etc. >> >> In that case, what I saw was a bug - note that this only occurs when >> DeviceTree is enabled: >> >> >> __ __ _ _ >> | \/ | __ _ _ ____ _____| | | >> | |\/| |/ _` | '__\ \ / / _ \ | | >> | | | | (_| | | \ V / __/ | | >> |_| |_|\__,_|_| \_/ \___|_|_| >> _ _ ____ _ >> | | | | | __ ) ___ ___ | |_ >> | | | |___| _ \ / _ \ / _ \| __| >> | |_| |___| |_) | (_) | (_) | |_ >> \___/ |____/ \___/ \___/ \__| ** LOADER ** >> ** MARVELL BOARD: Synology Disk Station LE >> >> U-Boot 1.1.4 (Jul 6 2010 - 19:26:08) Marvell version: 3.4.4 >> >> U-Boot code: 00600000 -> 0067FFF0 BSS: -> 0068B43C >> >> Soc: 88F6281 A1 (DDR2) >> CPU running @ 1200Mhz L2 running @ 480Mhz >> SysClock = 400Mhz , TClock = 200Mhz >> >> DRAM CAS Latency = 6 tRP = 6 tRAS = 18 tRCD=6 >> DRAM CS[0] base 0x00000000 size 128MB >> DRAM Total size 128MB 16bit width >> [4096kB@f8000000] Flash: 4 MB >> Addresses 8M - 0M are saved for the U-Boot usage. >> Mem malloc Initialization (8M - 7M): Done >> Using default environment >> >> >> CPU : Marvell Feroceon (Rev 1) >> >> Streaming disabled >> Write allocate disabled >> >> Module 1 is AUDIO >> >> USB 0: host mode >> >> Synology Model: DS211j >> Fan Status: Good >> >> Net: egiga0 [PRIME] >> Hit any key to stop autoboot: 0 >> Marvell>> setenv ipaddr 192.168.200.62 >> Marvell>> setenv serverip 192.168.200.16 >> Marvell>> tftp 0x01000000 uImage-3.13-rc7-ds211j-git-fdt >> Using egiga0 device >> TFTP from server 192.168.200.16; our IP address is 192.168.200.62 >> Filename 'uImage-3.13-rc7-ds211j-git-fdt'. >> Load address: 0x1000000 >> Loading: ################################################################# >> ################################################################# >> ################################################################# >> ################################################################# >> ################################################################# >> ######################################################### >> done > > So here you load the kernel into RAM at 0x0100 0000. > > >> Bytes transferred = 1954736 (1dd3b0 hex) >> Marvell>> setenv bootargs console=ttyS0,115200 ip=off initrd=0x00800040,0x0013FFC0 root=/dev/md0 rw syno_hw_version=DS211j ihd_num=2 netif_num=1 earlyprintk > > I don't see you loading the initrd into RAM at 0x0080 0000. See below > >> Marvell>> bootm 0x01000000 0xf8280000 > > And here you tell it the initrd is at 0xf8280000. This is because I am using the initrd in flash. > >> ## Booting image at 01000000 ... >> Bad Magic Number >> Marvell>> tftp 0x01000000 uImage-3.13-rc7-ds211j-git-fdt >> Using egiga0 device >> TFTP from server 192.168.200.16; our IP address is 192.168.200.62 >> Filename 'uImage-3.13-rc7-ds211j-git-fdt'. >> Load address: 0x1000000 >> Loading: ################################################################# >> ################################################################# >> ################################################################# >> ################################################################# >> ################################################################# >> ######################################################### >> done >> Bytes transferred = 1954800 (1dd3f0 hex) >> Marvell>> bootm 0x01000000 0xf8280000 >> ## Booting image at 01000000 ... >> Image Name: linux-3.13-rc7-ds211j+ >> Image Type: ARM Linux Kernel Image (uncompressed) >> Data Size: 1954736 Bytes = 1.9 MB >> Load Address: 00008000 >> Entry Point: 00008000 >> Verifying Checksum ... OK >> OK >> ## Loading Ramdisk Image at f8280000 ... >> Image Name: altair-boot >> Image Type: ARM Linux RAMDisk Image (unknown compression) >> Data Size: 1022268 Bytes = 998.3 kB >> Load Address: 00800000 >> Entry Point: 00800000 >> Verifying Checksum ... OK Here the bootloader copies the initrd to 0x00800040, yet passes 0xf8280040 to the kernel. >> >> Starting kernel ... >> >> Uncompressing Linux... done, booting the kernel. >> [ 0.000000] Booting Linux on physical CPU 0x0 >> [ 0.000000] Linux version 3.13.0-rc7-ds211j+ (root@lurch) (gcc version 4.8.2 (Gentoo 4.8.2 p1.3, pie-0.5.8) ) #2 Thu Jan 9 08:52:24 EST 2014 >> [ 0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977 >> [ 0.000000] CPU: VIVT data cache, VIVT instruction cache >> [ 0.000000] Machine model: Synology DS210 v10, v20, v30, DS211j >> [ 0.000000] bootconsole [earlycon0] enabled >> [ 0.000000] INITRD: 0xf8280040+0x000f993c is not a memory region - disabling initrd > > The kernel is correct. There is no RAM here. That is in the IOMEM > space. -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH RFC RFT 0/2] ARM: Kirkwood: Synology DT files 2014-01-10 14:38 ` Ben Peddell @ 2014-01-10 14:43 ` Andrew Lunn [not found] ` <20140110144346.GH9681-g2DYL2Zd6BY@public.gmane.org> 0 siblings, 1 reply; 16+ messages in thread From: Andrew Lunn @ 2014-01-10 14:43 UTC (permalink / raw) To: Ben Peddell Cc: Andrew Lunn, Russell King - ARM Linux, Jason Cooper, linux ARM, devicetree On Sat, Jan 11, 2014 at 12:38:25AM +1000, Ben Peddell wrote: > On 11/01/14 00:25, Andrew Lunn wrote: > > On Sat, Jan 11, 2014 at 12:09:11AM +1000, Ben Peddell wrote: > >> On 10/01/14 21:28, Russell King - ARM Linux wrote: > >>> On Fri, Jan 10, 2014 at 11:01:06AM +1000, Ben Peddell wrote: > >>>> It appears the initrd address in the devicetree structure (which is > >>>> filled in from what is passed by the bootloader when > >>>> CONFIG_ARM_ATAG_DTB_COMPAT is set) is processed _after_ the address in > >>>> the initrd= kernel parameter is processed. > >>> > >>> That's wrong. Kernel parameters should always override what's passed by > >>> boot loaders etc. > >> > >> In that case, what I saw was a bug - note that this only occurs when > >> DeviceTree is enabled: > >> > >> > >> __ __ _ _ > >> | \/ | __ _ _ ____ _____| | | > >> | |\/| |/ _` | '__\ \ / / _ \ | | > >> | | | | (_| | | \ V / __/ | | > >> |_| |_|\__,_|_| \_/ \___|_|_| > >> _ _ ____ _ > >> | | | | | __ ) ___ ___ | |_ > >> | | | |___| _ \ / _ \ / _ \| __| > >> | |_| |___| |_) | (_) | (_) | |_ > >> \___/ |____/ \___/ \___/ \__| ** LOADER ** > >> ** MARVELL BOARD: Synology Disk Station LE > >> > >> U-Boot 1.1.4 (Jul 6 2010 - 19:26:08) Marvell version: 3.4.4 > >> > >> U-Boot code: 00600000 -> 0067FFF0 BSS: -> 0068B43C > >> > >> Soc: 88F6281 A1 (DDR2) > >> CPU running @ 1200Mhz L2 running @ 480Mhz > >> SysClock = 400Mhz , TClock = 200Mhz > >> > >> DRAM CAS Latency = 6 tRP = 6 tRAS = 18 tRCD=6 > >> DRAM CS[0] base 0x00000000 size 128MB > >> DRAM Total size 128MB 16bit width > >> [4096kB@f8000000] Flash: 4 MB > >> Addresses 8M - 0M are saved for the U-Boot usage. > >> Mem malloc Initialization (8M - 7M): Done > >> Using default environment > >> > >> > >> CPU : Marvell Feroceon (Rev 1) > >> > >> Streaming disabled > >> Write allocate disabled > >> > >> Module 1 is AUDIO > >> > >> USB 0: host mode > >> > >> Synology Model: DS211j > >> Fan Status: Good > >> > >> Net: egiga0 [PRIME] > >> Hit any key to stop autoboot: 0 > >> Marvell>> setenv ipaddr 192.168.200.62 > >> Marvell>> setenv serverip 192.168.200.16 > >> Marvell>> tftp 0x01000000 uImage-3.13-rc7-ds211j-git-fdt > >> Using egiga0 device > >> TFTP from server 192.168.200.16; our IP address is 192.168.200.62 > >> Filename 'uImage-3.13-rc7-ds211j-git-fdt'. > >> Load address: 0x1000000 > >> Loading: ################################################################# > >> ################################################################# > >> ################################################################# > >> ################################################################# > >> ################################################################# > >> ######################################################### > >> done > > > > So here you load the kernel into RAM at 0x0100 0000. > > > > > >> Bytes transferred = 1954736 (1dd3b0 hex) > >> Marvell>> setenv bootargs console=ttyS0,115200 ip=off initrd=0x00800040,0x0013FFC0 root=/dev/md0 rw syno_hw_version=DS211j ihd_num=2 netif_num=1 earlyprintk > > > > I don't see you loading the initrd into RAM at 0x0080 0000. > > See below > > > > >> Marvell>> bootm 0x01000000 0xf8280000 > > > > And here you tell it the initrd is at 0xf8280000. > > This is because I am using the initrd in flash. > > > > >> ## Booting image at 01000000 ... > >> Bad Magic Number > >> Marvell>> tftp 0x01000000 uImage-3.13-rc7-ds211j-git-fdt > >> Using egiga0 device > >> TFTP from server 192.168.200.16; our IP address is 192.168.200.62 > >> Filename 'uImage-3.13-rc7-ds211j-git-fdt'. > >> Load address: 0x1000000 > >> Loading: ################################################################# > >> ################################################################# > >> ################################################################# > >> ################################################################# > >> ################################################################# > >> ######################################################### > >> done > >> Bytes transferred = 1954800 (1dd3f0 hex) > >> Marvell>> bootm 0x01000000 0xf8280000 > >> ## Booting image at 01000000 ... > >> Image Name: linux-3.13-rc7-ds211j+ > >> Image Type: ARM Linux Kernel Image (uncompressed) > >> Data Size: 1954736 Bytes = 1.9 MB > >> Load Address: 00008000 > >> Entry Point: 00008000 > >> Verifying Checksum ... OK > >> OK > >> ## Loading Ramdisk Image at f8280000 ... > >> Image Name: altair-boot > >> Image Type: ARM Linux RAMDisk Image (unknown compression) > >> Data Size: 1022268 Bytes = 998.3 kB > >> Load Address: 00800000 > >> Entry Point: 00800000 > >> Verifying Checksum ... OK > > Here the bootloader copies the initrd to 0x00800040, yet passes > 0xf8280040 to the kernel. But does it pass 0xf8280040 because you used: bootm 0x01000000 0xf8280000 What happens if you use bootm 0x01000000 0x00800000 Andrew ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <20140110144346.GH9681-g2DYL2Zd6BY@public.gmane.org>]
* Re: [PATCH RFC RFT 0/2] ARM: Kirkwood: Synology DT files [not found] ` <20140110144346.GH9681-g2DYL2Zd6BY@public.gmane.org> @ 2014-01-10 15:10 ` Ben Peddell 0 siblings, 0 replies; 16+ messages in thread From: Ben Peddell @ 2014-01-10 15:10 UTC (permalink / raw) To: Andrew Lunn Cc: Russell King - ARM Linux, Jason Cooper, linux ARM, devicetree-u79uwXL29TY76Z2rM5mHXA On 11/01/14 00:43, Andrew Lunn wrote: > On Sat, Jan 11, 2014 at 12:38:25AM +1000, Ben Peddell wrote: >> On 11/01/14 00:25, Andrew Lunn wrote: >>> On Sat, Jan 11, 2014 at 12:09:11AM +1000, Ben Peddell wrote: >>>> On 10/01/14 21:28, Russell King - ARM Linux wrote: >>>>> On Fri, Jan 10, 2014 at 11:01:06AM +1000, Ben Peddell wrote: >>>>>> It appears the initrd address in the devicetree structure (which is >>>>>> filled in from what is passed by the bootloader when >>>>>> CONFIG_ARM_ATAG_DTB_COMPAT is set) is processed _after_ the address in >>>>>> the initrd= kernel parameter is processed. >>>>> >>>>> That's wrong. Kernel parameters should always override what's passed by >>>>> boot loaders etc. >>>> >>>> In that case, what I saw was a bug - note that this only occurs when >>>> DeviceTree is enabled: >>>> >>>> >>>> __ __ _ _ >>>> | \/ | __ _ _ ____ _____| | | >>>> | |\/| |/ _` | '__\ \ / / _ \ | | >>>> | | | | (_| | | \ V / __/ | | >>>> |_| |_|\__,_|_| \_/ \___|_|_| >>>> _ _ ____ _ >>>> | | | | | __ ) ___ ___ | |_ >>>> | | | |___| _ \ / _ \ / _ \| __| >>>> | |_| |___| |_) | (_) | (_) | |_ >>>> \___/ |____/ \___/ \___/ \__| ** LOADER ** >>>> ** MARVELL BOARD: Synology Disk Station LE >>>> >>>> U-Boot 1.1.4 (Jul 6 2010 - 19:26:08) Marvell version: 3.4.4 >>>> >>>> U-Boot code: 00600000 -> 0067FFF0 BSS: -> 0068B43C >>>> >>>> Soc: 88F6281 A1 (DDR2) >>>> CPU running @ 1200Mhz L2 running @ 480Mhz >>>> SysClock = 400Mhz , TClock = 200Mhz >>>> >>>> DRAM CAS Latency = 6 tRP = 6 tRAS = 18 tRCD=6 >>>> DRAM CS[0] base 0x00000000 size 128MB >>>> DRAM Total size 128MB 16bit width >>>> [4096kB@f8000000] Flash: 4 MB >>>> Addresses 8M - 0M are saved for the U-Boot usage. >>>> Mem malloc Initialization (8M - 7M): Done >>>> Using default environment >>>> >>>> >>>> CPU : Marvell Feroceon (Rev 1) >>>> >>>> Streaming disabled >>>> Write allocate disabled >>>> >>>> Module 1 is AUDIO >>>> >>>> USB 0: host mode >>>> >>>> Synology Model: DS211j >>>> Fan Status: Good >>>> >>>> Net: egiga0 [PRIME] >>>> Hit any key to stop autoboot: 0 >>>> Marvell>> setenv ipaddr 192.168.200.62 >>>> Marvell>> setenv serverip 192.168.200.16 >>>> Marvell>> tftp 0x01000000 uImage-3.13-rc7-ds211j-git-fdt >>>> Using egiga0 device >>>> TFTP from server 192.168.200.16; our IP address is 192.168.200.62 >>>> Filename 'uImage-3.13-rc7-ds211j-git-fdt'. >>>> Load address: 0x1000000 >>>> Loading: ################################################################# >>>> ################################################################# >>>> ################################################################# >>>> ################################################################# >>>> ################################################################# >>>> ######################################################### >>>> done >>> >>> So here you load the kernel into RAM at 0x0100 0000. >>> >>> >>>> Bytes transferred = 1954736 (1dd3b0 hex) >>>> Marvell>> setenv bootargs console=ttyS0,115200 ip=off initrd=0x00800040,0x0013FFC0 root=/dev/md0 rw syno_hw_version=DS211j ihd_num=2 netif_num=1 earlyprintk >>> >>> I don't see you loading the initrd into RAM at 0x0080 0000. >> >> See below >> >>> >>>> Marvell>> bootm 0x01000000 0xf8280000 >>> >>> And here you tell it the initrd is at 0xf8280000. >> >> This is because I am using the initrd in flash. >> >>> >>>> ## Booting image at 01000000 ... >>>> Bad Magic Number >>>> Marvell>> tftp 0x01000000 uImage-3.13-rc7-ds211j-git-fdt >>>> Using egiga0 device >>>> TFTP from server 192.168.200.16; our IP address is 192.168.200.62 >>>> Filename 'uImage-3.13-rc7-ds211j-git-fdt'. >>>> Load address: 0x1000000 >>>> Loading: ################################################################# >>>> ################################################################# >>>> ################################################################# >>>> ################################################################# >>>> ################################################################# >>>> ######################################################### >>>> done >>>> Bytes transferred = 1954800 (1dd3f0 hex) >>>> Marvell>> bootm 0x01000000 0xf8280000 >>>> ## Booting image at 01000000 ... >>>> Image Name: linux-3.13-rc7-ds211j+ >>>> Image Type: ARM Linux Kernel Image (uncompressed) >>>> Data Size: 1954736 Bytes = 1.9 MB >>>> Load Address: 00008000 >>>> Entry Point: 00008000 >>>> Verifying Checksum ... OK >>>> OK >>>> ## Loading Ramdisk Image at f8280000 ... >>>> Image Name: altair-boot >>>> Image Type: ARM Linux RAMDisk Image (unknown compression) >>>> Data Size: 1022268 Bytes = 998.3 kB >>>> Load Address: 00800000 >>>> Entry Point: 00800000 >>>> Verifying Checksum ... OK >> >> Here the bootloader copies the initrd to 0x00800040, yet passes >> 0xf8280040 to the kernel. > > But does it pass 0xf8280040 because you used: > > bootm 0x01000000 0xf8280000 > > What happens if you use > > bootm 0x01000000 0x00800000 === Boot without loading ramdisk from TFTP === Marvell>> setenv ipaddr 192.168.200.62 Marvell>> setenv serverip 192.168.200.16 Marvell>> tftp 0x01000000 uImage-3.13-rc7-ds211j-git-fdt Using egiga0 device TFTP from server 192.168.200.16; our IP address is 192.168.200.62 Filename 'uImage-3.13-rc7-ds211j-git-fdt'. Load address: 0x1000000 Loading: ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ############################################################# done Bytes transferred = 1973892 (1e1e84 hex) Marvell>> bootm 0x01000000 0x00800000 ## Booting image at 01000000 ... Image Name: linux-3.13-rc7-ds211j+ Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 1973828 Bytes = 1.9 MB Load Address: 00008000 Entry Point: 00008000 Verifying Checksum ... OK OK ## Loading Ramdisk Image at 00800000 ... Bad Magic Number Bad Header C▒▒ === End of boot === Note below that I have set the following options: CONFIG_CMDLINE="initrd=0x00800040,0x0013FFC0 earlyprintk panic=5" CONFIG_CMDLINE_EXTEND=y CONFIG_ARM_APPENDED_DTB=y CONFIG_ARM_ATAG_DTB_COMPAT=n === Boot with loading ramdisk from TFTP with CONFIG_CMDLINE === Marvell>> setenv ipaddr 192.168.200.62 Marvell>> setenv serverip 192.168.200.16 Marvell>> tftp 0x01000000 uImage-3.13-rc7-ds211j-git-fdt Using egiga0 device TFTP from server 192.168.200.16; our IP address is 192.168.200.62 Filename 'uImage-3.13-rc7-ds211j-git-fdt'. Load address: 0x1000000 Loading: ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ############################################################# done Bytes transferred = 1973892 (1e1e84 hex) Marvell>> tftp 0x00800000 initramfs-20140109 Using egiga0 device TFTP from server 192.168.200.16; our IP address is 192.168.200.62 Filename 'initramfs-20140109'. Load address: 0x800000 Loading: ################################################################# ################################################################# ################################################################# ############################################################## done Bytes transferred = 1310720 (140000 hex) Marvell>> bootm 0x01000000 0x00800000 ## Booting image at 01000000 ... Image Name: linux-3.13-rc7-ds211j+ Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 1973828 Bytes = 1.9 MB Load Address: 00008000 Entry Point: 00008000 Verifying Checksum ... OK OK ## Loading Ramdisk Image at 00800000 ... Image Name: altair-boot Image Type: ARM Linux RAMDisk Image (unknown compression) Data Size: 1310656 Bytes = 1.2 MB Load Address: 00800000 Entry Point: 00800000 Verifying Checksum ... OK Starting kernel ... Uncompressing Linux... done, booting the kernel. [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 3.13.0-rc7-ds211j+ (klightspeed@lurch) (gcc version 4.8.2 (Gentoo 4.8.2 p1.3, pie-0.5.8) ) #1 Fri Jan 10 14:03:45 EST 2014 [ 0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977 [ 0.000000] CPU: VIVT data cache, VIVT instruction cache [ 0.000000] Machine model: Synology DS210 v10, v20, v30, DS211j [ 0.000000] Memory policy: Data cache writeback [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512 [ 0.000000] Kernel command line: console=ttyS0,115200n8 ... -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH RFC RFT 0/2] ARM: Kirkwood: Synology DT files [not found] ` <20140110142548.GG9681-g2DYL2Zd6BY@public.gmane.org> 2014-01-10 14:37 ` Sebastian Hesselbarth 2014-01-10 14:38 ` Ben Peddell @ 2014-01-10 14:58 ` Russell King - ARM Linux [not found] ` <20140110145841.GF15937-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org> 2 siblings, 1 reply; 16+ messages in thread From: Russell King - ARM Linux @ 2014-01-10 14:58 UTC (permalink / raw) To: Andrew Lunn Cc: Ben Peddell, Jason Cooper, linux ARM, devicetree-u79uwXL29TY76Z2rM5mHXA On Fri, Jan 10, 2014 at 03:25:48PM +0100, Andrew Lunn wrote: > On Sat, Jan 11, 2014 at 12:09:11AM +1000, Ben Peddell wrote: > > Bytes transferred = 1954736 (1dd3b0 hex) > > Marvell>> setenv bootargs console=ttyS0,115200 ip=off initrd=0x00800040,0x0013FFC0 root=/dev/md0 rw syno_hw_version=DS211j ihd_num=2 netif_num=1 earlyprintk > > I don't see you loading the initrd into RAM at 0x0080 0000. However, the kernel _is_ being told that the initrd is at 0x00800040. > > Uncompressing Linux... done, booting the kernel. > > [ 0.000000] Booting Linux on physical CPU 0x0 > > [ 0.000000] Linux version 3.13.0-rc7-ds211j+ (root@lurch) (gcc version 4.8.2 (Gentoo 4.8.2 p1.3, pie-0.5.8) ) #2 Thu Jan 9 08:52:24 EST 2014 > > [ 0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977 > > [ 0.000000] CPU: VIVT data cache, VIVT instruction cache > > [ 0.000000] Machine model: Synology DS210 v10, v20, v30, DS211j > > [ 0.000000] bootconsole [earlycon0] enabled > > [ 0.000000] INITRD: 0xf8280040+0x000f993c is not a memory region - disabling initrd > > The kernel is correct. There is no RAM here. That is in the IOMEM > space. But here the kernel has ignored the command line parameter and instead used the one passed via DT. That is not correct - command line parameters must always override ATAGs or DT. (That's irrespective of whether what's actually being asked of the kernel is correct or not - the principle here applies that command line parameters override, and in this case they aren't.) -- 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". -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <20140110145841.GF15937-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>]
* Re: [PATCH RFC RFT 0/2] ARM: Kirkwood: Synology DT files [not found] ` <20140110145841.GF15937-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org> @ 2014-01-10 15:48 ` Ben Peddell 0 siblings, 0 replies; 16+ messages in thread From: Ben Peddell @ 2014-01-10 15:48 UTC (permalink / raw) To: Russell King - ARM Linux, Andrew Lunn Cc: Jason Cooper, linux ARM, devicetree-u79uwXL29TY76Z2rM5mHXA On 11/01/14 00:58, Russell King - ARM Linux wrote: > On Fri, Jan 10, 2014 at 03:25:48PM +0100, Andrew Lunn wrote: >> On Sat, Jan 11, 2014 at 12:09:11AM +1000, Ben Peddell wrote: >>> Bytes transferred = 1954736 (1dd3b0 hex) >>> Marvell>> setenv bootargs console=ttyS0,115200 ip=off initrd=0x00800040,0x0013FFC0 root=/dev/md0 rw syno_hw_version=DS211j ihd_num=2 netif_num=1 earlyprintk >> >> I don't see you loading the initrd into RAM at 0x0080 0000. > > However, the kernel _is_ being told that the initrd is at 0x00800040. > >>> Uncompressing Linux... done, booting the kernel. >>> [ 0.000000] Booting Linux on physical CPU 0x0 >>> [ 0.000000] Linux version 3.13.0-rc7-ds211j+ (root@lurch) (gcc version 4.8.2 (Gentoo 4.8.2 p1.3, pie-0.5.8) ) #2 Thu Jan 9 08:52:24 EST 2014 >>> [ 0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977 >>> [ 0.000000] CPU: VIVT data cache, VIVT instruction cache >>> [ 0.000000] Machine model: Synology DS210 v10, v20, v30, DS211j >>> [ 0.000000] bootconsole [earlycon0] enabled >>> [ 0.000000] INITRD: 0xf8280040+0x000f993c is not a memory region - disabling initrd >> >> The kernel is correct. There is no RAM here. That is in the IOMEM >> space. > > But here the kernel has ignored the command line parameter and instead > used the one passed via DT. That is not correct - command line parameters > must always override ATAGs or DT. > > (That's irrespective of whether what's actually being asked of the kernel > is correct or not - the principle here applies that command line parameters > override, and in this case they aren't.) Uncompressing Linux... done, booting the kernel. [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 3.13.0-rc7-ds211j+ (klightspeed@lurch) (gcc version 4.8.2 (Gentoo 4.8.2 p1.3, pie-0.5.8) ) #4 Sat Jan 11 01:20:05 EST 2014 [ 0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977 [ 0.000000] CPU: VIVT data cache, VIVT instruction cache [ 0.000000] FDT initrd_start=0xf8280040 initrd_end=0xf83c0000 [ 0.000000] Machine model: Synology DS210 v10, v20, v30, DS211j [ 0.000000] bootconsole [earlycon0] enabled [ 0.000000] Kernel Parameter initrd=0x00800040,0x0013ffc0 [ 0.000000] INITRD: 0xf8280040+0x0013ffc0 is not a memory region - disabling initrd ... [ 1.316624] Trying to unpack rootfs image as initramfs... [ 1.322097] Unable to handle kernel paging request at virtual address b8280040 First, FDT fills in initrd_start and initrd_end: --- start drivers/of/fdt.c line 704 early_init_dt_check_for_initrd() --- initrd_start = (unsigned long)__va(start); initrd_end = (unsigned long)__va(end); initrd_below_start_ok = 1; --- end --- Then the initrd parameter is parsed into phys_initrd_start and phys_initrd_size: --- start arch/arm/mm/init.c line 52 early_initrd() --- phys_initrd_start = start; phys_initrd_size = size; --- end --- phys_initrd_start and phys_initrd_size is then overwritten from initrd_start and initrd_end: --- start arch/arm/mm/init.c line 351 arm_memblock_init() --- /* FDT scan will populate initrd_start */ if (initrd_start) { phys_initrd_start = __virt_to_phys(initrd_start); phys_initrd_size = initrd_end - initrd_start; } --- end --- initrd_start and initrd_end are still set, and so unpack_to_rootfs() tries to access it. -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2014-01-10 15:48 UTC | newest] Thread overview: 16+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-01-06 23:47 [PATCH RFC RFT 0/2] ARM: Kirkwood: Synology DT files Andrew Lunn [not found] ` <1389052027-16819-1-git-send-email-andrew-g2DYL2Zd6BY@public.gmane.org> 2014-01-06 23:47 ` [PATCH RFC RFT 1/2] Power: Reset: Generalize qnap-poweroff to with on Synology devices Andrew Lunn 2014-01-06 23:47 ` [PATCH RFC RFT 2/2] ARM: Kirkwood: Add support for many Synology NAS devices Andrew Lunn 2014-01-09 2:05 ` Ben Peddell 2014-01-09 5:18 ` [PATCH RFC RFT 0/2] ARM: Kirkwood: Synology DT files Ben Peddell [not found] ` <52CE312B.3060108-aslSrjg9ejhWX4hkXwHRhw@public.gmane.org> 2014-01-09 16:55 ` Andrew Lunn [not found] ` <20140109165557.GB9681-g2DYL2Zd6BY@public.gmane.org> 2014-01-10 1:01 ` Ben Peddell [not found] ` <52CF4652.3030207-aslSrjg9ejhWX4hkXwHRhw@public.gmane.org> 2014-01-10 11:28 ` Russell King - ARM Linux [not found] ` <20140110112846.GG27432-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org> 2014-01-10 14:09 ` Ben Peddell [not found] ` <52CFFF07.5080806-aslSrjg9ejhWX4hkXwHRhw@public.gmane.org> 2014-01-10 14:25 ` Andrew Lunn [not found] ` <20140110142548.GG9681-g2DYL2Zd6BY@public.gmane.org> 2014-01-10 14:37 ` Sebastian Hesselbarth 2014-01-10 14:38 ` Ben Peddell 2014-01-10 14:43 ` Andrew Lunn [not found] ` <20140110144346.GH9681-g2DYL2Zd6BY@public.gmane.org> 2014-01-10 15:10 ` Ben Peddell 2014-01-10 14:58 ` Russell King - ARM Linux [not found] ` <20140110145841.GF15937-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org> 2014-01-10 15:48 ` Ben Peddell
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).