ramips: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7628an_netgear_r6xxx.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_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 };
16
17 keys {
18 compatible = "gpio-keys";
19
20 reset {
21 label = "reset";
22 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
23 linux,code = <KEY_RESTART>;
24 };
25 };
26
27 leds {
28 compatible = "gpio-leds";
29
30 lan {
31 function = LED_FUNCTION_LAN;
32 color = <LED_COLOR_ID_GREEN>;
33 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
34 };
35
36 led_power: power {
37 function = LED_FUNCTION_POWER;
38 color = <LED_COLOR_ID_GREEN>;
39 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
40 };
41
42 wlan2g_green {
43 label = "green:wlan2g";
44 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
45 linux,default-trigger = "phy0tpt";
46 };
47
48 wlan2g_orange {
49 label = "orange:wlan2g";
50 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
51 };
52
53 wan_green {
54 function = LED_FUNCTION_WAN;
55 color = <LED_COLOR_ID_GREEN>;
56 gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
57 };
58
59 wan_orange {
60 function = LED_FUNCTION_WAN;
61 color = <LED_COLOR_ID_ORANGE>;
62 gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
63 };
64 };
65 };
66
67 &spi0 {
68 status = "okay";
69
70 flash@0 {
71 compatible = "jedec,spi-nor";
72 reg = <0>;
73 spi-max-frequency = <86000000>;
74 m25p,fast-read;
75
76 partitions: partitions {
77 compatible = "fixed-partitions";
78 #address-cells = <1>;
79 #size-cells = <1>;
80
81 partition@0 {
82 label = "u-boot";
83 reg = <0x0 0x40000>;
84 read-only;
85 };
86
87 factory: partition@40000 {
88 label = "factory";
89 reg = <0x40000 0x20000>;
90 read-only;
91
92 nvmem-layout {
93 compatible = "fixed-layout";
94 #address-cells = <1>;
95 #size-cells = <1>;
96
97 eeprom_factory_0: eeprom@0 {
98 reg = <0x0 0x400>;
99 };
100
101 eeprom_factory_8000: eeprom@8000 {
102 reg = <0x8000 0x200>;
103 };
104
105 macaddr_factory_4: macaddr@4 {
106 compatible = "mac-base";
107 reg = <0x4 0x6>;
108 #nvmem-cell-cells = <1>;
109 };
110 };
111 };
112
113 partition@60000 {
114 label = "nvram";
115 reg = <0x60000 0x30000>;
116 read-only;
117 };
118 };
119 };
120 };
121
122 &wmac {
123 status = "okay";
124
125 nvmem-cells = <&eeprom_factory_0>;
126 nvmem-cell-names = "eeprom";
127 };
128
129 &ethernet {
130 nvmem-cells = <&macaddr_factory_4 0>;
131 nvmem-cell-names = "mac-address";
132 };
133
134 &pcie {
135 status = "okay";
136 };
137
138 &pcie0 {
139 wifi5: wifi@0,0 {
140 reg = <0x0000 0 0 0 0>;
141 nvmem-cells = <&eeprom_factory_8000>;
142 nvmem-cell-names = "eeprom";
143 ieee80211-freq-limit = <5000000 6000000>;
144 };
145 };