kirkwood: split files into 6.1 and 6.6 version
[openwrt/staging/stintel.git] / target / linux / kirkwood / files-6.1 / arch / arm / boot / dts / kirkwood-nas1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include <dt-bindings/leds/common.h>
5
6 #include "kirkwood.dtsi"
7 #include "kirkwood-6281.dtsi"
8
9 / {
10 model = "ipTIME NAS1";
11 compatible = "iptime,nas1", "marvell,kirkwood-88f6281", "marvell,kirkwood";
12
13 aliases {
14 serial0 = &uart0;
15 led-boot = &led_ready;
16 led-failsafe = &led_ready;
17 led-running = &led_ready;
18 led-upgrade = &led_ready;
19 };
20
21 chosen {
22 /*
23 * "root" argument from the stock bootloader should be ignored
24 * as it'll prevent the kernel from finding the correct rootfs.
25 */
26 bootargs-append = " console=ttyS0,115200 root=";
27 stdout-path = "serial0:115200n8";
28 };
29
30 memory@0 {
31 device_type = "memory";
32 reg = <0x00000000 0x10000000>;
33 };
34
35 gpio-leds {
36 compatible = "gpio-leds";
37
38 pinctrl-0 = <&pmx_led>;
39 pinctrl-names = "default";
40
41 hdd {
42 label = "blue:hdd";
43 gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
44 linux,default-trigger = "ata1";
45 };
46
47 usb {
48 function = LED_FUNCTION_USB;
49 color = <LED_COLOR_ID_BLUE>;
50 gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
51 trigger-sources = <&ehci_port1>;
52 linux,default-trigger = "usbport";
53 };
54
55 led_ready: ready {
56 label = "blue:ready";
57 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
58 };
59 };
60
61 gpio-keys {
62 compatible = "gpio-keys";
63
64 pinctrl-0 = <&pmx_button>;
65 pinctrl-names = "default";
66
67 reset-copy {
68 label = "Reset/Copy Button";
69 linux,code = <KEY_RESTART>;
70 gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
71 };
72
73 power {
74 label = "Power Button";
75 linux,code = <KEY_POWER>;
76 gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>;
77 };
78 };
79
80 gpio-fan {
81 compatible = "gpio-fan";
82
83 pinctrl-0 = <&pmx_fan>;
84 pinctrl-names = "default";
85 gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>,
86 <&gpio1 10 GPIO_ACTIVE_HIGH>;
87 /* We don't know the exact rpm, just use dummy values here. */
88 gpio-fan,speed-map = <0 0>, <1 1>, <2 2>;
89 #cooling-cells = <2>;
90 };
91
92 gpio-poweroff {
93 compatible = "gpio-poweroff";
94 gpios = <&pca9536 0 GPIO_ACTIVE_LOW>;
95 };
96
97 regulators {
98 compatible = "simple-bus";
99 #address-cells = <1>;
100 #size-cells = <0>;
101
102 pinctrl-0 = <&pmx_usb_vbus>;
103 pinctrl-names = "default";
104
105 regulator@1 {
106 compatible = "regulator-fixed";
107 reg = <1>;
108 regulator-name = "USB Power";
109 regulator-min-microvolt = <5000000>;
110 regulator-max-microvolt = <5000000>;
111 enable-active-high;
112 regulator-always-on;
113 gpio = <&gpio1 11 GPIO_ACTIVE_HIGH>;
114 };
115 };
116 };
117
118 &pinctrl {
119 pmx_led: pmx-led {
120 marvell,pins = "mpp35", "mpp45", "mpp46";
121 marvell,function = "gpio";
122 };
123
124 pmx_fan: pmx-fan {
125 marvell,pins = "mpp41", "mpp42";
126 marvell,function = "gpio";
127 };
128
129 pmx_usb_vbus: pmx-usb-vbus {
130 marvell,pins = "mpp43";
131 marvell,function = "gpio";
132 };
133
134 pmx_button: pmx-button {
135 marvell,pins = "mpp44", "mpp48";
136 marvell,function = "gpio";
137 };
138 };
139
140 &spi0 {
141 status = "okay";
142
143 flash@0 {
144 compatible = "jedec,spi-nor";
145 reg = <0>;
146 spi-max-frequency = <20000000>;
147
148 partitions {
149 compatible = "fixed-partitions";
150 #address-cells = <1>;
151 #size-cells = <1>;
152
153 partition@0 {
154 label = "u-boot";
155 reg = <0x0 0x40000>;
156 read-only;
157 };
158
159 partition@40000 {
160 compatible = "openwrt,uimage", "denx,uimage";
161 openwrt,offset = <0x400>;
162 label = "firmware";
163 reg = <0x40000 0xf80000>;
164 };
165
166 partition@fc0000 {
167 label = "config";
168 reg = <0xfc0000 0x40000>;
169 read-only;
170 };
171 };
172 };
173 };
174
175 &rtc {
176 status = "disabled";
177 };
178
179 &i2c0 {
180 status = "okay";
181
182 pca9536: gpio@41 {
183 compatible = "nxp,pca9536";
184 reg = <0x41>;
185 gpio-controller;
186 #gpio-cells = <2>;
187 };
188 };
189
190 &uart0 {
191 status = "okay";
192 };
193
194 &usb0 {
195 status = "okay";
196
197 #address-cells = <1>;
198 #size-cells = <0>;
199
200 ehci_port1: port@1 {
201 reg = <1>;
202 #trigger-source-cells = <0>;
203 };
204 };
205
206 &mdio {
207 status = "okay";
208
209 ethphyb: ethernet-phy@b {
210 reg = <0x0b>;
211 };
212 };
213
214 &eth1 {
215 status = "okay";
216 };
217
218 &eth1port {
219 phy-handle = <&ethphyb>;
220 phy-connection-type = "rgmii-id";
221 };
222
223 &sata {
224 status = "okay";
225
226 #address-cells = <1>;
227 #size-cells = <0>;
228 nr-ports = <1>;
229
230 sata-port@0 {
231 reg = <0>;
232 #thermal-sensor-cells = <0>;
233 };
234 };