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