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