ramips: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7620n_dlink_dwr-922-e2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7620n.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8 #include <dt-bindings/mtd/partitions/uimage.h>
9
10 / {
11 compatible = "dlink,dwr-922-e2", "ralink,mt7620n-soc";
12 model = "D-Link DWR-922 E2";
13
14 aliases {
15 led-boot = &sstrengthg;
16 led-failsafe = &sstrengthg;
17 };
18
19 keys {
20 compatible = "gpio-keys";
21
22 wps {
23 label = "wps";
24 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
25 linux,code = <KEY_WPS_BUTTON>;
26 };
27
28 reset {
29 label = "reset";
30 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
31 linux,code = <KEY_RESTART>;
32 };
33 };
34
35 leds {
36 compatible = "gpio-leds";
37 led-boot = &sstrengthg;
38
39 sms {
40 label = "green:sms";
41 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
42 };
43
44 lan {
45 function = LED_FUNCTION_LAN;
46 color = <LED_COLOR_ID_GREEN>;
47 gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
48 };
49
50 sstrengthg: sstrengthg {
51 label = "green:sigstrength";
52 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
53 };
54
55 sstrengthr {
56 label = "red:sigstrength";
57 gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
58 };
59
60 4g {
61 label = "green:4g";
62 gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
63 };
64
65 3g {
66 label = "green:3g";
67 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
68 };
69
70 wifi {
71 label = "green:wifi";
72 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
73 };
74 };
75
76 gpio_export {
77 compatible = "gpio-export";
78 #size-cells = <0>;
79
80 lte_modem_enable {
81 gpio-export,name = "lte_modem_enable";
82 gpio-export,output = <1>;
83 gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
84 };
85 };
86 };
87
88 &gpio1 {
89 status = "okay";
90 };
91
92 &gpio2 {
93 status = "okay";
94 };
95
96 &gpio3 {
97 status = "okay";
98 };
99
100 &spi0 {
101 status = "okay";
102
103 flash@0 {
104 compatible = "jedec,spi-nor";
105 reg = <0>;
106 spi-max-frequency = <10000000>;
107
108 partitions {
109 compatible = "fixed-partitions";
110 #address-cells = <1>;
111 #size-cells = <1>;
112
113 partition@0 {
114 label = "jboot";
115 reg = <0x0 0x10000>;
116 read-only;
117 };
118
119 partition@10000 {
120 compatible = "openwrt,uimage", "denx,uimage";
121 openwrt,ih-magic = <IH_MAGIC_OKLI>;
122 openwrt,offset = <0x10000>;
123 label = "firmware";
124 reg = <0x10000 0xfe0000>;
125 };
126
127 config: partition@ff0000 {
128 label = "config";
129 reg = <0xff0000 0x10000>;
130 read-only;
131 };
132 };
133 };
134 };
135
136 &ehci {
137 status = "okay";
138 };
139
140 &ohci {
141 status = "okay";
142 };
143
144 &state_default {
145 default {
146 groups = "spi refclk", "i2c", "ephy", "wled";
147 function = "gpio";
148 };
149 };