ramips: mt7620a: convert to nvmem-layout
[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 reg = <0x28 0x6>;
103 };
104 };
105 };
106
107 factory5g: partition@50000 {
108 label = "factory5g";
109 reg = <0x50000 0x10000>;
110 read-only;
111 };
112
113 partition@60000 {
114 label = "Wolf_Config";
115 reg = <0x60000 0x10000>;
116 read-only;
117 };
118
119 partition@70000 {
120 label = "MyDlink";
121 reg = <0x70000 0x80000>;
122 read-only;
123 };
124
125 partition@f0000 {
126 label = "Jffs2";
127 reg = <0xf0000 0x80000>;
128 read-only;
129 };
130
131 partition@170000 {
132 compatible = "denx,uimage";
133 label = "firmware";
134 reg = <0x170000 0x690000>;
135 };
136 };
137 };
138 };
139
140 &state_default {
141 gpio {
142 groups = "i2c", "uartf", "ephy";
143 function = "gpio";
144 };
145 };
146
147 &ethernet {
148 nvmem-cells = <&macaddr_factory_28>;
149 nvmem-cell-names = "mac-address";
150
151 mediatek,portmap = "llllw";
152 };
153
154 &gpio2 {
155 status = "okay";
156 };
157
158 &wmac {
159 pinctrl-names = "default", "pa_gpio";
160 pinctrl-0 = <&pa_pins>;
161 pinctrl-1 = <&pa_gpio_pins>;
162 nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_28>;
163 nvmem-cell-names = "eeprom", "mac-address";
164 };
165
166 &pcie {
167 status = "okay";
168 };
169
170 &pcie0 {
171 wifi@0,0 {
172 reg = <0x0000 0 0 0 0>;
173 ieee80211-freq-limit = <5000000 6000000>;
174 nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_28>;
175 nvmem-cell-names = "eeprom", "mac-address";
176 mac-address-increment = <2>;
177 };
178 };