Skip to contentSkip to conversation

kirkwood: Add support for IB-NAS6210/6220 using devicetree

PATCH New Simon Baatz 1 participant 2 messages Apr 30, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover kirkwood: Add support for IB-NAS6210/6220 using devicetree

Hi,

the following patch is adding support for the kirkwood-based RaidSonic IB-NAS6210 and IB-NAS6220 boxes. Since these use nand, the patch is based on Jamie Lentin's work for orion_nand devicetree bindings (as suggested by Jason Cooper).

The patch applies on top of Jamie's V5 DNS-320 & DNS-325 patches
(http://lists.infradead.org/pipermail/linux-arm-kernel/2012-April/094739.html)
on top of v3.4-rc5.

Please let me know if I should rebase to somewhere else or if I should structure the patch differently in general.

- Simon

Simon Baatz (1):
ARM: kirkwood: Add support for RaidSonic IB-NAS6210/6220 using
devicetree

 arch/arm/boot/dts/kirkwood-ib62x0.dts |   44 ++++++++++
 arch/arm/mach-kirkwood/Kconfig        |    8 ++
 arch/arm/mach-kirkwood/Makefile       |    1 +
 arch/arm/mach-kirkwood/Makefile.boot  |    1 +
 arch/arm/mach-kirkwood/board-dt.c     |    4 +
 arch/arm/mach-kirkwood/board-ib62x0.c |  143 +++++++++++++++++++++++++++++++++
 arch/arm/mach-kirkwood/common.h       |    6 ++
 7 files changed, 207 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/kirkwood-ib62x0.dts
 create mode 100644 arch/arm/mach-kirkwood/board-ib62x0.c
Signature · 1 line
1.7.5.4
#1 lore raw

PATCH 1/1 ARM: kirkwood: Add support for RaidSonic IB-NAS6210/6220 using devicetree

Add support for the IB-NAS6210 and IB-NAS 6220. Describe as much as currently possible in the devicetree files, including the NAND partitions. Use the partition scheme of the original firmware by default.

Create a board-ib62x0.c for everything else.

---
 arch/arm/boot/dts/kirkwood-ib62x0.dts |   44 ++++++++++
 arch/arm/mach-kirkwood/Kconfig        |    8 ++
 arch/arm/mach-kirkwood/Makefile       |    1 +
 arch/arm/mach-kirkwood/Makefile.boot  |    1 +
 arch/arm/mach-kirkwood/board-dt.c     |    4 +
 arch/arm/mach-kirkwood/board-ib62x0.c |  143 +++++++++++++++++++++++++++++++++
 arch/arm/mach-kirkwood/common.h       |    6 ++
 7 files changed, 207 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boot/dts/kirkwood-ib62x0.dts
 create mode 100644 arch/arm/mach-kirkwood/board-ib62x0.c
arch/arm/boot/dts/kirkwood-ib62x0.dts new file +44 -0
new file mode 100644
index 0000000..ada0f0c
@@ -0,0 +1,44 @@
+/dts-v1/;
+
+/include/ "kirkwood.dtsi"
+
+/ {
+	model = "RaidSonic ICY BOX IB-NAS62x0 (Rev B)";
+	compatible = "raidsonic,ib-nas6210-b", "raidsonic,ib-nas6220-b", "raidsonic,ib-nas6210", "raidsonic,ib-nas6220", "raidsonic,ib-nas62x0",  "mrvl,kirkwood-88f6281", "mrvl,kirkwood";
+
+	memory {
+		device_type = "memory";
+		reg = <0x00000000 0x10000000>;
+	};
+
+	chosen {
+		bootargs = "console=ttyS0,115200n8 earlyprintk";
+	};
+
+	ocp at f1000000 {
+		serial at 12000 {
+			clock-frequency = <200000000>;
+			status = "okay";
+		};
+
+		nand at 3000000 {
+			status = "okay";
+
+			partition at 0 {
+				label = "u-boot";
+				reg = <0x0000000 0x100000>;
+			};
+
+			partition at 100000 {
+				label = "uImage";
+				reg = <0x0100000 0x600000>;
+			};
+
+			partition at 700000 {
+				label = "root";
+				reg = <0x0700000 0xf900000>;
+			};
+
+		};
+	};
+};
arch/arm/mach-kirkwood/Kconfig +8 -0
index 636778e..4daf6ab 100644
@@ -66,6 +66,14 @@ config MACH_DLINK_KIRKWOOD_DT
 	  Kirkwood-based D-Link NASes such as DNS-320 & DNS-325,
 	  using Flattened Device Tree.
 
+config MACH_IB62X0_DT
+	bool "RaidSonic IB-NAS6210, IB-NAS6220 (Flattened Device Tree)"
+	select ARCH_KIRKWOOD_DT
+	help
+	  Say 'Y' here if you want your kernel to support the
+	  RaidSonic IB-NAS6210 & IB-NAS6220 devices, using
+	  Flattened Device Tree.
+
 config MACH_TS219
 	bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS"
 	help
arch/arm/mach-kirkwood/Makefile +1 -0
index 36781b3..c372948 100644
@@ -23,3 +23,4 @@ obj-$(CONFIG_CPU_IDLE)			+= cpuidle.o
 obj-$(CONFIG_ARCH_KIRKWOOD_DT)		+= board-dt.o
 obj-$(CONFIG_MACH_DREAMPLUG_DT)		+= board-dreamplug.o
 obj-$(CONFIG_MACH_DLINK_KIRKWOOD_DT)	+= board-dnskw.o
+obj-$(CONFIG_MACH_IB62X0_DT)		+= board-ib62x0.o
arch/arm/mach-kirkwood/Makefile.boot +1 -0
index 8bbffbe..042fcad 100644
@@ -5,3 +5,4 @@ initrd_phys-y	:= 0x00800000
 dtb-$(CONFIG_MACH_DREAMPLUG_DT) += kirkwood-dreamplug.dtb
 dtb-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += kirkwood-dns320.dtb
 dtb-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += kirkwood-dns325.dtb
+dtb-$(CONFIG_MACH_IB62X0_DT) += kirkwood-ib62x0.dtb
arch/arm/mach-kirkwood/board-dt.c +4 -0
index eadc4d7..ff1b545 100644
@@ -58,6 +58,9 @@ static void __init kirkwood_dt_init(void)
 	if (of_machine_is_compatible("dlink,dns-kirkwood"))
 		dnskw_init();
 
+	if (of_machine_is_compatible("raidsonic,ib-nas62x0"))
+		ib62x0_init();
+
 	of_platform_populate(NULL, kirkwood_dt_match_table, NULL, NULL);
 }
 
@@ -65,6 +68,7 @@ static const char *kirkwood_dt_board_compat[] = {
 	"globalscale,dreamplug",
 	"dlink,dns-320",
 	"dlink,dns-325",
+	"raidsonic,ib-nas62x0",
 	NULL
 };
 
arch/arm/mach-kirkwood/board-ib62x0.c new file +143 -0

143 lines not on this page · raw message

arch/arm/mach-kirkwood/common.h +6 -0
index 6195a37..9fb301a 100644
@@ -64,6 +64,12 @@ void dnskw_init(void);
 static inline void dnskw_init(void) {};
 #endif
 
+#ifdef CONFIG_MACH_IB62X0_DT
+void ib62x0_init(void);
+#else
+static inline void ib62x0_init(void) {};
+#endif
+
 /* early init functions not converted to fdt yet */
 char *kirkwood_id(void);
 void kirkwood_l2_init(void);
Signature · 1 line
1.7.5.4