a65fda14f6d057143d94066ed4dbb66f09f5a922
[librecmc/librecmc.git] / target / linux / ramips / dts / kn_rf.dts
1 /dts-v1/;
2
3 #include "mt7620n.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         model = "ZyXEL Keenetic Omni II";
10
11         gpio-leds {
12                 compatible = "gpio-leds";
13
14                 wan {
15                         label = "kn_rc:green:wan";
16                         gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
17                 };
18
19                 usb {
20                         label = "kn_rc:green:usb";
21                         gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
22                 };
23
24                 wifi {
25                         label = "kn_rc:green:wifi";
26                         gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
27                 };
28
29                 power {
30                         label = "kn_rc:green:power";
31                         gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
32                 };
33         };
34
35         gpio-keys-polled {
36                 compatible = "gpio-keys";
37                 #address-cells = <1>;
38                 #size-cells = <0>;
39                 poll-interval = <20>;
40
41                 reset {
42                         label = "reset";
43                         gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
44                         linux,code = <KEY_RESTART>;
45                 };
46
47                 wps {
48                         label = "wps";
49                         gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
50                         linux,code = <KEY_WPS_BUTTON>;
51                 };
52
53                 fn {
54                         label = "fn";
55                         gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
56                         linux,code = <BTN_0>;
57                 };
58         };
59
60         gpio_export {
61                 compatible = "gpio-export";
62                 #size-cells = <0>;
63
64                 usb_power {
65                         gpio-export,name = "usb";
66                         gpio-export,output = <1>;
67                         gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
68                 };
69         };
70 };
71
72 &gpio1 {
73         status = "okay";
74 };
75
76 &gpio3 {
77         status = "okay";
78 };
79
80 &spi0 {
81         status = "okay";
82
83         m25p80@0 {
84                 #address-cells = <1>;
85                 #size-cells = <1>;
86                 compatible = "jedec,spi-nor";
87                 reg = <0>;
88                 spi-max-frequency = <10000000>;
89
90                 partition@0 {
91                         label = "u-boot";
92                         reg = <0x0 0x30000>;
93                         read-only;
94                 };
95
96                 partition@30000 {
97                         label = "u-boot-env";
98                         reg = <0x30000 0x10000>;
99                         read-only;
100                 };
101
102                 factory: partition@40000 {
103                         label = "factory";
104                         reg = <0x40000 0x10000>;
105                         read-only;
106                 };
107
108                 partition@50000 {
109                         label = "firmware";
110                         reg = <0x50000 0x7b0000>;
111                 };
112         };
113 };
114
115 &pinctrl {
116         state_default: pinctrl0 {
117                 gpio {
118                         ralink,group = "i2c", "wdt", "pa", "spi refclk", "wled";
119                         ralink,function = "gpio";
120                 };
121         };
122 };
123
124 &ethernet {
125         mtd-mac-address = <&factory 0x4>;
126         mediatek,portmap = "wllll";
127 };
128
129 &wmac {
130         ralink,mtd-eeprom = <&factory 0>;
131 };
132
133 &ehci {
134         status = "okay";
135 };
136
137 &ohci {
138         status = "okay";
139 };