ramips: fix power LED DTB for wt3020
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / CF-WR800N.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 = "comfast,cf-wr800n", "ralink,mt7620n-soc";
10 model = "Comfast CF-WR800N";
11
12 aliases {
13 led-status = &led_wps;
14 };
15
16 chosen {
17 bootargs = "console=ttyS0,115200";
18 };
19
20 gpio-leds {
21 compatible = "gpio-leds";
22
23 ethernet {
24 label = "cf-wr800n:white:ethernet";
25 gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
26 };
27
28 wifi {
29 label = "cf-wr800n:white:wifi";
30 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
31 };
32
33 led_wps: wps {
34 label = "cf-wr800n:white:wps";
35 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
36 };
37 };
38
39 gpio-keys-polled {
40 compatible = "gpio-keys-polled";
41 poll-interval = <20>;
42
43 reset {
44 label = "reset";
45 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
46 linux,code = <KEY_RESTART>;
47 };
48 };
49 };
50
51 &gpio0 {
52 status = "okay";
53 };
54
55 &gpio1 {
56 status = "okay";
57 };
58
59 &gpio2 {
60 status = "okay";
61 };
62
63 &gpio3 {
64 status = "okay";
65 };
66
67 &spi0 {
68 status = "okay";
69
70 m25p80@0 {
71 compatible = "jedec,spi-nor";
72 reg = <0>;
73 spi-max-frequency = <10000000>;
74
75 partitions {
76 compatible = "fixed-partitions";
77 #address-cells = <1>;
78 #size-cells = <1>;
79
80 partition@0 {
81 label = "u-boot";
82 reg = <0x0 0x30000>;
83 read-only;
84 };
85
86 partition@30000 {
87 label = "u-boot-env";
88 reg = <0x30000 0x10000>;
89 read-only;
90 };
91
92 factory: partition@40000 {
93 label = "factory";
94 reg = <0x40000 0x10000>;
95 read-only;
96 };
97
98 partition@50000 {
99 label = "firmware";
100 reg = <0x50000 0x7b0000>;
101 };
102 };
103 };
104 };
105
106 &ethernet {
107 mtd-mac-address = <&factory 0x4>;
108 };
109
110 &wmac {
111 ralink,mtd-eeprom = <&factory 0>;
112 };
113
114 &pinctrl {
115 state_default: pinctrl0 {
116 default {
117 ralink,group = "ephy", "wled", "spi refclk", "i2c";
118 ralink,function = "gpio";
119 };
120 };
121 };