ramips: add support for D-Link COVR-X1860 A1
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620n_zyxel_keenetic-lite-iii-a.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
9 / {
10 compatible = "zyxel,keenetic-lite-iii-a", "ralink,mt7620n-soc";
11 model = "ZyXEL Keenetic Lite III (rev. A)";
12
13 aliases {
14 led-boot = &led_wan;
15 led-failsafe = &led_wan;
16 led-running = &led_wan;
17 led-upgrade = &led_wan;
18 };
19
20 keys {
21 compatible = "gpio-keys";
22
23 reset {
24 label = "reset";
25 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; // #GPIO1
26 linux,code = <KEY_RESTART>;
27 };
28
29 wps {
30 label = "wps";
31 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; // #GPIO2
32 linux,code = <KEY_WPS_BUTTON>;
33 };
34
35 sw0 {
36 label = "sw0";
37 gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; // #GPIO17
38 linux,code = <BTN_0>;
39 };
40
41 sw1 {
42 label = "sw1";
43 gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; // #GPIO20
44 linux,code = <BTN_1>;
45 };
46
47 sw2 {
48 label = "sw2";
49 gpios = <&gpio0 21 GPIO_ACTIVE_LOW>; // #GPIO21
50 linux,code = <BTN_2>;
51 };
52 };
53
54 leds {
55 compatible = "gpio-leds";
56
57 led_wan: wan {
58 label = "green:wan";
59 color = <LED_COLOR_ID_GREEN>;
60 function = LED_FUNCTION_STATUS;
61 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; // #GPIO38
62 };
63
64 wifi {
65 label = "green:wifi";
66 color = <LED_COLOR_ID_GREEN>;
67 function = LED_FUNCTION_WLAN;
68 gpios = <&gpio3 0 GPIO_ACTIVE_HIGH>; // #GPIO72
69 };
70 };
71
72 };
73
74 &gpio0 {
75 status = "okay";
76 };
77
78 &gpio1 {
79 status = "okay";
80 };
81
82 &gpio3 {
83 status = "okay";
84 };
85
86 &spi0 {
87 status = "okay";
88
89 flash@0 {
90 compatible = "jedec,spi-nor";
91 reg = <0>;
92 spi-max-frequency = <48000000>;
93
94 partitions {
95 compatible = "fixed-partitions";
96 #address-cells = <1>;
97 #size-cells = <1>;
98
99 partition@0 {
100 label = "U-Boot";
101 reg = <0x0 0x30000>;
102 read-only;
103 };
104
105 partition@30000 {
106 label = "U-Config";
107 reg = <0x30000 0x10000>;
108 };
109
110 factory: partition@40000 {
111 compatible = "nvmem-cells";
112 label = "RF-EEPROM";
113 reg = <0x40000 0x10000>;
114 #address-cells = <1>;
115 #size-cells = <1>;
116 read-only;
117
118 eeprom_factory_0: eeprom@0 {
119 reg = <0x0 0x200>;
120 };
121 };
122
123 partition@50000 {
124 compatible = "denx,uimage";
125 label = "firmware";
126 reg = <0x50000 0x7a0000>;
127 };
128
129 partition@7f0000 {
130 label = "Config";
131 reg = <0x7f0000 0x10000>;
132 };
133
134 partition@0_1 {
135 label = "Full";
136 reg = <0x0 0x800000>;
137 };
138 };
139 };
140 };
141
142 &state_default {
143 gpio {
144 groups = "i2c";
145 function = "gpio";
146 };
147 };
148
149 &wmac {
150 nvmem-cells = <&eeprom_factory_0>;
151 nvmem-cell-names = "eeprom";
152 };