ARM: Kirkwood: Add DT description of QNAP 419
authorAndrew Lunn <andrew@lunn.ch>
Mon, 6 Jan 2014 22:49:17 +0000 (23:49 +0100)
committerJason Cooper <jason@lakedaemon.net>
Wed, 5 Feb 2014 02:22:07 +0000 (02:22 +0000)
Re-implement the Marvell Kirkwood ts41x-setup.c in DT.

As with the QNAP 119, there are two variants, depending on which SoC
has been used. They differ on Ethernet PHY addresses and number of
PCIe busses.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Ian Campbell <ijc@hellion.org.uk> (kirkwood-ts419-6281.dtb)
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
arch/arm/boot/dts/Makefile
arch/arm/boot/dts/kirkwood-ts419-6281.dts [new file with mode: 0644]
arch/arm/boot/dts/kirkwood-ts419-6282.dts [new file with mode: 0644]
arch/arm/boot/dts/kirkwood-ts419.dtsi [new file with mode: 0644]

index 8535c13a473c5ca525274eaf1e70acb395c7d3a6..cfd364dcf55175d4fc3af135e8ec4e1e7a62dfa3 100644 (file)
@@ -116,7 +116,9 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-b3.dtb \
        kirkwood-sheevaplug-esata.dtb \
        kirkwood-topkick.dtb \
        kirkwood-ts219-6281.dtb \
-       kirkwood-ts219-6282.dtb
+       kirkwood-ts219-6282.dtb \
+       kirkwood-ts419-6281.dtb \
+       kirkwood-ts419-6282.dtb
 dtb-$(CONFIG_ARCH_MARCO) += marco-evb.dtb
 dtb-$(CONFIG_ARCH_MOXART) += moxart-uc7112lx.dtb
 dtb-$(CONFIG_ARCH_MSM) += qcom-msm8660-surf.dtb \
diff --git a/arch/arm/boot/dts/kirkwood-ts419-6281.dts b/arch/arm/boot/dts/kirkwood-ts419-6281.dts
new file mode 100644 (file)
index 0000000..aa22aa8
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * Device Tree file for QNAP TS41X with 6281 SoC
+ *
+ * Copyright (C) 2013, Andrew Lunn <andrew@lunn.ch>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+/dts-v1/;
+
+#include "kirkwood.dtsi"
+#include "kirkwood-6281.dtsi"
+#include "kirkwood-ts219.dtsi"
+#include "kirkwood-ts419.dtsi"
+
+&ethphy0 { reg = <8>; };
+&ethphy1 { reg = <0>; };
diff --git a/arch/arm/boot/dts/kirkwood-ts419-6282.dts b/arch/arm/boot/dts/kirkwood-ts419-6282.dts
new file mode 100644 (file)
index 0000000..d7512d4
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Device Tree file for QNAP TS41X with 6282 SoC
+ *
+ * Copyright (C) 2013, Andrew Lunn <andrew@lunn.ch>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+/dts-v1/;
+
+#include "kirkwood.dtsi"
+#include "kirkwood-6282.dtsi"
+#include "kirkwood-ts219.dtsi"
+#include "kirkwood-ts419.dtsi"
+
+/ {
+       mbus {
+               pcie-controller {
+                       status = "okay";
+
+                       pcie@2,0 {
+                               status = "okay";
+                       };
+               };
+       };
+};
+
+&ethphy0 { reg = <0>; };
+&ethphy1 { reg = <1>; };
diff --git a/arch/arm/boot/dts/kirkwood-ts419.dtsi b/arch/arm/boot/dts/kirkwood-ts419.dtsi
new file mode 100644 (file)
index 0000000..1a9c624
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * Device Tree include file for QNAP TS41X
+ *
+ * Copyright (C) 2013, Andrew Lunn <andrew@lunn.ch>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+/ {
+       model = "QNAP TS419 family";
+       compatible = "qnap,ts419", "marvell,kirkwood";
+
+       ocp@f1000000 {
+               pinctrl: pinctrl@10000 {
+                       pinctrl-names = "default";
+
+                       pmx_USB_copy_button: pmx-USB-copy-button {
+                               marvell,pins = "mpp43";
+                               marvell,function = "gpio";
+                       };
+                       pmx_reset_button: pmx-reset-button {
+                               marvell,pins = "mpp37";
+                               marvell,function = "gpio";
+                       };
+                       /*
+                        * JP1 indicates if an LCD module is installed
+                        * on the serial port (0), or if the port is used
+                        * as a console (1).
+                        */
+                       pmx_jumper_jp1: pmx-jumper_jp1 {
+                               marvell,pins = "mpp45";
+                               marvell,function = "gpio";
+                       };
+
+               };
+       };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               pinctrl-0 = <&pmx_reset_button &pmx_USB_copy_button>;
+               pinctrl-names = "default";
+
+               button@1 {
+                       label = "USB Copy";
+                       linux,code = <KEY_COPY>;
+                       gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
+               };
+               button@2 {
+                       label = "Reset";
+                       linux,code = <KEY_RESTART>;
+                       gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
+               };
+       };
+};
+
+&mdio {
+       status = "okay";
+
+       ethphy1: ethernet-phy@1 {
+               device_type = "ethernet-phy";
+                /* overwrite reg property in board file */
+       };
+};
+
+&eth1 {
+       status = "okay";
+       ethernet1-port@0 {
+               phy-handle = <&ethphy1>;
+       };
+};