ARM: kirkwood: Relocate PCIe device tree nodes
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / kirkwood-nsa310.dts
1 /dts-v1/;
2
3 #include "kirkwood.dtsi"
4 #include "kirkwood-6281.dtsi"
5
6 / {
7         model = "ZyXEL NSA310";
8         compatible = "zyxel,nsa310", "marvell,kirkwood-88f6281", "marvell,kirkwood";
9
10         memory {
11                 device_type = "memory";
12                 reg = <0x00000000 0x10000000>;
13         };
14
15         chosen {
16                 bootargs = "console=ttyS0,115200";
17         };
18
19         mbus {
20                 ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>;
21                 pcie-controller {
22                         status = "okay";
23
24                         pcie@1,0 {
25                                 status = "okay";
26                         };
27                 };
28         };
29
30         ocp@f1000000 {
31                 pinctrl: pinctrl@10000 {
32                         pinctrl-0 = <&pmx_unknown>;
33                         pinctrl-names = "default";
34
35                         pmx_led_esata_green: pmx-led-esata-green {
36                                 marvell,pins = "mpp12";
37                                 marvell,function = "gpio";
38                         };
39
40                         pmx_led_esata_red: pmx-led-esata-red {
41                                 marvell,pins = "mpp13";
42                                 marvell,function = "gpio";
43                         };
44
45                         pmx_led_usb_green: pmx-led-usb-green {
46                                 marvell,pins = "mpp15";
47                                 marvell,function = "gpio";
48                         };
49
50                         pmx_led_usb_red: pmx-led-usb-red {
51                                 marvell,pins = "mpp16";
52                                 marvell,function = "gpio";
53                         };
54
55                         pmx_usb_power_off: pmx-usb-power-off {
56                                 marvell,pins = "mpp21";
57                                 marvell,function = "gpio";
58                         };
59
60                         pmx_led_sys_green: pmx-led-sys-green {
61                                 marvell,pins = "mpp28";
62                                 marvell,function = "gpio";
63                         };
64
65                         pmx_led_sys_red: pmx-led-sys-red {
66                                 marvell,pins = "mpp29";
67                                 marvell,function = "gpio";
68                         };
69
70                         pmx_btn_reset: pmx-btn-reset {
71                                 marvell,pins = "mpp36";
72                                 marvell,function = "gpio";
73                         };
74
75                         pmx_btn_copy: pmx-btn-copy {
76                                 marvell,pins = "mpp37";
77                                 marvell,function = "gpio";
78                         };
79
80                         pmx_led_copy_green: pmx-led-copy-green {
81                                 marvell,pins = "mpp39";
82                                 marvell,function = "gpio";
83                         };
84
85                         pmx_led_copy_red: pmx-led-copy-red {
86                                 marvell,pins = "mpp40";
87                                 marvell,function = "gpio";
88                         };
89
90                         pmx_led_hdd_green: pmx-led-hdd-green {
91                                 marvell,pins = "mpp41";
92                                 marvell,function = "gpio";
93                         };
94
95                         pmx_led_hdd_red: pmx-led-hdd-red {
96                                 marvell,pins = "mpp42";
97                                 marvell,function = "gpio";
98                         };
99
100                         pmx_unknown: pmx-unknown {
101                                 marvell,pins = "mpp44";
102                                 marvell,function = "gpio";
103                         };
104
105                         pmx_btn_power: pmx-btn-power {
106                                 marvell,pins = "mpp46";
107                                 marvell,function = "gpio";
108                         };
109
110                         pmx_pwr_off: pmx-pwr-off {
111                                 marvell,pins = "mpp48";
112                                 marvell,function = "gpio";
113                         };
114                 };
115
116                 serial@12000 {
117                         status = "ok";
118                 };
119
120                 sata@80000 {
121                         status = "okay";
122                         nr-ports = <2>;
123                 };
124
125                 i2c@11000 {
126                         status = "okay";
127
128                         adt7476: adt7476a@2e {
129                                 compatible = "adt7476";
130                                 reg = <0x2e>;
131                         };
132                 };
133
134                 nand@3000000 {
135                         status = "okay";
136                         chip-delay = <35>;
137
138                         partition@0 {
139                                 label = "uboot";
140                                 reg = <0x0000000 0x0100000>;
141                                 read-only;
142                         };
143                         partition@100000 {
144                                 label = "uboot_env";
145                                 reg = <0x0100000 0x0080000>;
146                         };
147                         partition@180000 {
148                                 label = "key_store";
149                                 reg = <0x0180000 0x0080000>;
150                         };
151                         partition@200000 {
152                                 label = "info";
153                                 reg = <0x0200000 0x0080000>;
154                         };
155                         partition@280000 {
156                                 label = "etc";
157                                 reg = <0x0280000 0x0a00000>;
158                         };
159                         partition@c80000 {
160                                 label = "kernel_1";
161                                 reg = <0x0c80000 0x0a00000>;
162                         };
163                         partition@1680000 {
164                                 label = "rootfs1";
165                                 reg = <0x1680000 0x2fc0000>;
166                         };
167                         partition@4640000 {
168                                 label = "kernel_2";
169                                 reg = <0x4640000 0x0a00000>;
170                         };
171                         partition@5040000 {
172                                 label = "rootfs2";
173                                 reg = <0x5040000 0x2fc0000>;
174                         };
175                 };
176         };
177
178         gpio_keys {
179                 compatible = "gpio-keys";
180                 #address-cells = <1>;
181                 #size-cells = <0>;
182                 pinctrl-0 = <&pmx_btn_reset &pmx_btn_copy &pmx_btn_power>;
183                 pinctrl-names = "default";
184
185                 button@1 {
186                         label = "Power Button";
187                         linux,code = <116>;
188                         gpios = <&gpio1 14 0>;
189                 };
190                 button@2 {
191                         label = "Copy Button";
192                         linux,code = <133>;
193                         gpios = <&gpio1 5 1>;
194                 };
195                 button@3 {
196                         label = "Reset Button";
197                         linux,code = <0x198>;
198                         gpios = <&gpio1 4 1>;
199                 };
200         };
201
202         gpio-leds {
203                 compatible = "gpio-leds";
204                 pinctrl-0 = <&pmx_led_esata_green &pmx_led_esata_red
205                              &pmx_led_usb_green &pmx_led_usb_red
206                              &pmx_led_sys_green &pmx_led_sys_red
207                              &pmx_led_copy_green &pmx_led_copy_red
208                              &pmx_led_hdd_green &pmx_led_hdd_red>;
209                 pinctrl-names = "default";
210
211                 green-sys {
212                         label = "nsa310:green:sys";
213                         gpios = <&gpio0 28 0>;
214                 };
215                 red-sys {
216                         label = "nsa310:red:sys";
217                         gpios = <&gpio0 29 0>;
218                 };
219                 green-hdd {
220                         label = "nsa310:green:hdd";
221                         gpios = <&gpio1 9 0>;
222                 };
223                 red-hdd {
224                         label = "nsa310:red:hdd";
225                         gpios = <&gpio1 10 0>;
226                 };
227                 green-esata {
228                         label = "nsa310:green:esata";
229                         gpios = <&gpio0 12 0>;
230                 };
231                 red-esata {
232                         label = "nsa310:red:esata";
233                         gpios = <&gpio0 13 0>;
234                 };
235                 green-usb {
236                         label = "nsa310:green:usb";
237                         gpios = <&gpio0 15 0>;
238                 };
239                 red-usb {
240                         label = "nsa310:red:usb";
241                         gpios = <&gpio0 16 0>;
242                 };
243                 green-copy {
244                         label = "nsa310:green:copy";
245                         gpios = <&gpio1 7 0>;
246                 };
247                 red-copy {
248                         label = "nsa310:red:copy";
249                         gpios = <&gpio1 8 0>;
250                 };
251         };
252
253         gpio_poweroff {
254                 compatible = "gpio-poweroff";
255                 pinctrl-0 = <&pmx_pwr_off>;
256                 pinctrl-names = "default";
257                 gpios = <&gpio1 16 0>;
258         };
259
260         regulators {
261                 compatible = "simple-bus";
262                 #address-cells = <1>;
263                 #size-cells = <0>;
264                 pinctrl-0 = <&pmx_usb_power_off>;
265                 pinctrl-names = "default";
266
267                 usb0_power_off: regulator@1 {
268                         compatible = "regulator-fixed";
269                         reg = <1>;
270                         regulator-name = "USB Power Off";
271                         regulator-min-microvolt = <5000000>;
272                         regulator-max-microvolt = <5000000>;
273                         regulator-always-on;
274                         regulator-boot-on;
275                         gpio = <&gpio0 21 0>;
276                 };
277         };
278 };