ramips: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_asus_rt-ac1200.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 aliases {
11 led-boot = &led_wps;
12 led-failsafe = &led_wps;
13 led-running = &led_wps;
14 led-upgrade = &led_wps;
15 label-mac-device = &ethernet;
16 };
17
18 keys {
19 compatible = "gpio-keys";
20
21 reset {
22 label = "reset";
23 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
24 linux,code = <KEY_RESTART>;
25 };
26
27 wps {
28 label = "wps";
29 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_WPS_BUTTON>;
31 };
32 };
33
34 leds {
35 compatible = "gpio-leds";
36
37 led_wps: wps {
38 function = LED_FUNCTION_WPS;
39 color = <LED_COLOR_ID_BLUE>;
40 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
41 };
42
43 wlan2g {
44 label = "blue:wlan2g";
45 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
46 linux,default-trigger = "phy0tpt";
47 };
48 };
49 };
50
51 &spi0 {
52 status = "okay";
53
54 flash@0 {
55 compatible = "jedec,spi-nor";
56 reg = <0>;
57 spi-max-frequency = <58000000>;
58 m25p,fast-read;
59
60 partitions: partitions {
61 compatible = "fixed-partitions";
62 #address-cells = <1>;
63 #size-cells = <1>;
64
65 partition@0 {
66 label = "u-boot";
67 reg = <0x0 0x30000>;
68 read-only;
69 };
70
71 partition@30000 {
72 label = "u-boot-env";
73 reg = <0x30000 0x10000>;
74 read-only;
75 };
76
77 factory: partition@40000 {
78 label = "factory";
79 reg = <0x40000 0x10000>;
80 read-only;
81
82 nvmem-layout {
83 compatible = "fixed-layout";
84 #address-cells = <1>;
85 #size-cells = <1>;
86
87 eeprom_factory_0: eeprom@0 {
88 reg = <0x0 0x400>;
89 };
90
91 eeprom_factory_8000: eeprom@8000 {
92 reg = <0x8000 0x200>;
93 };
94
95 macaddr_factory_4: macaddr@4 {
96 reg = <0x4 0x6>;
97 };
98 };
99 };
100
101 partition@50000 {
102 compatible = "denx,uimage";
103 label = "firmware";
104 reg = <0x50000 0xfb0000>;
105 };
106 };
107 };
108 };
109
110 &gpio {
111 enable-leds {
112 gpio-hog;
113 line-name = "enable-leds";
114 output-low;
115 gpios = <4 GPIO_ACTIVE_HIGH>;
116 };
117 };
118
119 &ethernet {
120 nvmem-cells = <&macaddr_factory_4>;
121 nvmem-cell-names = "mac-address";
122 };
123
124 &esw {
125 mediatek,portmap = <0x3e>;
126 mediatek,led_source = <4>;
127 };
128
129 &wmac {
130 status = "okay";
131
132 nvmem-cells = <&eeprom_factory_0>;
133 nvmem-cell-names = "eeprom";
134 };
135
136 &pcie {
137 status = "okay";
138 };
139
140 &pcie0 {
141 mt76@0,0 {
142 compatible = "mediatek,mt76";
143 reg = <0x0000 0 0 0 0>;
144 nvmem-cells = <&eeprom_factory_8000>;
145 nvmem-cell-names = "eeprom";
146 ieee80211-freq-limit = <5000000 6000000>;
147
148 led {
149 led-sources = <2>;
150 led-active-low;
151 };
152 };
153 };