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