1937c3a14c1f65c7cfdb3d02bec6a3f549dc04ce
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7620n_zyxel_keenetic-omni-ii.dts
1 #include "mt7620n.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "zyxel,keenetic-omni-ii", "ralink,mt7620n-soc";
8 model = "ZyXEL Keenetic Omni II";
9
10 aliases {
11 led-boot = &led_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 };
16
17 leds {
18 compatible = "gpio-leds";
19
20 wan {
21 label = "green:wan";
22 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
23 };
24
25 usb {
26 label = "green:usb";
27 gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
28 trigger-sources = <&ohci_port1>, <&ehci_port1>;
29 linux,default-trigger = "usbport";
30 };
31
32 wifi {
33 label = "green:wifi";
34 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
35 };
36
37 led_power: power {
38 label = "green:power";
39 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
40 };
41 };
42
43 keys {
44 compatible = "gpio-keys";
45
46 reset {
47 label = "reset";
48 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
49 linux,code = <KEY_RESTART>;
50 };
51
52 wps {
53 label = "wps";
54 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
55 linux,code = <KEY_WPS_BUTTON>;
56 };
57
58 fn {
59 label = "fn";
60 gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
61 linux,code = <BTN_0>;
62 };
63 };
64
65 gpio_export {
66 compatible = "gpio-export";
67 #size-cells = <0>;
68
69 usb_power {
70 gpio-export,name = "usb";
71 gpio-export,output = <1>;
72 gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
73 };
74 };
75 };
76
77 &gpio1 {
78 status = "okay";
79 };
80
81 &gpio3 {
82 status = "okay";
83 };
84
85 &spi0 {
86 status = "okay";
87
88 flash@0 {
89 compatible = "jedec,spi-nor";
90 reg = <0>;
91 spi-max-frequency = <10000000>;
92
93 partitions {
94 compatible = "fixed-partitions";
95 #address-cells = <1>;
96 #size-cells = <1>;
97
98 partition@0 {
99 label = "u-boot";
100 reg = <0x0 0x30000>;
101 read-only;
102 };
103
104 partition@30000 {
105 label = "u-boot-env";
106 reg = <0x30000 0x10000>;
107 read-only;
108 };
109
110 factory: partition@40000 {
111 label = "factory";
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 macaddr_factory_4: macaddr@4 {
125 reg = <0x4 0x6>;
126 };
127 };
128 };
129
130 partition@50000 {
131 compatible = "denx,uimage";
132 label = "firmware";
133 reg = <0x50000 0x7b0000>;
134 };
135 };
136 };
137 };
138
139 &state_default {
140 gpio {
141 groups = "i2c", "wdt", "pa", "spi refclk", "wled";
142 function = "gpio";
143 };
144 };
145
146 &ethernet {
147 nvmem-cells = <&macaddr_factory_4>;
148 nvmem-cell-names = "mac-address";
149
150 mediatek,portmap = "wllll";
151 };
152
153 &wmac {
154 nvmem-cells = <&eeprom_factory_0>;
155 nvmem-cell-names = "eeprom";
156 };
157
158 &ehci {
159 status = "okay";
160 };
161
162 &ohci {
163 status = "okay";
164 };