12152777a60b57c968036a7f443269ff198ba78b
[openwrt/staging/blogic.git] / target / linux / ath79 / dts / ar9344_mikrotik_routerboard-sxt-5n.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 #include "ar9344.dtsi"
7
8 / {
9 compatible = "mikrotik,routerboard-sxt-5n", "qca,ar9344";
10 model = "MikroTik SXT 5N platform";
11
12 aliases {
13 led-boot = &led_user;
14 led-failsafe = &led_user;
15 led-running = &led_user;
16 led-upgrade = &led_user;
17 serial0 = &uart;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 power {
24 label = "mikrotik:green:power";
25 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
26 default-state = "on";
27 };
28
29 rssilow {
30 label = "mikrotik:green:rssilow";
31 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
32 };
33
34 rssimediumlow {
35 label = "mikrotik:green:rssimediumlow";
36 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
37 };
38
39 rssimedium {
40 label = "mikrotik:green:rssimedium";
41 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
42 };
43
44 rssimediumhigh {
45 label = "mikrotik:green:rssimediumhigh";
46 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
47 };
48
49 rssihigh {
50 label = "mikrotik:green:rssihigh";
51 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
52 };
53
54 led_user: user {
55 label = "mikrotik:green:user";
56 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
57 };
58 };
59
60 keys {
61 compatible = "gpio-keys";
62
63 reset {
64 label = "reset";
65 linux,code = <KEY_RESTART>;
66 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
67 debounce-interval = <60>;
68 };
69 };
70
71 gpio-export {
72 compatible = "gpio-export";
73
74 gpio_nand_power {
75 gpio-export,name = "sxt5n:power:nand";
76 gpio-export,output = <0>;
77 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
78 };
79 };
80
81 beeper {
82 compatible = "gpio-beeper";
83 gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
84 };
85 };
86
87 &spi {
88 status = "okay";
89
90 num-cs = <1>;
91
92 flash@0 {
93 compatible = "jedec,spi-nor";
94 reg = <0>;
95 spi-max-frequency = <40000000>;
96
97 partitions {
98 compatible = "fixed-partitions";
99 #address-cells = <1>;
100 #size-cells = <1>;
101
102 partition@0 {
103 label = "RouterBoot";
104 reg = <0x0 0x20000>;
105 read-only;
106 compatible = "mikrotik,routerboot-partitions";
107 #address-cells = <1>;
108 #size-cells = <1>;
109
110 partition@0 {
111 label = "bootloader1";
112 reg = <0x0 0x0>;
113 read-only;
114 };
115
116 hard_config: hard_config {
117 read-only;
118 };
119
120 bios {
121 size = <0x1000>;
122 read-only;
123 };
124
125 soft_config {
126 };
127
128 partition@10000 {
129 label = "bootloader2";
130 reg = <0x10000 0x10000>;
131 read-only;
132 };
133 };
134 };
135 };
136 };
137
138 &nand {
139 status = "okay";
140
141 nand-ecc-mode = "soft";
142 qca,nand-swap-dma;
143 qca,nand-scan-fixup;
144
145 partitions {
146 compatible = "fixed-partitions";
147 #address-cells = <1>;
148 #size-cells = <1>;
149
150 partition@0 {
151 label = "booter";
152 reg = <0x0000000 0x0040000>;
153 read-only;
154 };
155
156 partition@40000 {
157 label = "kernel";
158 reg = <0x0040000 0x03c0000>;
159 };
160
161 partition@400000 {
162 label = "ubi";
163 reg = <0x0400000 0x7c00000>;
164 };
165 };
166 };
167
168 &uart {
169 status = "okay";
170 };
171
172 &eth0 {
173 status = "okay";
174
175 phy-handle = <&swphy0>;
176
177 gmac-config {
178 device = <&gmac>;
179 switch-phy-swap = <1>;
180 };
181 };
182
183 &eth1 {
184 status = "okay";
185
186 compatible = "syscon", "simple-mfd";
187 };
188
189 &wmac {
190 status = "okay";
191
192 qca,no-eeprom;
193 };