64630816dc314d06eed2e8e7b7a191966ae4a83e
[openwrt/staging/jow.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 color = <LED_COLOR_ID_GREEN>;
59 function = LED_FUNCTION_STATUS;
60 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; // #GPIO38
61 };
62
63 wifi {
64 color = <LED_COLOR_ID_GREEN>;
65 function = LED_FUNCTION_WLAN;
66 gpios = <&gpio3 0 GPIO_ACTIVE_HIGH>; // #GPIO72
67 };
68 };
69
70 };
71
72 &gpio0 {
73 status = "okay";
74 };
75
76 &gpio1 {
77 status = "okay";
78 };
79
80 &gpio3 {
81 status = "okay";
82 };
83
84 &spi0 {
85 status = "okay";
86
87 flash@0 {
88 compatible = "jedec,spi-nor";
89 reg = <0>;
90 spi-max-frequency = <48000000>;
91
92 partitions {
93 compatible = "fixed-partitions";
94 #address-cells = <1>;
95 #size-cells = <1>;
96
97 partition@0 {
98 label = "U-Boot";
99 reg = <0x0 0x30000>;
100 read-only;
101 };
102
103 partition@30000 {
104 label = "U-Config";
105 reg = <0x30000 0x10000>;
106 };
107
108 factory: partition@40000 {
109 label = "RF-EEPROM";
110 reg = <0x40000 0x10000>;
111 read-only;
112
113 nvmem-layout {
114 compatible = "fixed-layout";
115 #address-cells = <1>;
116 #size-cells = <1>;
117
118 eeprom_factory_0: eeprom@0 {
119 reg = <0x0 0x200>;
120 };
121 };
122 };
123
124 partition@50000 {
125 compatible = "denx,uimage";
126 label = "firmware";
127 reg = <0x50000 0x7a0000>;
128 };
129
130 partition@7f0000 {
131 label = "Config";
132 reg = <0x7f0000 0x10000>;
133 };
134
135 partition@0_1 {
136 label = "Full";
137 reg = <0x0 0x800000>;
138 };
139 };
140 };
141 };
142
143 &state_default {
144 gpio {
145 groups = "i2c";
146 function = "gpio";
147 };
148 };
149
150 &wmac {
151 nvmem-cells = <&eeprom_factory_0>;
152 nvmem-cell-names = "eeprom";
153 };