ramips: mt7620a: use mac-base
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7620a_cameo_810.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 aliases {
10 label-mac-device = &ethernet;
11 led-boot = &led_power_green;
12 led-failsafe = &led_power_green;
13 led-running = &led_power_green;
14 led-upgrade = &led_power_green;
15 };
16
17 keys {
18 compatible = "gpio-keys";
19
20 reset {
21 label = "reset";
22 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
23 linux,code = <KEY_RESTART>;
24 };
25
26 wps {
27 label = "wps";
28 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
29 linux,code = <KEY_WPS_BUTTON>;
30 };
31 };
32
33 leds {
34 compatible = "gpio-leds";
35
36 led_power_green: power_green {
37 label = "green:power";
38 gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
39 };
40
41 wan_orange {
42 label = "orange:wan";
43 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
44 };
45
46 wan_green {
47 label = "green:wan";
48 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
49 };
50
51 power_orange {
52 label = "orange:power";
53 gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
54 };
55 };
56 };
57
58 &spi0 {
59 status = "okay";
60
61 flash@0 {
62 compatible = "jedec,spi-nor";
63 reg = <0>;
64 spi-max-frequency = <50000000>;
65
66 partitions {
67 compatible = "fixed-partitions";
68 #address-cells = <1>;
69 #size-cells = <1>;
70
71 partition@0 {
72 label = "u-boot";
73 reg = <0x0 0x30000>;
74 read-only;
75 };
76
77 partition@30000 {
78 label = "u-boot-env";
79 reg = <0x30000 0x10000>;
80 read-only;
81 };
82
83 factory: partition@40000 {
84 label = "factory";
85 reg = <0x40000 0x10000>;
86 read-only;
87
88 nvmem-layout {
89 compatible = "fixed-layout";
90 #address-cells = <1>;
91 #size-cells = <1>;
92
93 eeprom_factory_0: eeprom@0 {
94 reg = <0x0 0x200>;
95 };
96
97 eeprom_factory_8000: eeprom@8000 {
98 reg = <0x8000 0x200>;
99 };
100
101 macaddr_factory_28: macaddr@28 {
102 compatible = "mac-base";
103 reg = <0x28 0x6>;
104 #nvmem-cell-cells = <1>;
105 };
106 };
107 };
108
109 factory5g: partition@50000 {
110 label = "factory5g";
111 reg = <0x50000 0x10000>;
112 read-only;
113 };
114
115 partition@60000 {
116 label = "Wolf_Config";
117 reg = <0x60000 0x10000>;
118 read-only;
119 };
120
121 partition@70000 {
122 label = "MyDlink";
123 reg = <0x70000 0x80000>;
124 read-only;
125 };
126
127 partition@f0000 {
128 label = "Jffs2";
129 reg = <0xf0000 0x80000>;
130 read-only;
131 };
132
133 partition@170000 {
134 compatible = "denx,uimage";
135 label = "firmware";
136 reg = <0x170000 0x690000>;
137 };
138 };
139 };
140 };
141
142 &state_default {
143 gpio {
144 groups = "i2c", "uartf", "ephy";
145 function = "gpio";
146 };
147 };
148
149 &ethernet {
150 nvmem-cells = <&macaddr_factory_28 0>;
151 nvmem-cell-names = "mac-address";
152
153 mediatek,portmap = "llllw";
154 };
155
156 &gpio2 {
157 status = "okay";
158 };
159
160 &wmac {
161 pinctrl-names = "default", "pa_gpio";
162 pinctrl-0 = <&pa_pins>;
163 pinctrl-1 = <&pa_gpio_pins>;
164 nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_28 0>;
165 nvmem-cell-names = "eeprom", "mac-address";
166 };
167
168 &pcie {
169 status = "okay";
170 };
171
172 &pcie0 {
173 wifi@0,0 {
174 reg = <0x0000 0 0 0 0>;
175 ieee80211-freq-limit = <5000000 6000000>;
176 nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_28 2>;
177 nvmem-cell-names = "eeprom", "mac-address";
178 };
179 };