ramips: move dts-v1 statement to top-level DTSI files
[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 = "sk-wb8:green:wps";
22 gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
23 };
24
25 usb {
26 label = "sk-wb8: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
80 partition@50000 {
81 compatible = "denx,uimage";
82 label = "firmware";
83 reg = <0x50000 0xfb0000>;
84 };
85 };
86 };
87 };
88
89 &pcie {
90 status = "okay";
91 };
92
93 &pcie0 {
94 mt76@0,0 {
95 reg = <0x0000 0 0 0 0>;
96 mediatek,mtd-eeprom = <&factory 0x8000>;
97 ieee80211-freq-limit = <5000000 6000000>;
98 };
99 };
100
101 &pcie1 {
102 mt76@0,0 {
103 reg = <0x0000 0 0 0 0>;
104 mediatek,mtd-eeprom = <&factory 0x0000>;
105 };
106 };
107
108 &gmac0 {
109 mtd-mac-address = <&factory 0xe000>;
110 };
111
112 &switch0 {
113 ports {
114 port@0 {
115 status = "okay";
116 label = "lan1";
117 };
118
119 port@1 {
120 status = "okay";
121 label = "lan2";
122 };
123
124 port@2 {
125 status = "okay";
126 label = "lan3";
127 };
128
129 port@3 {
130 status = "okay";
131 label = "lan4";
132 };
133
134 port@4 {
135 status = "okay";
136 label = "wan";
137 mtd-mac-address = <&factory 0xe006>;
138 };
139 };
140 };
141
142 &state_default {
143 gpio {
144 groups = "sdhci";
145 function = "gpio";
146 };
147 };