Fresh pull from upstream
[librecmc/librecmc.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                 linux,modalias = "m25p80", "w25q64";
73                 spi-max-frequency = <10000000>;
74
75                 partition@0 {
76                         label = "u-boot";
77                         reg = <0x0 0x30000>;
78                         read-only;
79                 };
80
81                 partition@30000 {
82                         label = "u-boot-env";
83                         reg = <0x30000 0x10000>;
84                         read-only;
85                 };
86
87                 factory: partition@40000 {
88                         label = "factory";
89                         reg = <0x40000 0x10000>;
90                         read-only;
91                 };
92
93                 partition@50000 {
94                         label = "firmware";
95                         reg = <0x50000 0x7b0000>;
96                 };
97         };
98 };
99
100 &ethernet {
101         mtd-mac-address = <&factory 0x4>;
102 };
103
104 &wmac {
105         ralink,mtd-eeprom = <&factory 0>;
106 };
107
108 &pinctrl {
109         state_default: pinctrl0 {
110                 default {
111                         ralink,group = "ephy", "wled", "spi refclk", "i2c";
112                         ralink,function = "gpio";
113                 };
114         };
115 };