ramips: Use dts alias based status led
[openwrt/openwrt.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 #address-cells = <1>;
42 #size-cells = <0>;
43 poll-interval = <20>;
44
45 reset {
46 label = "reset";
47 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_RESTART>;
49 };
50 };
51 };
52
53 &gpio0 {
54 status = "okay";
55 };
56
57 &gpio1 {
58 status = "okay";
59 };
60
61 &gpio2 {
62 status = "okay";
63 };
64
65 &gpio3 {
66 status = "okay";
67 };
68
69 &spi0 {
70 status = "okay";
71
72 m25p80@0 {
73 #address-cells = <1>;
74 #size-cells = <1>;
75 compatible = "jedec,spi-nor";
76 reg = <0>;
77 spi-max-frequency = <10000000>;
78
79 partition@0 {
80 label = "u-boot";
81 reg = <0x0 0x30000>;
82 read-only;
83 };
84
85 partition@30000 {
86 label = "u-boot-env";
87 reg = <0x30000 0x10000>;
88 read-only;
89 };
90
91 factory: partition@40000 {
92 label = "factory";
93 reg = <0x40000 0x10000>;
94 read-only;
95 };
96
97 partition@50000 {
98 label = "firmware";
99 reg = <0x50000 0x7b0000>;
100 };
101 };
102 };
103
104 &ethernet {
105 mtd-mac-address = <&factory 0x4>;
106 };
107
108 &wmac {
109 ralink,mtd-eeprom = <&factory 0>;
110 };
111
112 &pinctrl {
113 state_default: pinctrl0 {
114 default {
115 ralink,group = "ephy", "wled", "spi refclk", "i2c";
116 ralink,function = "gpio";
117 };
118 };
119 };