184cbd2386835d0965b3ee4e3559a8ad9f1f7c94
[openwrt/openwrt.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 compatible = "zyxel,keenetic-omni-ii", "ralink,mt7620n-soc";
10 model = "ZyXEL Keenetic Omni II";
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 = <&gpio0 20 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 = <&gpio1 15 GPIO_ACTIVE_LOW>;
37 };
38 };
39
40 gpio-keys-polled {
41 compatible = "gpio-keys";
42 poll-interval = <20>;
43
44 reset {
45 label = "reset";
46 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
47 linux,code = <KEY_RESTART>;
48 };
49
50 wps {
51 label = "wps";
52 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
53 linux,code = <KEY_WPS_BUTTON>;
54 };
55
56 fn {
57 label = "fn";
58 gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
59 linux,code = <BTN_0>;
60 };
61 };
62
63 gpio_export {
64 compatible = "gpio-export";
65 #size-cells = <0>;
66
67 usb_power {
68 gpio-export,name = "usb";
69 gpio-export,output = <1>;
70 gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
71 };
72 };
73 };
74
75 &gpio1 {
76 status = "okay";
77 };
78
79 &gpio3 {
80 status = "okay";
81 };
82
83 &spi0 {
84 status = "okay";
85
86 m25p80@0 {
87 compatible = "jedec,spi-nor";
88 reg = <0>;
89 spi-max-frequency = <10000000>;
90
91 partitions {
92 compatible = "fixed-partitions";
93 #address-cells = <1>;
94 #size-cells = <1>;
95
96 partition@0 {
97 label = "u-boot";
98 reg = <0x0 0x30000>;
99 read-only;
100 };
101
102 partition@30000 {
103 label = "u-boot-env";
104 reg = <0x30000 0x10000>;
105 read-only;
106 };
107
108 factory: partition@40000 {
109 label = "factory";
110 reg = <0x40000 0x10000>;
111 read-only;
112 };
113
114 partition@50000 {
115 label = "firmware";
116 reg = <0x50000 0x7b0000>;
117 };
118 };
119 };
120 };
121
122 &pinctrl {
123 state_default: pinctrl0 {
124 gpio {
125 ralink,group = "i2c", "wdt", "pa", "spi refclk", "wled";
126 ralink,function = "gpio";
127 };
128 };
129 };
130
131 &ethernet {
132 mtd-mac-address = <&factory 0x4>;
133 mediatek,portmap = "wllll";
134 };
135
136 &wmac {
137 ralink,mtd-eeprom = <&factory 0>;
138 };
139
140 &ehci {
141 status = "okay";
142 };
143
144 &ohci {
145 status = "okay";
146 };