ramips: dts: Unify naming of gpio-led nodes
[openwrt/staging/wigyori.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-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 wan {
23 label = "kn_rc:green:wan";
24 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
25 };
26
27 usb {
28 label = "kn_rc:green:usb";
29 gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
30 trigger-sources = <&ohci_port1>, <&ehci_port1>;
31 linux,default-trigger = "usbport";
32 };
33
34 wifi {
35 label = "kn_rc:green:wifi";
36 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
37 };
38
39 led_power: power {
40 label = "kn_rc:green:power";
41 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
42 };
43 };
44
45 keys {
46 compatible = "gpio-keys";
47 poll-interval = <20>;
48
49 reset {
50 label = "reset";
51 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
52 linux,code = <KEY_RESTART>;
53 };
54
55 wps {
56 label = "wps";
57 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
58 linux,code = <KEY_WPS_BUTTON>;
59 };
60
61 fn {
62 label = "fn";
63 gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
64 linux,code = <BTN_0>;
65 };
66 };
67
68 gpio_export {
69 compatible = "gpio-export";
70 #size-cells = <0>;
71
72 usb_power {
73 gpio-export,name = "usb";
74 gpio-export,output = <1>;
75 gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
76 };
77 };
78 };
79
80 &gpio1 {
81 status = "okay";
82 };
83
84 &gpio3 {
85 status = "okay";
86 };
87
88 &spi0 {
89 status = "okay";
90
91 m25p80@0 {
92 compatible = "jedec,spi-nor";
93 reg = <0>;
94 spi-max-frequency = <10000000>;
95
96 partitions {
97 compatible = "fixed-partitions";
98 #address-cells = <1>;
99 #size-cells = <1>;
100
101 partition@0 {
102 label = "u-boot";
103 reg = <0x0 0x30000>;
104 read-only;
105 };
106
107 partition@30000 {
108 label = "u-boot-env";
109 reg = <0x30000 0x10000>;
110 read-only;
111 };
112
113 factory: partition@40000 {
114 label = "factory";
115 reg = <0x40000 0x10000>;
116 read-only;
117 };
118
119 partition@50000 {
120 compatible = "denx,uimage";
121 label = "firmware";
122 reg = <0x50000 0x7b0000>;
123 };
124 };
125 };
126 };
127
128 &pinctrl {
129 state_default: pinctrl0 {
130 gpio {
131 ralink,group = "i2c", "wdt", "pa", "spi refclk", "wled";
132 ralink,function = "gpio";
133 };
134 };
135 };
136
137 &ethernet {
138 mtd-mac-address = <&factory 0x4>;
139 mediatek,portmap = "wllll";
140 };
141
142 &wmac {
143 ralink,mtd-eeprom = <&factory 0>;
144 };
145
146 &ehci {
147 status = "okay";
148 };
149
150 &ohci {
151 status = "okay";
152 };