ramips: mt7621: Add support for ZyXEL NR7101
[openwrt/staging/mkresin.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 = &power;
14 led-failsafe = &power;
15 led-running = &power;
16 led-upgrade = &power;
17 label-mac-device = &gmac0;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 led@13 {
24 label = "yellow:system";
25 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
26 };
27
28 power: led@14 {
29 label = "green:system";
30 gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
31 };
32
33 led@15 {
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
97 partition@140000 {
98 label = "Kernel";
99 reg = <0x140000 0x1ec0000>;
100 };
101
102 partition@540000 {
103 label = "ubi";
104 reg = <0x540000 0x1ac0000>;
105 };
106
107 partition@2140000 {
108 label = "Kernel2";
109 reg = <0x2140000 0x1ec0000>;
110 };
111
112 partition@4000000 {
113 label = "wwan";
114 reg = <0x4000000 0x100000>;
115 };
116
117 partition@4100000 {
118 label = "data";
119 reg = <0x4100000 0x1000000>;
120 };
121
122 partition@5100000 {
123 label = "rom-d";
124 reg = <0x5100000 0x100000>;
125 read-only;
126 };
127
128 partition@5200000 {
129 label = "reserve";
130 reg = <0x5200000 0x80000>;
131 };
132 };
133 };
134
135 &pcie {
136 status = "okay";
137 };
138
139 &pcie0 {
140 mt76@0,0 {
141 reg = <0x0000 0 0 0 0>;
142 mediatek,mtd-eeprom = <&factory 0x0>;
143 };
144 };
145
146 &gmac0 {
147 mtd-mac-address = <&factory 0xe000>;
148 };
149
150 &switch0 {
151 ports {
152 port@2 {
153 status = "okay";
154 label = "lan";
155 };
156 };
157 };
158
159 &state_default {
160 gpio {
161 groups = "i2c", "rgmii2", "uart3", "jtag", "wdt";
162 function = "gpio";
163 };
164 };