ramips: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_linksys_re7000.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.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 compatible = "linksys,re7000", "mediatek,mt7621-soc";
11 model = "Linksys RE7000";
12
13 aliases {
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 wifi {
24 label = "orange:wifi";
25 gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
26 linux,default-trigger = "phy0tpt";
27 };
28
29 wps {
30 function = LED_FUNCTION_WPS;
31 color = <LED_COLOR_ID_ORANGE>;
32 gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
33 };
34
35 led_power: power {
36 function = LED_FUNCTION_POWER;
37 color = <LED_COLOR_ID_GREEN>;
38 gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
39 };
40 };
41
42 keys {
43 compatible = "gpio-keys";
44
45 wps {
46 label = "wps";
47 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_WPS_BUTTON>;
49 };
50
51 reset {
52 label = "reset";
53 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
54 linux,code = <KEY_RESTART>;
55 };
56 };
57 };
58
59 &spi0 {
60 status = "okay";
61
62 flash@0 {
63 compatible = "jedec,spi-nor";
64 reg = <0>;
65 spi-max-frequency = <10000000>;
66
67 partitions {
68 compatible = "fixed-partitions";
69 #address-cells = <1>;
70 #size-cells = <1>;
71
72 partition@0 {
73 label = "u-boot";
74 reg = <0x0 0x30000>;
75 read-only;
76 };
77
78 partition@30000 {
79 label = "u-boot-env";
80 reg = <0x30000 0x1000>;
81 };
82
83 partition@32000 {
84 label = "config";
85 reg = <0x32000 0xe000>;
86 read-only;
87 };
88
89 factory: partition@40000 {
90 label = "factory";
91 reg = <0x40000 0x10000>;
92 read-only;
93
94 nvmem-layout {
95 compatible = "fixed-layout";
96 #address-cells = <1>;
97 #size-cells = <1>;
98
99 eeprom_factory_0: eeprom@0 {
100 reg = <0x0 0x400>;
101 };
102
103 eeprom_factory_8000: eeprom@8000 {
104 reg = <0x8000 0x4da8>;
105 };
106
107 macaddr_factory_2e: macaddr@2e {
108 reg = <0x2e 0x6>;
109 };
110 };
111 };
112
113 partition@50000 {
114 compatible = "denx,uimage";
115 label = "firmware";
116 reg = <0x50000 0xfb0000>;
117 };
118 };
119 };
120 };
121
122 &state_default {
123 gpio {
124 groups = "i2c", "uart2", "rgmii2";
125 function = "gpio";
126 };
127 };
128
129 &pcie {
130 status = "okay";
131 };
132
133 &pcie0 {
134 mt76@0,0 {
135 reg = <0x0000 0 0 0 0>;
136 nvmem-cells = <&eeprom_factory_0>;
137 nvmem-cell-names = "eeprom";
138 ieee80211-freq-limit = <2400000 2500000>;
139 };
140 };
141
142 &pcie1 {
143 mt76@0,0 {
144 reg = <0x0000 0 0 0 0>;
145 nvmem-cells = <&eeprom_factory_8000>;
146 nvmem-cell-names = "eeprom";
147 ieee80211-freq-limit = <5000000 6000000>;
148 };
149 };
150
151 &gmac0 {
152 nvmem-cells = <&macaddr_factory_2e>;
153 nvmem-cell-names = "mac-address";
154 };
155
156 &ethernet {
157 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
158 };
159
160 &switch0 {
161 ports {
162 port@0 {
163 status = "okay";
164 label = "lan";
165 };
166 };
167 };