ramips: convert mtd-mac-address to nvmem implementation
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7621_netgear_wac104.dts
1 // SPDX-License-Identifier: GPL-2.0-only 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 = "netgear,wac104", "mediatek,mt7621-soc";
10 model = "Netgear WAC104";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 label-mac-device = &gmac0;
18 };
19
20 keys {
21 compatible = "gpio-keys";
22
23 wps {
24 label = "wps";
25 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
26 linux,code = <KEY_WPS_BUTTON>;
27 };
28
29 wifi {
30 label = "wifi";
31 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_RFKILL>;
33 };
34
35 reset {
36 label = "reset";
37 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
38 linux,code = <KEY_RESTART>;
39 };
40 };
41
42 leds {
43 compatible = "gpio-leds";
44
45 wps {
46 label = "green:wps";
47 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
48 };
49
50 led_power: power {
51 label = "green:power";
52 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
53 };
54
55 wifi {
56 label = "green:wifi";
57 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
58 linux,default-trigger = "phy0tpt";
59 };
60 };
61 };
62
63 &gmac0 {
64 nvmem-cells = <&macaddr_factory_4>;
65 nvmem-cell-names = "mac-address";
66 };
67
68 &nand {
69 status = "okay";
70
71 partitions {
72 compatible = "fixed-partitions";
73 #address-cells = <1>;
74 #size-cells = <1>;
75
76 partition@0 {
77 label = "u-boot";
78 reg = <0x0 0x100000>;
79 read-only;
80 };
81
82 partition@100000 {
83 label = "SC PID";
84 reg = <0x100000 0x100000>;
85 read-only;
86 };
87
88 partition@200000 {
89 label = "kernel";
90 reg = <0x200000 0x400000>;
91 };
92
93 partition@600000 {
94 label = "ubi";
95 reg = <0x600000 0x1c00000>;
96 };
97
98 factory: partition@2e00000 {
99 label = "factory";
100 reg = <0x2e00000 0x100000>;
101 read-only;
102 };
103
104 partition@4200000 {
105 label = "reserved";
106 reg = <0x4200000 0x3c00000>;
107 read-only;
108 };
109 };
110 };
111
112 &pcie {
113 status = "okay";
114 };
115
116 &pcie0 {
117 wifi@0,0 {
118 compatible = "mediatek,mt76";
119 reg = <0x0 0 0 0 0>;
120 mediatek,mtd-eeprom = <&factory 0x8000>;
121 ieee80211-freq-limit = <5000000 6000000>;
122 };
123 };
124
125 &pcie1 {
126 wifi@0,0 {
127 compatible = "mediatek,mt76";
128 reg = <0x0 0 0 0 0>;
129 mediatek,mtd-eeprom = <&factory 0x0>;
130 ieee80211-freq-limit = <2400000 2500000>;
131 };
132 };
133
134 &state_default {
135 gpio {
136 groups = "uart3", "jtag", "wdt";
137 function = "gpio";
138 };
139 };
140
141 &switch0 {
142 ports {
143 port@0 {
144 status = "okay";
145 label = "lan4";
146 };
147
148 port@1 {
149 status = "okay";
150 label = "lan3";
151 };
152
153 port@2 {
154 status = "okay";
155 label = "lan2";
156 };
157
158 port@3 {
159 status = "okay";
160 label = "lan1";
161 };
162 };
163 };
164
165 &xhci {
166 status = "disabled";
167 };
168
169 &factory {
170 compatible = "nvmem-cells";
171 #address-cells = <1>;
172 #size-cells = <1>;
173
174 macaddr_factory_4: macaddr@4 {
175 reg = <0x4 0x6>;
176 };
177 };