ramips: convert MT7610 and MT7612 EEPROM to NVMEM format for MT7621
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_hilink_hlk-7621a-evb.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "hilink,hlk-7621a-evb", "mediatek,mt7621-soc";
10 model = "HiLink HLK-7621A evaluation board";
11
12 keys {
13 compatible = "gpio-keys";
14
15 reset {
16 label = "reset";
17 gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
18 linux,code = <KEY_RESTART>;
19 };
20 };
21 };
22
23 &spi0 {
24 status = "okay";
25
26 flash@0 {
27 compatible = "jedec,spi-nor";
28 reg = <0>;
29 spi-max-frequency = <44000000>;
30 broken-flash-reset;
31
32 partitions {
33 compatible = "fixed-partitions";
34 #address-cells = <1>;
35 #size-cells = <1>;
36
37 partition@0 {
38 label = "u-boot";
39 reg = <0x0 0x30000>;
40 read-only;
41 };
42
43 partition@30000 {
44 label = "u-boot-env";
45 reg = <0x30000 0x10000>;
46 read-only;
47 };
48
49 factory: partition@40000 {
50 compatible = "nvmem-cells";
51 label = "factory";
52 reg = <0x40000 0x10000>;
53 #address-cells = <1>;
54 #size-cells = <1>;
55 read-only;
56
57 eeprom_factory_8000: eeprom@8000 {
58 reg = <0x8000 0x200>;
59 };
60 };
61
62 partition@50000 {
63 compatible = "denx,uimage";
64 label = "firmware";
65 reg = <0x50000 0x1fb0000>;
66 };
67 };
68 };
69 };
70
71 &gmac1 {
72 status = "okay";
73 label = "wan";
74 phy-handle = <&ethphy4>;
75 };
76
77 &mdio {
78 ethphy4: ethernet-phy@4 {
79 reg = <4>;
80 };
81 };
82
83 &switch0 {
84 ports {
85 port@0 {
86 status = "okay";
87 label = "lan1";
88 };
89
90 port@1 {
91 status = "okay";
92 label = "lan2";
93 };
94
95 port@2 {
96 status = "okay";
97 label = "lan3";
98 };
99
100 port@3 {
101 status = "okay";
102 label = "lan4";
103 };
104 };
105 };
106
107 &pcie {
108 status = "okay";
109 };
110
111 &pcie2 {
112 wifi@0,0 {
113 compatible = "mediatek,mt76";
114 reg = <0x0000 0 0 0 0>;
115 nvmem-cells = <&eeprom_factory_8000>;
116 nvmem-cell-names = "eeprom";
117 };
118 };
119
120 &state_default {
121 gpio {
122 groups = "wdt";
123 function = "gpio";
124 };
125 };