ramips: TP-link archer A6/C6 device tree updates
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_zbtlink_zbt-wg3526.dtsi
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "zbtlink,zbt-wg3526", "mediatek,mt7621-soc";
8
9 aliases {
10 led-boot = &led_status;
11 led-failsafe = &led_status;
12 led-running = &led_status;
13 led-upgrade = &led_status;
14 label-mac-device = &wifi0;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,115200";
19 };
20
21 keys {
22 compatible = "gpio-keys";
23
24 reset {
25 label = "reset";
26 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
27 linux,code = <KEY_RESTART>;
28 };
29 };
30
31 leds {
32 compatible = "gpio-leds";
33
34 led_status: status {
35 label = "green:status";
36 gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
37 };
38 };
39 };
40
41 &i2c {
42 status = "okay";
43 };
44
45 &sdhci {
46 status = "okay";
47 };
48
49 &spi0 {
50 status = "okay";
51
52 flash0: flash@0 {
53 compatible = "jedec,spi-nor";
54 reg = <0>;
55 spi-max-frequency = <10000000>;
56
57 partitions {
58 compatible = "fixed-partitions";
59 #address-cells = <1>;
60 #size-cells = <1>;
61
62 partition@0 {
63 label = "u-boot";
64 reg = <0x0 0x30000>;
65 read-only;
66 };
67
68 partition@30000 {
69 label = "u-boot-env";
70 reg = <0x30000 0x10000>;
71 read-only;
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
95 firmware: partition@50000 {
96 compatible = "denx,uimage";
97 label = "firmware";
98 };
99 };
100 };
101 };
102
103 &pcie {
104 status = "okay";
105 };
106
107 &pcie0 {
108 wifi0: wifi@0,0 {
109 compatible = "pci14c3,7603";
110 reg = <0x0000 0 0 0 0>;
111 nvmem-cells = <&eeprom_factory_0>;
112 nvmem-cell-names = "eeprom";
113 };
114 };
115
116 &pcie1 {
117 wifi1: wifi@0,0 {
118 compatible = "pci14c3,7662";
119 reg = <0x0000 0 0 0 0>;
120 nvmem-cells = <&eeprom_factory_8000>;
121 nvmem-cell-names = "eeprom";
122 ieee80211-freq-limit = <5000000 6000000>;
123
124 led {
125 led-sources = <2>;
126 };
127 };
128 };
129
130 &ethernet {
131 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
132 };
133
134 &gmac0 {
135 nvmem-cells = <&macaddr_factory_e000>;
136 nvmem-cell-names = "mac-address";
137 };
138
139 &switch0 {
140 ports {
141 port@0 {
142 status = "okay";
143 label = "lan1";
144 };
145
146 port@1 {
147 status = "okay";
148 label = "lan2";
149 };
150
151 port@2 {
152 status = "okay";
153 label = "lan3";
154 };
155
156 port@3 {
157 status = "okay";
158 label = "lan4";
159 };
160
161 port@4 {
162 status = "okay";
163 label = "wan";
164 nvmem-cells = <&macaddr_factory_e000>;
165 nvmem-cell-names = "mac-address";
166 mac-address-increment = <1>;
167 };
168 };
169 };
170
171 &state_default {
172 gpio {
173 groups = "wdt", "rgmii2";
174 function = "gpio";
175 };
176 };