ramips: mt7628: use nvmem-layout
[openwrt/openwrt.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 compatible = "nvmem-cells";
74 label = "factory";
75 reg = <0x40000 0x10000>;
76 #address-cells = <1>;
77 #size-cells = <1>;
78 read-only;
79
80 eeprom_factory_0: eeprom@0 {
81 reg = <0x0 0x200>;
82 };
83
84 eeprom_factory_8000: eeprom@8000 {
85 reg = <0x8000 0x200>;
86 };
87
88 macaddr_factory_e000: macaddr@e000 {
89 reg = <0xe000 0x6>;
90 };
91 };
92
93 partition@50000 {
94 compatible = "denx,uimage";
95 label = "firmware";
96 reg = <0x50000 0xfb0000>;
97 };
98 };
99 };
100 };
101
102 &pcie {
103 status = "okay";
104 };
105
106 &pcie0 {
107 mt76@0,0 {
108 reg = <0x0000 0 0 0 0>;
109 nvmem-cells = <&eeprom_factory_8000>;
110 nvmem-cell-names = "eeprom";
111 ieee80211-freq-limit = <5000000 6000000>;
112 };
113 };
114
115 &pcie1 {
116 mt76@0,0 {
117 reg = <0x0000 0 0 0 0>;
118 nvmem-cells = <&eeprom_factory_0>;
119 nvmem-cell-names = "eeprom";
120 ieee80211-freq-limit = <2400000 2500000>;
121 };
122 };
123
124 &ethernet {
125 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
126 };
127
128 &gmac0 {
129 nvmem-cells = <&macaddr_factory_e000>;
130 nvmem-cell-names = "mac-address";
131 };
132
133 &switch0 {
134 ports {
135 port@0 {
136 status = "okay";
137 label = "lan1";
138 };
139
140 port@1 {
141 status = "okay";
142 label = "lan2";
143 };
144
145 port@2 {
146 status = "okay";
147 label = "lan3";
148 };
149
150 port@3 {
151 status = "okay";
152 label = "lan4";
153 };
154
155 port@4 {
156 status = "okay";
157 label = "wan";
158 nvmem-cells = <&macaddr_factory_e000>;
159 nvmem-cell-names = "mac-address";
160 mac-address-increment = <1>;
161 };
162 };
163 };
164
165 &state_default {
166 gpio {
167 groups = "wdt", "rgmii2";
168 function = "gpio";
169 };
170 };