ramips: convert to new LED color/function format where possible
[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 #include <dt-bindings/leds/common.h>
6
7 / {
8 compatible = "zbtlink,zbt-wg3526", "mediatek,mt7621-soc";
9
10 aliases {
11 led-boot = &led_status;
12 led-failsafe = &led_status;
13 led-running = &led_status;
14 led-upgrade = &led_status;
15 label-mac-device = &wifi0;
16 };
17
18 chosen {
19 bootargs = "console=ttyS0,115200";
20 };
21
22 keys {
23 compatible = "gpio-keys";
24
25 reset {
26 label = "reset";
27 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
28 linux,code = <KEY_RESTART>;
29 };
30 };
31
32 leds {
33 compatible = "gpio-leds";
34
35 led_status: status {
36 function = LED_FUNCTION_STATUS;
37 color = <LED_COLOR_ID_GREEN>;
38 gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
39 };
40 };
41 };
42
43 &i2c {
44 status = "okay";
45 };
46
47 &sdhci {
48 status = "okay";
49 };
50
51 &spi0 {
52 status = "okay";
53
54 flash0: flash@0 {
55 compatible = "jedec,spi-nor";
56 reg = <0>;
57 spi-max-frequency = <10000000>;
58
59 partitions {
60 compatible = "fixed-partitions";
61 #address-cells = <1>;
62 #size-cells = <1>;
63
64 partition@0 {
65 label = "u-boot";
66 reg = <0x0 0x30000>;
67 read-only;
68 };
69
70 partition@30000 {
71 label = "u-boot-env";
72 reg = <0x30000 0x10000>;
73 read-only;
74 };
75
76 factory: partition@40000 {
77 label = "factory";
78 reg = <0x40000 0x10000>;
79 read-only;
80
81 nvmem-layout {
82 compatible = "fixed-layout";
83 #address-cells = <1>;
84 #size-cells = <1>;
85
86 eeprom_factory_0: eeprom@0 {
87 reg = <0x0 0x400>;
88 };
89
90 eeprom_factory_8000: eeprom@8000 {
91 reg = <0x8000 0x200>;
92 };
93
94 macaddr_factory_e000: macaddr@e000 {
95 compatible = "mac-base";
96 reg = <0xe000 0x6>;
97 #nvmem-cell-cells = <1>;
98 };
99 };
100 };
101
102 firmware: partition@50000 {
103 compatible = "denx,uimage";
104 label = "firmware";
105 };
106 };
107 };
108 };
109
110 &pcie {
111 status = "okay";
112 };
113
114 &pcie0 {
115 wifi0: wifi@0,0 {
116 compatible = "pci14c3,7603";
117 reg = <0x0000 0 0 0 0>;
118 nvmem-cells = <&eeprom_factory_0>;
119 nvmem-cell-names = "eeprom";
120 };
121 };
122
123 &pcie1 {
124 wifi1: wifi@0,0 {
125 compatible = "pci14c3,7662";
126 reg = <0x0000 0 0 0 0>;
127 nvmem-cells = <&eeprom_factory_8000>;
128 nvmem-cell-names = "eeprom";
129 ieee80211-freq-limit = <5000000 6000000>;
130
131 led {
132 led-sources = <2>;
133 };
134 };
135 };
136
137 &ethernet {
138 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
139 };
140
141 &gmac0 {
142 nvmem-cells = <&macaddr_factory_e000 0>;
143 nvmem-cell-names = "mac-address";
144 };
145
146 &switch0 {
147 ports {
148 port@0 {
149 status = "okay";
150 label = "lan1";
151 };
152
153 port@1 {
154 status = "okay";
155 label = "lan2";
156 };
157
158 port@2 {
159 status = "okay";
160 label = "lan3";
161 };
162
163 port@3 {
164 status = "okay";
165 label = "lan4";
166 };
167
168 port@4 {
169 status = "okay";
170 label = "wan";
171 nvmem-cells = <&macaddr_factory_e000 1>;
172 nvmem-cell-names = "mac-address";
173 };
174 };
175 };
176
177 &state_default {
178 gpio {
179 groups = "wdt", "rgmii2";
180 function = "gpio";
181 };
182 };