ramips: mt7621: convert to nvmem-layout
[openwrt/staging/nbd.git] / target / linux / ramips / dts / mt7621_tplink_eap613-v1.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 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "tplink,eap613-v1", "mediatek,mt7621-soc";
11 model = "TP-Link EAP613 v1";
12
13 aliases {
14 label-mac-device = &gmac0;
15 led-boot = &led_status;
16 led-failsafe = &led_status;
17 led-running = &led_status;
18 led-upgrade = &led_status;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,115200";
23 };
24
25 leds {
26 compatible = "gpio-leds";
27
28 led_status: status {
29 label = "blue:status";
30 color = <LED_COLOR_ID_BLUE>;
31 function = LED_FUNCTION_STATUS;
32 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
33 };
34 };
35
36 keys {
37 compatible = "gpio-keys";
38
39 reset {
40 label = "reset";
41 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
42 linux,code = <KEY_RESTART>;
43 };
44 };
45 };
46
47 &spi0 {
48 status = "okay";
49
50 flash@0 {
51 compatible = "jedec,spi-nor";
52 reg = <0>;
53 spi-max-frequency = <20000000>;
54
55 partitions {
56 compatible = "fixed-partitions";
57 #address-cells = <1>;
58 #size-cells = <1>;
59
60 partition@0 {
61 label = "u-boot";
62 reg = <0x0 0x80000>;
63 read-only;
64 };
65
66 partition@80000 {
67 label = "partition-table";
68 reg = <0x80000 0x10000>;
69 read-only;
70 };
71
72 partition@90000 {
73 label = "product-info";
74 reg = <0x90000 0x10000>;
75 read-only;
76
77 nvmem-layout {
78 compatible = "fixed-layout";
79 #address-cells = <1>;
80 #size-cells = <1>;
81
82 macaddr: macaddr@8 {
83 reg = <0x8 0x6>;
84 };
85 };
86 };
87
88 partition@a0000 {
89 compatible = "denx,fit";
90 label = "firmware";
91 reg = <0xa0000 0xcf0000>;
92 };
93
94 partition@d90000 {
95 label = "user-config";
96 reg = <0xd90000 0x60000>;
97 read-only;
98 };
99
100 partition@f30000 {
101 label = "mutil-log";
102 reg = <0xf30000 0x80000>;
103 read-only;
104 };
105
106 partition@fb0000 {
107 label = "oops";
108 reg = <0xfb0000 0x40000>;
109 read-only;
110 };
111
112 radio: partition@ff0000 {
113 label = "radio";
114 reg = <0xff0000 0x10000>;
115 read-only;
116 };
117 };
118 };
119 };
120
121 &state_default {
122 gpio {
123 groups = "uart3";
124 function = "gpio";
125 };
126 };
127
128 &pcie {
129 status = "okay";
130 };
131
132 &pcie1 {
133 wifi@0,0 {
134 compatible = "mediatek,mt76";
135 reg = <0x0000 0 0 0 0>;
136 mediatek,mtd-eeprom = <&radio 0x0>;
137 mediatek,disable-radar-background;
138 };
139 };
140
141 &gmac0 {
142 nvmem-cells = <&macaddr>;
143 nvmem-cell-names = "mac-address";
144 };
145
146 &switch0 {
147 ports {
148 port@0 {
149 status = "okay";
150 label = "lan";
151 };
152 };
153 };