19cbefe96f1ac243eba08f97845d8adfe81db3ec
[openwrt/openwrt.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 compatible = "zyxel,keenetic-omni", "ralink,mt7620n-soc";
10 model = "ZyXEL Keenetic Omni";
11
12 aliases {
13 led-status = &led_power;
14 };
15
16 gpio-leds {
17 compatible = "gpio-leds";
18
19 wan {
20 label = "kn_rc:green:wan";
21 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
22 };
23
24 usb {
25 label = "kn_rc:green:usb";
26 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
27 };
28
29 wifi {
30 label = "kn_rc:green:wifi";
31 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
32 };
33
34 led_power: power {
35 label = "kn_rc:green:power";
36 gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
37 };
38 };
39
40 gpio-keys-polled {
41 compatible = "gpio-keys";
42 #address-cells = <1>;
43 #size-cells = <0>;
44 poll-interval = <20>;
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 m25p80@0 {
89 #address-cells = <1>;
90 #size-cells = <1>;
91 compatible = "jedec,spi-nor";
92 reg = <0>;
93 spi-max-frequency = <10000000>;
94
95 partition@0 {
96 label = "u-boot";
97 reg = <0x0 0x30000>;
98 read-only;
99 };
100
101 partition@30000 {
102 label = "u-boot-env";
103 reg = <0x30000 0x10000>;
104 read-only;
105 };
106
107 factory: partition@40000 {
108 label = "factory";
109 reg = <0x40000 0x10000>;
110 read-only;
111 };
112
113 partition@50000 {
114 label = "firmware";
115 reg = <0x50000 0x7b0000>;
116 };
117 };
118 };
119
120 &pinctrl {
121 state_default: pinctrl0 {
122 gpio {
123 ralink,group = "i2c", "wdt", "pa", "spi refclk", "wled";
124 ralink,function = "gpio";
125 };
126 };
127 };
128
129 &ethernet {
130 mtd-mac-address = <&factory 0x4>;
131 mediatek,portmap = "llllw";
132 };
133
134 &wmac {
135 ralink,mtd-eeprom = <&factory 0>;
136 };
137
138 &ehci {
139 status = "okay";
140 };
141
142 &ohci {
143 status = "okay";
144 };