mediatek: enable NMBM remapping for NWA50AX Pro UBI
[openwrt/staging/dangole.git] / target / linux / mediatek / dts / mt7981b-zyxel-nwa50ax-pro.dts
1 /dts-v1/;
2
3 #include "mt7981.dtsi"
4
5 / {
6 model = "ZyXEL NWA50AX Pro";
7 compatible = "zyxel,nwa50ax-pro", "mediatek,mt7981";
8
9 aliases {
10 led-boot = &led_green;
11 led-failsafe = &led_red;
12 led-running = &led_green;
13 led-upgrade = &led_red;
14 serial0 = &uart0;
15 label-mac-device = &gmac1;
16 };
17
18 chosen {
19 stdout-path = "serial0:115200n8";
20 };
21
22 gpio-keys {
23 compatible = "gpio-keys";
24
25 reset {
26 label = "reset";
27 linux,code = <KEY_RESTART>;
28 gpios = <&pio 1 GPIO_ACTIVE_LOW>;
29 };
30 };
31
32 leds {
33 compatible = "gpio-leds";
34
35 led_green: led@0 {
36 label = "green:system";
37 gpios = <&pio 4 GPIO_ACTIVE_HIGH>;
38 };
39
40 led@1 {
41 label = "blue:system";
42 gpios = <&pio 6 GPIO_ACTIVE_HIGH>;
43 };
44
45 led_red: led@2 {
46 label = "red:system";
47 gpios = <&pio 7 GPIO_ACTIVE_HIGH>;
48 };
49 };
50 };
51
52 &uart0 {
53 status = "okay";
54 };
55
56 &watchdog {
57 status = "okay";
58 };
59
60 &eth {
61 pinctrl-names = "default";
62 pinctrl-0 = <&mdio_pins>;
63
64 status = "okay";
65
66 gmac1: mac@1 {
67 compatible = "mediatek,eth-mac";
68 reg = <1>;
69 phy-mode = "2500base-x";
70
71 phy-handle = <&phy0>;
72
73 nvmem-cells = <&macaddr_mrd_1fff8>;
74 nvmem-cell-names = "mac-address";
75 };
76 };
77
78 &mdio_bus {
79 reset-gpios = <&pio 12 GPIO_ACTIVE_LOW>;
80 reset-delay-us = <1500000>;
81 reset-post-delay-us = <1000000>;
82
83 phy0: ethernet-phy@5 {
84 reg = <5>;
85 compatible = "ethernet-phy-ieee802.3-c45";
86
87 /* LED0: Amber ; LED1: nc ; LED2: nc ; LED3: Green */
88 mxl,led-config = <0x3b0 0x0 0x0 0x3c0>;
89 };
90 };
91
92 &spi0 {
93 pinctrl-names = "default";
94 pinctrl-0 = <&spi0_flash_pins>;
95 status = "okay";
96
97 spi_nand: flash@0 {
98 #address-cells = <1>;
99 #size-cells = <1>;
100 compatible = "spi-nand";
101 reg = <0>;
102 spi-max-frequency = <52000000>;
103
104 spi-cal-enable;
105 spi-cal-mode = "read-data";
106 spi-cal-datalen = <7>;
107 spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
108 spi-cal-addrlen = <5>;
109 spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
110
111 spi-tx-buswidth = <4>;
112 spi-rx-buswidth = <4>;
113 mediatek,nmbm;
114 mediatek,bmt-max-ratio = <1>;
115 mediatek,bmt-max-reserved-blocks = <64>;
116
117 partitions {
118 compatible = "fixed-partitions";
119 #address-cells = <1>;
120 #size-cells = <1>;
121
122 partition@0 {
123 label = "BL2";
124 reg = <0x00000 0x0100000>;
125 read-only;
126 };
127
128 partition@100000 {
129 label = "u-boot-env";
130 reg = <0x0100000 0x0080000>;
131 };
132
133 factory: partition@180000 {
134 label = "Factory";
135 reg = <0x180000 0x0200000>;
136 read-only;
137
138 compatible = "nvmem-cells";
139 #address-cells = <1>;
140 #size-cells = <1>;
141
142 macaddr: macaddr@a {
143 reg = <0xa 0x6>;
144 };
145 };
146
147 partition@380000 {
148 label = "FIP";
149 reg = <0x380000 0x0200000>;
150 read-only;
151 };
152
153 partition@580000 {
154 label = "ubi";
155 reg = <0x580000 0x3200000>;
156 };
157
158 partition@3780000 {
159 label = "ubi_1";
160 reg = <0x3780000 0x3200000>;
161 read-only;
162 };
163
164 partition@6980000 {
165 label = "rootfs-data";
166 reg = <0x6980000 0x3c00000>;
167 read-only;
168 };
169
170 partition@a580000 {
171 label = "logs";
172 reg = <0xa580000 0x3a80000>;
173 read-only;
174 };
175
176 partition@e000000 {
177 label = "myzyxel";
178 reg = <0xe000000 0xf00000>;
179 read-only;
180 };
181
182 partition@ef00000 {
183 label = "bootconfig";
184 reg = <0xef00000 0x80000>;
185 };
186
187 partition@ef80000 {
188 label = "mrd";
189 reg = <0xef80000 0x80000>;
190 read-only;
191
192 compatible = "nvmem-cells";
193 #address-cells = <1>;
194 #size-cells = <1>;
195
196 macaddr_mrd_1fff8: macaddr@1fff8 {
197 reg = <0x1fff8 0x6>;
198 };
199 };
200 };
201 };
202 };
203
204 &pio {
205 spi0_flash_pins: spi0-pins {
206 mux {
207 function = "spi";
208 groups = "spi0", "spi0_wp_hold";
209 };
210 };
211
212 pwm_pins: pwm0-pins {
213 mux {
214 function = "pwm";
215 groups = "pwm0_1";
216 };
217 };
218 };
219
220 &wifi {
221 status = "okay";
222
223 mediatek,mtd-eeprom = <&factory 0x0>;
224 };