ramips: add support for HUMAX E2
[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 compatible = "nvmem-cells";
96 #address-cells = <1>;
97 #size-cells = <1>;
98
99 macaddr_factory_10007: macaddr@10007 {
100 reg = <0x10007 0x6>;
101 };
102 };
103
104 partition@70000 {
105 compatible = "openwrt,uimage", "denx,uimage";
106 openwrt,offset = <FW_EDIMAX_OFFSET>;
107 openwrt,partition-magic = <FW_MAGIC_EDIMAX>;
108 label = "firmware";
109 reg = <0x70000 0x790000>;
110 };
111 };
112 };
113 };
114
115 &ethernet {
116 nvmem-cells = <&macaddr_factory_10007>;
117 nvmem-cell-names = "mac-address";
118 };
119
120 &pcie {
121 status = "okay";
122 };
123
124 &pcie0 {
125 wifi@0,0 {
126 compatible = "mediatek,mt76";
127 reg = <0x0000 0 0 0 0>;
128 mediatek,mtd-eeprom = <&factory 0x8000>;
129 ieee80211-freq-limit = <5000000 6000000>;
130 };
131 };
132
133 &wmac {
134 ralink,mtd-eeprom = <&factory 0x0>;
135 };
136
137 &state_default {
138 gpio {
139 groups = "rgmii1";
140 function = "gpio";
141 };
142 };