ramips: mt7621: convert Wavlink devices EEPROM to NVMEM format
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_comfast_cf-wr758ac.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/gpio/gpio.h>
7
8 / {
9 compatible = "comfast,cf-wr758ac", "mediatek,mt7628an-soc";
10
11 keys {
12 compatible = "gpio-keys";
13
14 wps {
15 label = "wps";
16 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
17 linux,code = <KEY_WPS_BUTTON>;
18 };
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 wifi-high {
25 label = "blue:wifi-high";
26 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
27 };
28
29 wifi-med {
30 label = "blue:wifi-med";
31 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
32 };
33
34 wifi-low {
35 label = "blue:wifi-low";
36 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
37 };
38 };
39 };
40
41 &state_default {
42 gpio {
43 groups = "refclk", "wdt", "wled_an";
44 function = "gpio";
45 };
46 };
47
48 &pcie {
49 status = "okay";
50 };
51
52 &pcie0 {
53 wifi@0,0 {
54 compatible = "mediatek,mt76";
55 reg = <0x0000 0 0 0 0>;
56 nvmem-cells = <&eeprom_factory_8000>;
57 nvmem-cell-names = "eeprom";
58 ieee80211-freq-limit = <5000000 6000000>;
59 };
60 };
61
62 &spi0 {
63 status = "okay";
64
65 flash@0 {
66 compatible = "jedec,spi-nor";
67 reg = <0>;
68 spi-max-frequency = <50000000>;
69
70 partitions {
71 compatible = "fixed-partitions";
72 #address-cells = <1>;
73 #size-cells = <1>;
74
75 partition@0 {
76 label = "u-boot";
77 reg = <0x0 0x30000>;
78 read-only;
79 };
80
81 partition@30000 {
82 label = "u-boot-env";
83 reg = <0x30000 0x10000>;
84 read-only;
85 };
86
87 factory: partition@40000 {
88 label = "factory";
89 reg = <0x40000 0x10000>;
90 read-only;
91
92 nvmem-layout {
93 compatible = "fixed-layout";
94 #address-cells = <1>;
95 #size-cells = <1>;
96
97 eeprom_factory_0: eeprom@0 {
98 reg = <0x0 0x400>;
99 };
100
101 eeprom_factory_8000: eeprom@8000 {
102 reg = <0x8000 0x200>;
103 };
104
105 macaddr_factory_e000: macaddr@e000 {
106 reg = <0xe000 0x6>;
107 };
108 };
109 };
110
111 partition@50000 {
112 compatible = "denx,uimage";
113 label = "firmware";
114 reg = <0x50000 0x7b0000>;
115 };
116 };
117 };
118 };
119
120 &wmac {
121 status = "okay";
122
123 nvmem-cells = <&eeprom_factory_0>;
124 nvmem-cell-names = "eeprom";
125 };
126
127 &ethernet {
128 nvmem-cells = <&macaddr_factory_e000>;
129 nvmem-cell-names = "mac-address";
130 };
131
132 &esw {
133 mediatek,portdisable = <0x2f>;
134 };