ramips: add support for ALFA Network Quad-E4G
[oweals/openwrt.git] / target / linux / ramips / dts / mt7620n_comfast_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         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         keys {
43                 compatible = "gpio-keys";
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                 compatible = "jedec,spi-nor";
74                 reg = <0>;
75                 spi-max-frequency = <10000000>;
76
77                 partitions {
78                         compatible = "fixed-partitions";
79                         #address-cells = <1>;
80                         #size-cells = <1>;
81
82                         partition@0 {
83                                 label = "u-boot";
84                                 reg = <0x0 0x30000>;
85                                 read-only;
86                         };
87
88                         partition@30000 {
89                                 label = "u-boot-env";
90                                 reg = <0x30000 0x10000>;
91                                 read-only;
92                         };
93
94                         factory: partition@40000 {
95                                 label = "factory";
96                                 reg = <0x40000 0x10000>;
97                                 read-only;
98                         };
99
100                         partition@50000 {
101                                 compatible = "denx,uimage";
102                                 label = "firmware";
103                                 reg = <0x50000 0x7b0000>;
104                         };
105                 };
106         };
107 };
108
109 &ethernet {
110         mtd-mac-address = <&factory 0x4>;
111 };
112
113 &wmac {
114         ralink,mtd-eeprom = <&factory 0>;
115 };
116
117 &pinctrl {
118         state_default: pinctrl0 {
119                 default {
120                         ralink,group = "ephy", "wled", "spi refclk", "i2c";
121                         ralink,function = "gpio";
122                 };
123         };
124 };