treewide: convert mtd-mac-address-increment* to generic implementation
[openwrt/openwrt.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
89 factory5g: partition@50000 {
90 label = "factory5g";
91 reg = <0x50000 0x10000>;
92 read-only;
93 };
94
95 partition@60000 {
96 label = "Wolf_Config";
97 reg = <0x60000 0x10000>;
98 read-only;
99 };
100
101 partition@70000 {
102 label = "MyDlink";
103 reg = <0x70000 0x80000>;
104 read-only;
105 };
106
107 partition@f0000 {
108 label = "Jffs2";
109 reg = <0xf0000 0x80000>;
110 read-only;
111 };
112
113 partition@170000 {
114 compatible = "denx,uimage";
115 label = "firmware";
116 reg = <0x170000 0x690000>;
117 };
118 };
119 };
120 };
121
122 &state_default {
123 gpio {
124 groups = "i2c", "uartf", "ephy";
125 function = "gpio";
126 };
127 };
128
129 &ethernet {
130 mtd-mac-address = <&factory 0x28>;
131
132 mediatek,portmap = "llllw";
133 };
134
135 &gpio2 {
136 status = "okay";
137 };
138
139 &wmac {
140 pinctrl-names = "default";
141 pinctrl-0 = <&pa_pins>;
142
143 ralink,mtd-eeprom = <&factory 0x0>;
144 mtd-mac-address = <&factory 0x28>;
145 };
146
147 &pcie {
148 status = "okay";
149 };
150
151 &pcie0 {
152 wifi@0,0 {
153 reg = <0x0000 0 0 0 0>;
154 mediatek,mtd-eeprom = <&factory 0x8000>;
155 ieee80211-freq-limit = <5000000 6000000>;
156 mtd-mac-address = <&factory 0x28>;
157 mac-address-increment = <2>;
158 };
159 };