2241b27673a6522025cd5291e94f0581add4693f
[openwrt/staging/hauke.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 label = "RF-EEPROM";
112 reg = <0x40000 0x10000>;
113 read-only;
114
115 nvmem-layout {
116 compatible = "fixed-layout";
117 #address-cells = <1>;
118 #size-cells = <1>;
119
120 eeprom_factory_0: eeprom@0 {
121 reg = <0x0 0x200>;
122 };
123 };
124 };
125
126 partition@50000 {
127 compatible = "denx,uimage";
128 label = "firmware";
129 reg = <0x50000 0x7a0000>;
130 };
131
132 partition@7f0000 {
133 label = "Config";
134 reg = <0x7f0000 0x10000>;
135 };
136
137 partition@0_1 {
138 label = "Full";
139 reg = <0x0 0x800000>;
140 };
141 };
142 };
143 };
144
145 &state_default {
146 gpio {
147 groups = "i2c";
148 function = "gpio";
149 };
150 };
151
152 &wmac {
153 nvmem-cells = <&eeprom_factory_0>;
154 nvmem-cell-names = "eeprom";
155 };