a9d9da872e3b9557aad42990b9c50f1bc2828ba6
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7621_firefly_firewrt.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "firefly,firewrt", "mediatek,mt7621-soc";
8 model = "Firefly FireWRT";
9
10 aliases {
11 led-boot = &led_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 };
16
17 leds {
18 compatible = "gpio-leds";
19
20 led_power: power {
21 label = "green:power";
22 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
23 };
24 };
25
26 keys {
27 compatible = "gpio-keys";
28
29 wps {
30 label = "wps";
31 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_WPS_BUTTON>;
33 };
34
35 power {
36 label = "power";
37 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
38 linux,code = <KEY_POWER>;
39 };
40 };
41 };
42
43 &sdhci {
44 status = "okay";
45 };
46
47 &spi0 {
48 status = "okay";
49
50 flash@0 {
51 compatible = "jedec,spi-nor";
52 reg = <0>;
53 spi-max-frequency = <10000000>;
54
55 partitions {
56 compatible = "fixed-partitions";
57 #address-cells = <1>;
58 #size-cells = <1>;
59
60 partition@0 {
61 label = "u-boot";
62 reg = <0x0 0x30000>;
63 read-only;
64 };
65
66 partition@30000 {
67 label = "u-boot-env";
68 reg = <0x30000 0x10000>;
69 read-only;
70 };
71
72 factory: partition@40000 {
73 label = "factory";
74 reg = <0x40000 0x10000>;
75 read-only;
76
77 nvmem-layout {
78 compatible = "fixed-layout";
79 #address-cells = <1>;
80 #size-cells = <1>;
81
82 eeprom_factory_0: eeprom@0 {
83 reg = <0x0 0x200>;
84 };
85
86 eeprom_factory_8000: eeprom@8000 {
87 reg = <0x8000 0x200>;
88 };
89
90 macaddr_factory_e000: macaddr@e000 {
91 reg = <0xe000 0x6>;
92 };
93 };
94 };
95
96 partition@50000 {
97 compatible = "denx,uimage";
98 label = "firmware";
99 reg = <0x50000 0xfb0000>;
100 };
101 };
102 };
103 };
104
105 &pcie {
106 status = "okay";
107 };
108
109 &pcie0 {
110 mt76@0,0 {
111 reg = <0x0000 0 0 0 0>;
112 nvmem-cells = <&eeprom_factory_8000>;
113 nvmem-cell-names = "eeprom";
114 ieee80211-freq-limit = <5000000 6000000>;
115 };
116 };
117
118 &pcie1 {
119 mt76@0,0 {
120 reg = <0x0000 0 0 0 0>;
121 nvmem-cells = <&eeprom_factory_0>;
122 nvmem-cell-names = "eeprom";
123 ieee80211-freq-limit = <2400000 2500000>;
124 };
125 };
126
127 &ethernet {
128 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
129 };
130
131 &gmac0 {
132 nvmem-cells = <&macaddr_factory_e000>;
133 nvmem-cell-names = "mac-address";
134 };
135
136 &switch0 {
137 ports {
138 port@0 {
139 status = "okay";
140 label = "lan1";
141 };
142
143 port@1 {
144 status = "okay";
145 label = "lan2";
146 };
147
148 port@2 {
149 status = "okay";
150 label = "lan3";
151 };
152
153 port@3 {
154 status = "okay";
155 label = "lan4";
156 };
157
158 port@4 {
159 status = "okay";
160 label = "wan";
161 nvmem-cells = <&macaddr_factory_e000>;
162 nvmem-cell-names = "mac-address";
163 mac-address-increment = <1>;
164 };
165 };
166 };
167
168 &state_default {
169 gpio {
170 groups = "wdt", "rgmii2";
171 function = "gpio";
172 };
173 };