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