ramips: add support for ALFA Network Quad-E4G
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_firefly_firewrt.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "firefly,firewrt", "mediatek,mt7621-soc";
10         model = "Firefly FireWRT";
11
12         aliases {
13                 led-boot = &led_power;
14                 led-failsafe = &led_power;
15                 led-running = &led_power;
16                 led-upgrade = &led_power;
17         };
18
19         chosen {
20                 bootargs = "console=ttyS0,57600";
21         };
22
23         leds {
24                 compatible = "gpio-leds";
25
26                 led_power: power {
27                         label = "firewrt:green:power";
28                         gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
29                 };
30         };
31
32         keys {
33                 compatible = "gpio-keys";
34
35                 wps {
36                         label = "wps";
37                         gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
38                         linux,code = <KEY_WPS_BUTTON>;
39                 };
40
41                 power {
42                         label = "power";
43                         gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
44                         linux,code = <KEY_POWER>;
45                 };
46         };
47 };
48
49 &sdhci {
50         status = "okay";
51 };
52
53 &spi0 {
54         status = "okay";
55
56         m25p80@0 {
57                 compatible = "jedec,spi-nor";
58                 reg = <0>;
59                 spi-max-frequency = <10000000>;
60
61                 partitions {
62                         compatible = "fixed-partitions";
63                         #address-cells = <1>;
64                         #size-cells = <1>;
65
66                         partition@0 {
67                                 label = "u-boot";
68                                 reg = <0x0 0x30000>;
69                                 read-only;
70                         };
71
72                         partition@30000 {
73                                 label = "u-boot-env";
74                                 reg = <0x30000 0x10000>;
75                                 read-only;
76                         };
77
78                         factory: partition@40000 {
79                                 label = "factory";
80                                 reg = <0x40000 0x10000>;
81                                 read-only;
82                         };
83
84                         partition@50000 {
85                                 compatible = "denx,uimage";
86                                 label = "firmware";
87                                 reg = <0x50000 0xfb0000>;
88                         };
89                 };
90         };
91 };
92
93 &pcie {
94         status = "okay";
95 };
96
97 &pcie0 {
98         mt76@0,0 {
99                 reg = <0x0000 0 0 0 0>;
100                 mediatek,mtd-eeprom = <&factory 0x8000>;
101                 ieee80211-freq-limit = <5000000 6000000>;
102         };
103 };
104
105 &pcie1 {
106         mt76@0,0 {
107                 reg = <0x0000 0 0 0 0>;
108                 mediatek,mtd-eeprom = <&factory 0x0000>;
109                 ieee80211-freq-limit = <2400000 2500000>;
110         };
111 };
112
113 &ethernet {
114         mtd-mac-address = <&factory 0xe000>;
115 };
116
117 &pinctrl {
118         state_default: pinctrl0 {
119                 gpio {
120                         ralink,group = "wdt", "rgmii2";
121                         ralink,function = "gpio";
122                 };
123         };
124 };