[PATCH 1/2] ARM: kirkwood: Basic support for DNS-320 and DNS-325
From: arnd@arndb.de (Arnd Bergmann)
Date: 2012-03-11 17:46:09
Also in:
linux-devicetree
On Sunday 11 March 2012, Jamie Lentin wrote:
Add support for the DNS-320 and DNS-325. Describe as much as currently possible in the devicetree files, leave everything else in board-dt.c to be patched later. Signed-off-by: Jamie Lentin <redacted>
Great work!
+
+/ {
+ model = "D-Link DNS-320 NAS (Rev A1)";
+ compatible = "dlink,dns-320-a1", "dlink,dns-320", "dlink,dns-kirkwood", "marvell,kirkwood-88f6281", "marvell,kirkwood";
+
+ memory {
+ device_type = "memory";
+ reg = <0x00000000 0x8000000>;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8 earlyprintk";
+ };
+
+ wdt at fed20300 {
+ compatible = "mrvl,orion-wdt";
+ reg = <0xfed20300 0x28>;
+ clock-frequency = <166666667>;
+ };
+
+ serial at f1012000 {
+ compatible = "ns16550a";
+ reg = <0xf1012000 0xff>;
+ reg-shift = <2>;
+ interrupts = <33>;
+ clock-frequency = <166666667>;
+ };
+
+ serial at f1012100 {
+ compatible = "ns16550a";
+ reg = <0xf1012100 0xff>;
+ reg-shift = <2>;
+ interrupts = <34>;
+ clock-frequency = <166666667>;
+ };
I think the generic kirkwood device nodes should all be part of
the kirkwood.dtsi file, except for any properties you want to
override.
You can add a status="disabled" property in device nodes
that may not be connected in individual boards, and then
just override it by listing status="enabled" in the board.dts
file, without having to duplicate all the other properties.
I would also suggest to change the kirkwood.dtsi layout to
put all the on-chip peripherals from the 0xf1 section into
one bus in the device tree, like
ocp at f1000000 {
compatible = "simple-bus";
ranges = <0xf1000000 0xf1000000 0x1000000>;
#address-cells = 1;
#size-cells = 1;
serial at f1012000 {
...
};
...
};
Or even use the ranges property to remap everything into
a simpler address range:
ocp at f1000000 {
compatible = "simple-bus";
ranges = <0 0xf1000000 0x1000000>;
#address-cells = 1;
#size-cells = 1;
serial at 12000 {
reg = <0x12000 0x100>;
...
};
...
};
Arnd