aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/boot/dts/kirkwood-nsa310.dts
diff options
context:
space:
mode:
authorTero Jaasko <tero.jaasko@gmail.com>2012-10-26 11:56:16 -0400
committerJason Cooper <jason@lakedaemon.net>2012-11-21 15:59:30 -0500
commitafcad884252b171ff6f2ac78eb43c2f5db612dd0 (patch)
tree6013519c908237795b4ab546234829ae969e6295 /arch/arm/boot/dts/kirkwood-nsa310.dts
parent767fc1ea92f70b5a97d43b79c146c2bee3eb6e83 (diff)
arm: kirkwood: add support for ZyXEL NSA310
Hello, Andrew > > +#define NSA310_GPIO_LED_ESATA_GREEN 12 > > <..> > > +#define NSA310_GPIO_POWER_OFF 48 > > It looks like most of these are not used. Please remove them. True. Fixed. > > +static struct mtd_partition nsa310_mtd_parts[] = { > > + { > > + .name = "uboot", > > + .offset = 0, > > + .size = 0x100000, > > + .mask_flags = MTD_WRITEABLE, > > + }, { > > <..> > You should be able to put all that into DT. Take a look at Correct. I did the conversion and tested that the partitions can be read with dd and produce exactly the same data before and after conversion. So, the partition offsets at least should be fine. > > +static struct i2c_board_info __initdata nsa310_i2c_info[] = { > > + { I2C_BOARD_INFO("adt7476", 0x2e) }, > > +}; > > You can also do this in DT as well. kirkwood-ts219.dtsi has > > i2c@11000 { > status = "okay"; > clock-frequency = <400000>; Ok, I did convert the i2c definition to use the devicetree. The adt7476 device itself is not at reach of device tree, AFAIK and requires more work at there? Thanks for your valuable comments. Following is a new patch that should address the problems and mistakes you pointed and also some of the pointed by Jason Cooper. The nand and i2c are now defined at DT and I also removed the pointless defines and ARM_APPENDED_DTB. It is based against the Linus' official 3.6 version. Best regards, Tero Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'arch/arm/boot/dts/kirkwood-nsa310.dts')
-rw-r--r--arch/arm/boot/dts/kirkwood-nsa310.dts144
1 files changed, 144 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/kirkwood-nsa310.dts b/arch/arm/boot/dts/kirkwood-nsa310.dts
new file mode 100644
index 000000000000..5509f9659546
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-nsa310.dts
@@ -0,0 +1,144 @@
1/dts-v1/;
2
3/include/ "kirkwood.dtsi"
4
5/ {
6 model = "ZyXEL NSA310";
7 compatible = "zyxel,nsa310", "marvell,kirkwood-88f6281", "marvell,kirkwood";
8
9 memory {
10 device_type = "memory";
11 reg = <0x00000000 0x10000000>;
12 };
13
14 chosen {
15 bootargs = "console=ttyS0,115200";
16 };
17
18 ocp@f1000000 {
19
20 serial@12000 {
21 clock-frequency = <200000000>;
22 status = "ok";
23 };
24
25 sata@80000 {
26 status = "okay";
27 nr-ports = <2>;
28 };
29
30 i2c@11000 {
31 status = "okay";
32 };
33
34 nand@3000000 {
35 status = "okay";
36 chip-delay = <35>;
37
38 partition@0 {
39 label = "uboot";
40 reg = <0x0000000 0x0100000>;
41 read-only;
42 };
43 partition@100000 {
44 label = "uboot_env";
45 reg = <0x0100000 0x0080000>;
46 };
47 partition@180000 {
48 label = "key_store";
49 reg = <0x0180000 0x0080000>;
50 };
51 partition@200000 {
52 label = "info";
53 reg = <0x0200000 0x0080000>;
54 };
55 partition@280000 {
56 label = "etc";
57 reg = <0x0280000 0x0a00000>;
58 };
59 partition@c80000 {
60 label = "kernel_1";
61 reg = <0x0c80000 0x0a00000>;
62 };
63 partition@1680000 {
64 label = "rootfs1";
65 reg = <0x1680000 0x2fc0000>;
66 };
67 partition@4640000 {
68 label = "kernel_2";
69 reg = <0x4640000 0x0a00000>;
70 };
71 partition@5040000 {
72 label = "rootfs2";
73 reg = <0x5040000 0x2fc0000>;
74 };
75 };
76 };
77
78 gpio_keys {
79 compatible = "gpio-keys";
80 #address-cells = <1>;
81 #size-cells = <0>;
82
83 button@1 {
84 label = "Power Button";
85 linux,code = <116>;
86 gpios = <&gpio1 14 0>;
87 };
88 button@2 {
89 label = "Copy Button";
90 linux,code = <133>;
91 gpios = <&gpio1 5 1>;
92 };
93 button@3 {
94 label = "Reset Button";
95 linux,code = <0x198>;
96 gpios = <&gpio1 4 1>;
97 };
98 };
99
100 gpio-leds {
101 compatible = "gpio-leds";
102
103 green-sys {
104 label = "nsa310:green:sys";
105 gpios = <&gpio0 28 0>;
106 };
107 red-sys {
108 label = "nsa310:red:sys";
109 gpios = <&gpio0 29 0>;
110 };
111 green-hdd {
112 label = "nsa310:green:hdd";
113 gpios = <&gpio1 9 0>;
114 };
115 red-hdd {
116 label = "nsa310:red:hdd";
117 gpios = <&gpio1 10 0>;
118 };
119 green-esata {
120 label = "nsa310:green:esata";
121 gpios = <&gpio0 12 0>;
122 };
123 red-esata {
124 label = "nsa310:red:esata";
125 gpios = <&gpio0 13 0>;
126 };
127 green-usb {
128 label = "nsa310:green:usb";
129 gpios = <&gpio0 15 0>;
130 };
131 red-usb {
132 label = "nsa310:red:usb";
133 gpios = <&gpio0 16 0>;
134 };
135 green-copy {
136 label = "nsa310:green:copy";
137 gpios = <&gpio1 7 0>;
138 };
139 red-copy {
140 label = "nsa310:red:copy";
141 gpios = <&gpio1 8 0>;
142 };
143 };
144};