e5946af9094f57e273582496fd7143bd6b6866e8
[openwrt/staging/jow.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 compatible = "nvmem-cells";
76 label = "factory";
77 reg = <0x40000 0x10000>;
78 #address-cells = <1>;
79 #size-cells = <1>;
80 read-only;
81
82 eeprom_factory_0: eeprom@0 {
83 reg = <0x0 0x400>;
84 };
85
86 eeprom_factory_8000: eeprom@8000 {
87 reg = <0x8000 0x200>;
88 };
89
90 macaddr_factory_e000: macaddr@e000 {
91 reg = <0xe000 0x6>;
92 };
93
94 macaddr_factory_e006: macaddr@e006 {
95 reg = <0xe006 0x6>;
96 };
97 };
98
99 partition@50000 {
100 compatible = "denx,uimage";
101 label = "firmware";
102 reg = <0x50000 0xfb0000>;
103 };
104 };
105 };
106 };
107
108 &pcie {
109 status = "okay";
110 };
111
112 &pcie0 {
113 mt76@0,0 {
114 reg = <0x0000 0 0 0 0>;
115 nvmem-cells = <&eeprom_factory_8000>;
116 nvmem-cell-names = "eeprom";
117 ieee80211-freq-limit = <5000000 6000000>;
118 };
119 };
120
121 &pcie1 {
122 mt76@0,0 {
123 reg = <0x0000 0 0 0 0>;
124 nvmem-cells = <&eeprom_factory_0>;
125 nvmem-cell-names = "eeprom";
126 };
127 };
128
129 &gmac0 {
130 nvmem-cells = <&macaddr_factory_e000>;
131 nvmem-cell-names = "mac-address";
132 };
133
134 &gmac1 {
135 status = "okay";
136 label = "wan";
137 phy-handle = <&ethphy4>;
138
139 nvmem-cells = <&macaddr_factory_e006>;
140 nvmem-cell-names = "mac-address";
141 };
142
143 &mdio {
144 ethphy4: ethernet-phy@4 {
145 reg = <4>;
146 };
147 };
148
149 &switch0 {
150 ports {
151 port@0 {
152 status = "okay";
153 label = "lan1";
154 };
155
156 port@1 {
157 status = "okay";
158 label = "lan2";
159 };
160
161 port@2 {
162 status = "okay";
163 label = "lan3";
164 };
165
166 port@3 {
167 status = "okay";
168 label = "lan4";
169 };
170 };
171 };
172
173 &state_default {
174 gpio {
175 groups = "sdhci";
176 function = "gpio";
177 };
178 };