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