ramips: dts: rt5350: reset FE and ESW cores together
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_samknows_whitebox-v8.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/input/input.h>
4 #include <dt-bindings/gpio/gpio.h>
5
6 / {
7 compatible = "samknows,whitebox-v8", "mediatek,mt7621-soc";
8 model = "SamKnows Whitebox 8";
9
10 aliases {
11 led-boot = &led_wps;
12 led-failsafe = &led_wps;
13 led-running = &led_wps;
14 led-upgrade = &led_wps;
15 };
16
17 leds {
18 compatible = "gpio-leds";
19
20 led_wps: wps {
21 label = "green:wps";
22 gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
23 };
24
25 usb {
26 label = "green:usb";
27 gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
28 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
29 linux,default-trigger = "usbport";
30 };
31 };
32
33 keys {
34 compatible = "gpio-keys";
35
36 wps {
37 label = "wps";
38 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
39 linux,code = <KEY_WPS_BUTTON>;
40 };
41
42 reset {
43 label = "reset";
44 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
45 linux,code = <KEY_RESTART>;
46 };
47 };
48 };
49
50 &spi0 {
51 status = "okay";
52
53 flash@0 {
54 compatible = "jedec,spi-nor";
55 reg = <0>;
56 spi-max-frequency = <10000000>;
57
58 partitions {
59 compatible = "fixed-partitions";
60 #address-cells = <1>;
61 #size-cells = <1>;
62
63 partition@0 {
64 label = "u-boot";
65 reg = <0x0 0x30000>;
66 read-only;
67 };
68
69 partition@30000 {
70 label = "u-boot-env";
71 reg = <0x30000 0x10000>;
72 };
73
74 factory: partition@40000 {
75 label = "factory";
76 reg = <0x40000 0x10000>;
77 read-only;
78
79 nvmem-layout {
80 compatible = "fixed-layout";
81 #address-cells = <1>;
82 #size-cells = <1>;
83
84 eeprom_factory_0: eeprom@0 {
85 reg = <0x0 0x400>;
86 };
87
88 eeprom_factory_8000: eeprom@8000 {
89 reg = <0x8000 0x200>;
90 };
91
92 macaddr_factory_e000: macaddr@e000 {
93 reg = <0xe000 0x6>;
94 };
95
96 macaddr_factory_e006: macaddr@e006 {
97 reg = <0xe006 0x6>;
98 };
99 };
100 };
101
102 partition@50000 {
103 compatible = "denx,uimage";
104 label = "firmware";
105 reg = <0x50000 0xfb0000>;
106 };
107 };
108 };
109 };
110
111 &pcie {
112 status = "okay";
113 };
114
115 &pcie0 {
116 mt76@0,0 {
117 reg = <0x0000 0 0 0 0>;
118 nvmem-cells = <&eeprom_factory_8000>;
119 nvmem-cell-names = "eeprom";
120 ieee80211-freq-limit = <5000000 6000000>;
121 };
122 };
123
124 &pcie1 {
125 mt76@0,0 {
126 reg = <0x0000 0 0 0 0>;
127 nvmem-cells = <&eeprom_factory_0>;
128 nvmem-cell-names = "eeprom";
129 };
130 };
131
132 &gmac0 {
133 nvmem-cells = <&macaddr_factory_e000>;
134 nvmem-cell-names = "mac-address";
135 };
136
137 &gmac1 {
138 status = "okay";
139 label = "wan";
140 phy-handle = <&ethphy4>;
141
142 nvmem-cells = <&macaddr_factory_e006>;
143 nvmem-cell-names = "mac-address";
144 };
145
146 &mdio {
147 ethphy4: ethernet-phy@4 {
148 reg = <4>;
149 };
150 };
151
152 &switch0 {
153 ports {
154 port@0 {
155 status = "okay";
156 label = "lan1";
157 };
158
159 port@1 {
160 status = "okay";
161 label = "lan2";
162 };
163
164 port@2 {
165 status = "okay";
166 label = "lan3";
167 };
168
169 port@3 {
170 status = "okay";
171 label = "lan4";
172 };
173 };
174 };
175
176 &state_default {
177 gpio {
178 groups = "sdhci";
179 function = "gpio";
180 };
181 };