453208eb34ed9034fa004ba7daa919865dd3cc71
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_humax_e2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7620a.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,e2", "ralink,mt7620a-soc";
11 model = "HUMAX E2";
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 = &ethernet;
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 led_power: power {
25 label = "green:power";
26 gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
27 };
28
29 pairing {
30 label = "green:pairing";
31 gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
32 };
33
34 wlan {
35 label = "green:wlan";
36 gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
37 };
38
39 lan {
40 label = "green:lan";
41 gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
42 };
43
44 wps {
45 label = "green:wps";
46 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
47 };
48 };
49
50 keys {
51 compatible = "gpio-keys";
52
53 reset {
54 label = "reset";
55 gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
56 linux,code = <KEY_RESTART>;
57 };
58 };
59 };
60
61 &gpio1 {
62 status = "okay";
63 };
64
65 &spi0 {
66 status = "okay";
67
68 flash@0 {
69 compatible = "jedec,spi-nor";
70 reg = <0>;
71 spi-max-frequency = <50000000>;
72
73 partitions {
74 compatible = "fixed-partitions";
75 #address-cells = <1>;
76 #size-cells = <1>;
77
78 partition@0 {
79 label = "u-boot";
80 reg = <0x0 0x30000>;
81 read-only;
82 };
83
84 partition@30000 {
85 label = "u-boot-env";
86 reg = <0x30000 0x10000>;
87 read-only;
88 };
89
90 factory: partition@40000 {
91 label = "factory";
92 reg = <0x40000 0x30000>;
93 read-only;
94
95 nvmem-layout {
96 compatible = "fixed-layout";
97 #address-cells = <1>;
98 #size-cells = <1>;
99
100 eeprom_factory_0: eeprom@0 {
101 reg = <0x0 0x200>;
102 };
103
104 eeprom_factory_8000: eeprom@8000 {
105 reg = <0x8000 0x200>;
106 };
107
108 macaddr_factory_10007: macaddr@10007 {
109 reg = <0x10007 0x6>;
110 };
111 };
112 };
113
114 partition@70000 {
115 compatible = "openwrt,uimage", "denx,uimage";
116 openwrt,offset = <FW_EDIMAX_OFFSET>;
117 openwrt,partition-magic = <FW_MAGIC_EDIMAX>;
118 label = "firmware";
119 reg = <0x70000 0x790000>;
120 };
121 };
122 };
123 };
124
125 &ethernet {
126 nvmem-cells = <&macaddr_factory_10007>;
127 nvmem-cell-names = "mac-address";
128 };
129
130 &pcie {
131 status = "okay";
132 };
133
134 &pcie0 {
135 wifi@0,0 {
136 compatible = "mediatek,mt76";
137 reg = <0x0000 0 0 0 0>;
138 nvmem-cells = <&eeprom_factory_8000>;
139 nvmem-cell-names = "eeprom";
140 ieee80211-freq-limit = <5000000 6000000>;
141 };
142 };
143
144 &wmac {
145 nvmem-cells = <&eeprom_factory_0>;
146 nvmem-cell-names = "eeprom";
147 };
148
149 &state_default {
150 gpio {
151 groups = "rgmii1";
152 function = "gpio";
153 };
154 };