aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2013-07-17 12:51:49 -0400
committerJason Cooper <jason@lakedaemon.net>2013-08-09 09:12:20 -0400
commiteee47b7c6eb44861fe9a6c7052fd8243a4beaea6 (patch)
treec938874c2b35d748d6aa02c39319066353529e7d /arch
parent2344a29a923b95bb28609da4038590c4131160cc (diff)
ARM: Kirkwood: Add support for another ZyXEL NSA310 variant
There are a number of variants of the ZyXEL NSA310, with slightly different LEDs, buttons and i2c devices. Add a DTS file to support one more of these variants. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Tibor Hársszegi <tibor@harsszegi.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boot/dts/Makefile1
-rw-r--r--arch/arm/boot/dts/kirkwood-nsa310-common.dtsi107
-rw-r--r--arch/arm/boot/dts/kirkwood-nsa310.dts100
-rw-r--r--arch/arm/boot/dts/kirkwood-nsa310a.dts165
4 files changed, 274 insertions, 99 deletions
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index d869d8385540..3d4b882a0e29 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -89,6 +89,7 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \
89 kirkwood-ns2max.dtb \ 89 kirkwood-ns2max.dtb \
90 kirkwood-ns2mini.dtb \ 90 kirkwood-ns2mini.dtb \
91 kirkwood-nsa310.dtb \ 91 kirkwood-nsa310.dtb \
92 kirkwood-nsa310a.dtb \
92 kirkwood-sheevaplug.dtb \ 93 kirkwood-sheevaplug.dtb \
93 kirkwood-sheevaplug-esata.dtb \ 94 kirkwood-sheevaplug-esata.dtb \
94 kirkwood-topkick.dtb \ 95 kirkwood-topkick.dtb \
diff --git a/arch/arm/boot/dts/kirkwood-nsa310-common.dtsi b/arch/arm/boot/dts/kirkwood-nsa310-common.dtsi
new file mode 100644
index 000000000000..8f739c8eb83a
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-nsa310-common.dtsi
@@ -0,0 +1,107 @@
1/include/ "kirkwood.dtsi"
2/include/ "kirkwood-6281.dtsi"
3
4/ {
5 model = "ZyXEL NSA310";
6
7 ocp@f1000000 {
8 pinctrl: pinctrl@10000 {
9
10 pmx_usb_power_off: pmx-usb-power-off {
11 marvell,pins = "mpp21";
12 marvell,function = "gpio";
13 };
14 pmx_pwr_off: pmx-pwr-off {
15 marvell,pins = "mpp48";
16 marvell,function = "gpio";
17 };
18
19 };
20
21 serial@12000 {
22 status = "ok";
23 };
24
25 sata@80000 {
26 status = "okay";
27 nr-ports = <2>;
28 };
29
30 nand@3000000 {
31 status = "okay";
32 chip-delay = <35>;
33
34 partition@0 {
35 label = "uboot";
36 reg = <0x0000000 0x0100000>;
37 read-only;
38 };
39 partition@100000 {
40 label = "uboot_env";
41 reg = <0x0100000 0x0080000>;
42 };
43 partition@180000 {
44 label = "key_store";
45 reg = <0x0180000 0x0080000>;
46 };
47 partition@200000 {
48 label = "info";
49 reg = <0x0200000 0x0080000>;
50 };
51 partition@280000 {
52 label = "etc";
53 reg = <0x0280000 0x0a00000>;
54 };
55 partition@c80000 {
56 label = "kernel_1";
57 reg = <0x0c80000 0x0a00000>;
58 };
59 partition@1680000 {
60 label = "rootfs1";
61 reg = <0x1680000 0x2fc0000>;
62 };
63 partition@4640000 {
64 label = "kernel_2";
65 reg = <0x4640000 0x0a00000>;
66 };
67 partition@5040000 {
68 label = "rootfs2";
69 reg = <0x5040000 0x2fc0000>;
70 };
71 };
72
73 pcie-controller {
74 status = "okay";
75
76 pcie@1,0 {
77 status = "okay";
78 };
79 };
80 };
81
82 gpio_poweroff {
83 compatible = "gpio-poweroff";
84 pinctrl-0 = <&pmx_pwr_off>;
85 pinctrl-names = "default";
86 gpios = <&gpio1 16 0>;
87 };
88
89 regulators {
90 compatible = "simple-bus";
91 #address-cells = <1>;
92 #size-cells = <0>;
93 pinctrl-0 = <&pmx_usb_power_off>;
94 pinctrl-names = "default";
95
96 usb0_power_off: regulator@1 {
97 compatible = "regulator-fixed";
98 reg = <1>;
99 regulator-name = "USB Power Off";
100 regulator-min-microvolt = <5000000>;
101 regulator-max-microvolt = <5000000>;
102 regulator-always-on;
103 regulator-boot-on;
104 gpio = <&gpio0 21 0>;
105 };
106 };
107};
diff --git a/arch/arm/boot/dts/kirkwood-nsa310.dts b/arch/arm/boot/dts/kirkwood-nsa310.dts
index 69003598f5fa..62fb0a9acf34 100644
--- a/arch/arm/boot/dts/kirkwood-nsa310.dts
+++ b/arch/arm/boot/dts/kirkwood-nsa310.dts
@@ -1,10 +1,8 @@
1/dts-v1/; 1/dts-v1/;
2 2
3/include/ "kirkwood.dtsi" 3/include/ "kirkwood-nsa310-common.dtsi"
4/include/ "kirkwood-6281.dtsi"
5 4
6/ { 5/ {
7 model = "ZyXEL NSA310";
8 compatible = "zyxel,nsa310", "marvell,kirkwood-88f6281", "marvell,kirkwood"; 6 compatible = "zyxel,nsa310", "marvell,kirkwood-88f6281", "marvell,kirkwood";
9 7
10 memory { 8 memory {
@@ -41,11 +39,6 @@
41 marvell,function = "gpio"; 39 marvell,function = "gpio";
42 }; 40 };
43 41
44 pmx_usb_power_off: pmx-usb-power-off {
45 marvell,pins = "mpp21";
46 marvell,function = "gpio";
47 };
48
49 pmx_led_sys_green: pmx-led-sys-green { 42 pmx_led_sys_green: pmx-led-sys-green {
50 marvell,pins = "mpp28"; 43 marvell,pins = "mpp28";
51 marvell,function = "gpio"; 44 marvell,function = "gpio";
@@ -95,20 +88,6 @@
95 marvell,pins = "mpp46"; 88 marvell,pins = "mpp46";
96 marvell,function = "gpio"; 89 marvell,function = "gpio";
97 }; 90 };
98
99 pmx_pwr_off: pmx-pwr-off {
100 marvell,pins = "mpp48";
101 marvell,function = "gpio";
102 };
103 };
104
105 serial@12000 {
106 status = "ok";
107 };
108
109 sata@80000 {
110 status = "okay";
111 nr-ports = <2>;
112 }; 91 };
113 92
114 i2c@11000 { 93 i2c@11000 {
@@ -119,57 +98,6 @@
119 reg = <0x2e>; 98 reg = <0x2e>;
120 }; 99 };
121 }; 100 };
122
123 nand@3000000 {
124 status = "okay";
125 chip-delay = <35>;
126
127 partition@0 {
128 label = "uboot";
129 reg = <0x0000000 0x0100000>;
130 read-only;
131 };
132 partition@100000 {
133 label = "uboot_env";
134 reg = <0x0100000 0x0080000>;
135 };
136 partition@180000 {
137 label = "key_store";
138 reg = <0x0180000 0x0080000>;
139 };
140 partition@200000 {
141 label = "info";
142 reg = <0x0200000 0x0080000>;
143 };
144 partition@280000 {
145 label = "etc";
146 reg = <0x0280000 0x0a00000>;
147 };
148 partition@c80000 {
149 label = "kernel_1";
150 reg = <0x0c80000 0x0a00000>;
151 };
152 partition@1680000 {
153 label = "rootfs1";
154 reg = <0x1680000 0x2fc0000>;
155 };
156 partition@4640000 {
157 label = "kernel_2";
158 reg = <0x4640000 0x0a00000>;
159 };
160 partition@5040000 {
161 label = "rootfs2";
162 reg = <0x5040000 0x2fc0000>;
163 };
164 };
165
166 pcie-controller {
167 status = "okay";
168
169 pcie@1,0 {
170 status = "okay";
171 };
172 };
173 }; 101 };
174 102
175 gpio_keys { 103 gpio_keys {
@@ -246,30 +174,4 @@
246 gpios = <&gpio1 8 0>; 174 gpios = <&gpio1 8 0>;
247 }; 175 };
248 }; 176 };
249
250 gpio_poweroff {
251 compatible = "gpio-poweroff";
252 pinctrl-0 = <&pmx_pwr_off>;
253 pinctrl-names = "default";
254 gpios = <&gpio1 16 0>;
255 };
256
257 regulators {
258 compatible = "simple-bus";
259 #address-cells = <1>;
260 #size-cells = <0>;
261 pinctrl-0 = <&pmx_usb_power_off>;
262 pinctrl-names = "default";
263
264 usb0_power_off: regulator@1 {
265 compatible = "regulator-fixed";
266 reg = <1>;
267 regulator-name = "USB Power Off";
268 regulator-min-microvolt = <5000000>;
269 regulator-max-microvolt = <5000000>;
270 regulator-always-on;
271 regulator-boot-on;
272 gpio = <&gpio0 21 0>;
273 };
274 };
275}; 177};
diff --git a/arch/arm/boot/dts/kirkwood-nsa310a.dts b/arch/arm/boot/dts/kirkwood-nsa310a.dts
new file mode 100644
index 000000000000..1070e9d81c5f
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-nsa310a.dts
@@ -0,0 +1,165 @@
1/dts-v1/;
2
3/include/ "kirkwood-nsa310-common.dtsi"
4
5/*
6 * There are at least two different NSA310 designs. This variant does
7 * not have the red USB Led.
8 */
9
10/ {
11 compatible = "zyxel,nsa310a", "zyxel,nsa310", "marvell,kirkwood-88f6281", "marvell,kirkwood";
12
13 memory {
14 device_type = "memory";
15 reg = <0x00000000 0x10000000>;
16 };
17
18 chosen {
19 bootargs = "console=ttyS0,115200";
20 };
21
22 ocp@f1000000 {
23 pinctrl: pinctrl@10000 {
24 pinctrl-names = "default";
25
26 pmx_led_esata_green: pmx-led-esata-green {
27 marvell,pins = "mpp12";
28 marvell,function = "gpio";
29 };
30
31 pmx_led_esata_red: pmx-led-esata-red {
32 marvell,pins = "mpp13";
33 marvell,function = "gpio";
34 };
35
36 pmx_led_usb_green: pmx-led-usb-green {
37 marvell,pins = "mpp15";
38 marvell,function = "gpio";
39 };
40
41 pmx_usb_power_off: pmx-usb-power-off {
42 marvell,pins = "mpp21";
43 marvell,function = "gpio";
44 };
45
46 pmx_led_sys_green: pmx-led-sys-green {
47 marvell,pins = "mpp28";
48 marvell,function = "gpio";
49 };
50
51 pmx_led_sys_red: pmx-led-sys-red {
52 marvell,pins = "mpp29";
53 marvell,function = "gpio";
54 };
55
56 pmx_btn_reset: pmx-btn-reset {
57 marvell,pins = "mpp36";
58 marvell,function = "gpio";
59 };
60
61 pmx_btn_copy: pmx-btn-copy {
62 marvell,pins = "mpp37";
63 marvell,function = "gpio";
64 };
65
66 pmx_led_copy_green: pmx-led-copy-green {
67 marvell,pins = "mpp39";
68 marvell,function = "gpio";
69 };
70
71 pmx_led_copy_red: pmx-led-copy-red {
72 marvell,pins = "mpp40";
73 marvell,function = "gpio";
74 };
75
76 pmx_led_hdd_green: pmx-led-hdd-green {
77 marvell,pins = "mpp41";
78 marvell,function = "gpio";
79 };
80
81 pmx_led_hdd_red: pmx-led-hdd-red {
82 marvell,pins = "mpp42";
83 marvell,function = "gpio";
84 };
85
86 pmx_btn_power: pmx-btn-power {
87 marvell,pins = "mpp46";
88 marvell,function = "gpio";
89 };
90
91 };
92
93 i2c@11000 {
94 status = "okay";
95
96 lm85: lm85@2e {
97 compatible = "lm85";
98 reg = <0x2e>;
99 };
100 };
101 };
102
103 gpio_keys {
104 compatible = "gpio-keys";
105 #address-cells = <1>;
106 #size-cells = <0>;
107
108 button@1 {
109 label = "Power Button";
110 linux,code = <116>;
111 gpios = <&gpio1 14 0>;
112 };
113 button@2 {
114 label = "Copy Button";
115 linux,code = <133>;
116 gpios = <&gpio1 5 1>;
117 };
118 button@3 {
119 label = "Reset Button";
120 linux,code = <0x198>;
121 gpios = <&gpio1 4 1>;
122 };
123 };
124
125 gpio-leds {
126 compatible = "gpio-leds";
127
128 green-sys {
129 label = "nsa310:green:sys";
130 gpios = <&gpio0 28 0>;
131 };
132 red-sys {
133 label = "nsa310:red:sys";
134 gpios = <&gpio0 29 0>;
135 };
136 green-hdd {
137 label = "nsa310:green:hdd";
138 gpios = <&gpio1 9 0>;
139 };
140 red-hdd {
141 label = "nsa310:red:hdd";
142 gpios = <&gpio1 10 0>;
143 };
144 green-esata {
145 label = "nsa310:green:esata";
146 gpios = <&gpio0 12 0>;
147 };
148 red-esata {
149 label = "nsa310:red:esata";
150 gpios = <&gpio0 13 0>;
151 };
152 green-usb {
153 label = "nsa310:green:usb";
154 gpios = <&gpio0 15 0>;
155 };
156 green-copy {
157 label = "nsa310:green:copy";
158 gpios = <&gpio1 7 0>;
159 };
160 red-copy {
161 label = "nsa310:red:copy";
162 gpios = <&gpio1 8 0>;
163 };
164 };
165};