ramips: mt7621: convert Xiaomi devices EEPROM to NVMEM format
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_unielec_u7621-01.dtsi
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 = "unielec,u7621-01", "mediatek,mt7621-soc";
10
11 aliases {
12 led-boot = &led_status;
13 led-failsafe = &led_status;
14 led-running = &led_status;
15 led-upgrade = &led_status;
16 };
17
18 gpio-export {
19 compatible = "gpio-export";
20 #size-cells = <0>;
21
22 modem_reset {
23 gpio-export,name = "modem_reset";
24 gpio-export,output = <1>;
25 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
26 };
27 };
28
29 keys {
30 compatible = "gpio-keys";
31
32 reset {
33 label = "reset";
34 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
35 linux,code = <KEY_RESTART>;
36 };
37 };
38
39 leds {
40 compatible = "gpio-leds";
41
42 led_status: status {
43 label = "green:status";
44 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
45 };
46 };
47 };
48
49 &pcie {
50 status = "okay";
51 };
52
53 &pcie1 { // MT7603EN
54 wifi@0,0 {
55 compatible = "mediatek,mt76";
56 reg = <0x0000 0 0 0 0>;
57 nvmem-cells = <&eeprom_factory_0>;
58 nvmem-cell-names = "eeprom";
59
60 led {
61 led-active-low;
62 };
63 };
64 };
65
66 &pcie2 { // MT7612E
67 wifi@0,0 {
68 compatible = "mediatek,mt76";
69 reg = <0x0000 0 0 0 0>;
70 nvmem-cells = <&eeprom_factory_8000>;
71 nvmem-cell-names = "eeprom";
72 ieee80211-freq-limit = <5000000 6000000>;
73 };
74 };
75
76 &gmac1 {
77 status = "okay";
78 label = "wan";
79 phy-handle = <&ethphy0>;
80 };
81
82 &mdio {
83 ethphy0: ethernet-phy@0 {
84 reg = <0>;
85 };
86 };
87
88 &switch0 {
89 ports {
90 port@1 {
91 status = "okay";
92 label = "lan1";
93 };
94
95 port@2 {
96 status = "okay";
97 label = "lan2";
98 };
99
100 port@3 {
101 status = "okay";
102 label = "lan3";
103 };
104
105 port@4 {
106 status = "okay";
107 label = "lan4";
108 };
109 };
110 };
111
112 &state_default {
113 gpio {
114 groups = "jtag", "uart2", "wdt";
115 function = "gpio";
116 };
117 };