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