ramips: mt7621: convert to nvmem-layout
[openwrt/staging/stintel.git] / target / linux / ramips / dts / mt7621_zyxel_nr7101.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "zyxel,nr7101", "mediatek,mt7621-soc";
10 model = "ZyXEL NR7101";
11
12 aliases {
13 led-boot = &led_system_green;
14 led-failsafe = &led_system_green;
15 led-running = &led_system_green;
16 led-upgrade = &led_system_green;
17 label-mac-device = &gmac0;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 system_yellow {
24 label = "yellow:system";
25 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
26 };
27
28 led_system_green: system_green {
29 label = "green:system";
30 gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
31 };
32
33 system_red {
34 label = "red:system";
35 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
36 };
37 };
38
39 keys {
40 compatible = "gpio-keys";
41
42 wps {
43 label = "wlan";
44 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
45 linux,code = <KEY_WLAN>;
46 };
47
48 reset {
49 label = "reset";
50 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
51 linux,code = <KEY_RESTART>;
52 };
53 };
54 };
55
56 &gpio {
57 lte_pwrkey {
58 gpio-hog;
59 gpios = <4 GPIO_ACTIVE_HIGH>;
60 output-high;
61 line-name = "lte-pwrkey";
62 };
63
64 lte_power {
65 gpio-hog;
66 gpios = <18 GPIO_ACTIVE_HIGH>;
67 output-high;
68 line-name = "lte-power";
69 };
70 };
71
72 &nand {
73 status = "okay";
74
75 partitions {
76 compatible = "fixed-partitions";
77 #address-cells = <1>;
78 #size-cells = <1>;
79
80 partition@0 {
81 label = "Bootloader";
82 reg = <0x0 0x80000>;
83 read-only;
84 };
85
86 partition@80000 {
87 label = "Config";
88 reg = <0x80000 0x80000>;
89 };
90
91 factory: partition@100000 {
92 label = "Factory";
93 reg = <0x100000 0x40000>;
94 read-only;
95
96 nvmem-layout {
97 compatible = "fixed-layout";
98 #address-cells = <1>;
99 #size-cells = <1>;
100
101 eeprom_factory_0: eeprom@0 {
102 reg = <0x0 0x400>;
103 };
104
105 macaddr_factory_e000: macaddr@e000 {
106 reg = <0xe000 0x6>;
107 };
108 };
109 };
110
111 partition@140000 {
112 label = "Kernel";
113 reg = <0x140000 0x1ec0000>;
114 };
115
116 partition@540000 {
117 label = "ubi";
118 reg = <0x540000 0x1ac0000>;
119 };
120
121 partition@2140000 {
122 label = "Kernel2";
123 reg = <0x2140000 0x1ec0000>;
124 };
125
126 partition@4000000 {
127 label = "wwan";
128 reg = <0x4000000 0x100000>;
129 };
130
131 partition@4100000 {
132 label = "data";
133 reg = <0x4100000 0x1000000>;
134 };
135
136 partition@5100000 {
137 label = "rom-d";
138 reg = <0x5100000 0x100000>;
139 read-only;
140 };
141
142 partition@5200000 {
143 label = "reserve";
144 reg = <0x5200000 0x80000>;
145 };
146 };
147 };
148
149 &pcie {
150 status = "okay";
151 };
152
153 &pcie0 {
154 mt76@0,0 {
155 reg = <0x0000 0 0 0 0>;
156 nvmem-cells = <&eeprom_factory_0>;
157 nvmem-cell-names = "eeprom";
158 };
159 };
160
161 &gmac0 {
162 nvmem-cells = <&macaddr_factory_e000>;
163 nvmem-cell-names = "mac-address";
164 };
165
166 &switch0 {
167 ports {
168 port@2 {
169 status = "okay";
170 label = "lan";
171 };
172 };
173 };
174
175 &state_default {
176 gpio {
177 groups = "i2c", "uart3", "jtag", "wdt";
178 function = "gpio";
179 };
180 };