ramips: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_wavlink_wl-wn575a3.dts
1 #include "mt7628an.dtsi"
2
3 #include <dt-bindings/input/input.h>
4 #include <dt-bindings/leds/common.h>
5 #include <dt-bindings/gpio/gpio.h>
6
7 / {
8 compatible = "wavlink,wl-wn575a3", "mediatek,mt7628an-soc";
9 model = "Wavlink WL-WN575A3";
10
11 keys {
12 compatible = "gpio-keys";
13
14 reset {
15 label = "reset";
16 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
17 linux,code = <KEY_RESTART>;
18 };
19
20 wps {
21 label = "wps";
22 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
23 linux,code = <KEY_WPS_BUTTON>;
24 };
25 };
26
27 leds {
28 compatible = "gpio-leds";
29
30 wifi-high {
31 label = "green:wifi-high";
32 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
33 };
34
35 wifi-med {
36 label = "green:wifi-med";
37 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
38 };
39
40 wifi-low {
41 label = "green:wifi-low";
42 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
43 };
44
45 wps {
46 function = LED_FUNCTION_WPS;
47 color = <LED_COLOR_ID_GREEN>;
48 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
49 };
50 };
51 };
52
53 &state_default {
54 gpio {
55 groups = "i2c", "wled_an", "gpio", "refclk", "wdt", "p0led_an";
56 function = "gpio";
57 };
58 };
59
60 &pcie {
61 status = "okay";
62 };
63
64 &pcie0 {
65 mt76@0,0 {
66 reg = <0x0000 0 0 0 0>;
67 nvmem-cells = <&eeprom_factory_8000>;
68 nvmem-cell-names = "eeprom";
69 ieee80211-freq-limit = <5000000 6000000>;
70 };
71 };
72
73 &spi0 {
74 status = "okay";
75
76 flash@0 {
77 compatible = "jedec,spi-nor";
78 reg = <0>;
79 spi-max-frequency = <10000000>;
80
81 partitions {
82 compatible = "fixed-partitions";
83 #address-cells = <1>;
84 #size-cells = <1>;
85
86 partition@0 {
87 label = "u-boot";
88 reg = <0x0 0x30000>;
89 read-only;
90 };
91
92 partition@30000 {
93 label = "u-boot-env";
94 reg = <0x30000 0x10000>;
95 read-only;
96 };
97
98 factory: partition@40000 {
99 label = "factory";
100 reg = <0x40000 0x10000>;
101 read-only;
102
103 nvmem-layout {
104 compatible = "fixed-layout";
105 #address-cells = <1>;
106 #size-cells = <1>;
107
108 eeprom_factory_0: eeprom@0 {
109 reg = <0x0 0x400>;
110 };
111
112 eeprom_factory_8000: eeprom@8000 {
113 reg = <0x8000 0x200>;
114 };
115
116 macaddr_factory_28: macaddr@28 {
117 reg = <0x28 0x6>;
118 };
119 };
120 };
121
122 partition@50000 {
123 compatible = "denx,uimage";
124 label = "firmware";
125 reg = <0x50000 0x7b0000>;
126 };
127 };
128 };
129 };
130
131 &wmac {
132 status = "okay";
133
134 nvmem-cells = <&eeprom_factory_0>;
135 nvmem-cell-names = "eeprom";
136 };
137
138 &ethernet {
139 nvmem-cells = <&macaddr_factory_28>;
140 nvmem-cell-names = "mac-address";
141 };
142
143 &esw {
144 mediatek,portmap = <0x2f>;
145 };