ac13b4a9c593cec83da594e8fcf667ced722b6d0
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7621_humax_e10.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 #include <dt-bindings/mtd/partitions/uimage.h>
8
9 / {
10 compatible = "humax,e10", "mediatek,mt7621-soc";
11 model = "HUMAX E10";
12
13 aliases {
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 label-mac-device = &gmac1;
19 };
20
21 gpio-export {
22 compatible = "gpio-export";
23
24 gpio-usb-power {
25 gpio-export,name = "power:usb";
26 gpio-export,output = <1>;
27 gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
28 };
29 };
30
31 leds {
32 compatible = "gpio-leds";
33
34 led_power: power {
35 label = "green:power";
36 gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
37 };
38
39 pairing {
40 label = "green:pairing";
41 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
42 };
43
44 wlan {
45 label = "green:wlan";
46 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
47 };
48
49 wps {
50 label = "green:wps";
51 gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
52 };
53 };
54
55 keys {
56 compatible = "gpio-keys";
57
58 wps-reset {
59 label = "wps_reset";
60 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
61 linux,code = <KEY_RESTART>;
62 };
63 };
64 };
65
66 &spi0 {
67 status = "okay";
68
69 flash@0 {
70 compatible = "jedec,spi-nor";
71 reg = <0>;
72 spi-max-frequency = <50000000>;
73
74 partitions {
75 compatible = "fixed-partitions";
76 #address-cells = <1>;
77 #size-cells = <1>;
78
79 partition@0 {
80 label = "u-boot";
81 reg = <0x0 0x30000>;
82 read-only;
83 };
84
85 partition@30000 {
86 label = "u-boot-env";
87 reg = <0x30000 0x10000>;
88 read-only;
89 };
90
91 factory: partition@40000 {
92 compatible = "nvmem-cells";
93 label = "factory";
94 reg = <0x40000 0x30000>;
95 #address-cells = <1>;
96 #size-cells = <1>;
97 read-only;
98
99 eeprom_factory_0: eeprom@0 {
100 reg = <0x0 0x4da8>;
101 };
102
103 eeprom_factory_8000: eeprom@8000 {
104 reg = <0x8000 0x4da8>;
105 };
106
107 macaddr_factory_10007: macaddr@10007 {
108 reg = <0x10007 0x6>;
109 };
110
111 macaddr_factory_1000d: macaddr@1000d {
112 reg = <0x1000d 0x6>;
113 };
114 };
115
116 partition@70000 {
117 compatible = "openwrt,uimage", "denx,uimage";
118 openwrt,offset = <FW_EDIMAX_OFFSET>;
119 openwrt,partition-magic = <FW_MAGIC_EDIMAX>;
120 label = "firmware";
121 reg = <0x70000 0xf90000>;
122 };
123 };
124 };
125 };
126
127 &pcie {
128 status = "okay";
129 };
130
131 &pcie0 {
132 wifi@0,0 {
133 compatible = "mediatek,mt76";
134 reg = <0x0000 0 0 0 0>;
135 nvmem-cells = <&eeprom_factory_0>;
136 nvmem-cell-names = "eeprom";
137 ieee80211-freq-limit = <2400000 2500000>;
138 };
139 };
140
141 &pcie1 {
142 wifi@0,0 {
143 compatible = "mediatek,mt76";
144 reg = <0x0000 0 0 0 0>;
145 nvmem-cells = <&eeprom_factory_8000>;
146 nvmem-cell-names = "eeprom";
147 ieee80211-freq-limit = <5000000 6000000>;
148 };
149 };
150
151 &gmac0 {
152 nvmem-cells = <&macaddr_factory_10007>;
153 nvmem-cell-names = "mac-address";
154 };
155
156 &gmac1 {
157 status = "okay";
158 label = "wan";
159 phy-handle = <&ethphy0>;
160
161 nvmem-cells = <&macaddr_factory_1000d>;
162 nvmem-cell-names = "mac-address";
163 };
164
165 &mdio {
166 ethphy0: ethernet-phy@0 {
167 reg = <0>;
168 };
169 };
170
171 &switch0 {
172 ports {
173 port@1 {
174 status = "okay";
175 label = "lan";
176 };
177 };
178 };
179
180 &state_default {
181 gpio {
182 groups = "jtag", "uart2", "uart3", "wdt";
183 function = "gpio";
184 };
185 };