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