ramips: add support for ZyXEL Keenetic Omni / Omni II
[openwrt/staging/blogic.git] / target / linux / ramips / dts / kn_rc.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";
10
11 gpio-leds {
12 compatible = "gpio-leds";
13
14 wan {
15 label = "kn_rc:green:wan";
16 gpios = <&gpio0 38 GPIO_ACTIVE_LOW>;
17 };
18
19 usb {
20 label = "kn_rc:green:usb";
21 gpios = <&gpio0 39 GPIO_ACTIVE_LOW>;
22 };
23
24 wifi {
25 label = "kn_rc:green:wifi";
26 gpios = <&gpio0 72 GPIO_ACTIVE_LOW>;
27 };
28
29 power {
30 label = "kn_rc:green:power";
31 gpios = <&gpio0 20 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
61 &spi0 {
62 status = "okay";
63
64 m25p80@0 {
65 #address-cells = <1>;
66 #size-cells = <1>;
67 compatible = "jedec,spi-nor";
68 reg = <0>;
69 spi-max-frequency = <10000000>;
70
71 partition@0 {
72 label = "u-boot";
73 reg = <0x0 0x30000>;
74 read-only;
75 };
76
77 partition@30000 {
78 label = "u-boot-env";
79 reg = <0x30000 0x10000>;
80 read-only;
81 };
82
83 factory: partition@40000 {
84 label = "factory";
85 reg = <0x40000 0x10000>;
86 read-only;
87 };
88
89 partition@50000 {
90 label = "firmware";
91 reg = <0x50000 0x7b0000>;
92 };
93 };
94 };
95
96 &pinctrl {
97 state_default: pinctrl0 {
98 gpio {
99 ralink,group = "i2c", "wdt", "pa", "spi refclk", "wled";
100 ralink,function = "gpio";
101 };
102 };
103 };
104
105 &ethernet {
106 mtd-mac-address = <&factory 0x4>;
107 ralink,port-map = "wllll";
108 };
109
110 &wmac {
111 ralink,mtd-eeprom = <&factory 0>;
112 };
113
114 &ehci {
115 status = "okay";
116 };
117
118 &ohci {
119 status = "okay";
120 };