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