ramips: specify "firmware" partition format
[oweals/openwrt.git] / target / linux / ramips / dts / RE350.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 = "tplink,re350-v1", "mediatek,mt7621-soc";
10         model = "TP-LINK RE350 v1";
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         memory@0 {
20                 device_type = "memory";
21                 reg = <0x0 0x4000000>;
22         };
23
24         chosen {
25                 bootargs = "console=ttyS0,57600";
26         };
27
28         gpio-leds {
29                 compatible = "gpio-leds";
30
31                 led_power: power {
32                         label = "re350-v1:blue:power";
33                         gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
34                 };
35
36                 wifi2g {
37                         label = "re350-v1:blue:wifi2G";
38                         gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
39                 };
40
41                 wifi5g {
42                         label = "re350-v1:blue:wifi5G";
43                         gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
44                 };
45
46                 wps_r {
47                         label = "re350-v1:red:wps";
48                         gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
49                 };
50
51                 wps_b {
52                         label = "re350-v1:blue:wps";
53                         gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
54                 };
55
56                 eth {
57                         label = "re350-v1:green:eth_act";
58                         gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
59                 };
60
61                 eth2 {
62                         label = "re350-v1:green:eth_link";
63                         gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
64                 };
65         };
66
67         gpio-keys-polled {
68                 compatible = "gpio-keys-polled";
69                 poll-interval = <20>;
70
71                 led {
72                         label = "led";
73                         gpios = <&gpio0 30 GPIO_ACTIVE_LOW>;
74                         linux,code = <BTN_0>;
75                 };
76
77                 reset {
78                         label = "reset";
79                         gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
80                         linux,code = <KEY_RESTART>;
81                 };
82
83                 power {
84                         label = "power";
85                         gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
86                         linux,code = <KEY_POWER>;
87                 };
88
89                 wps {
90                         label = "wps";
91                         gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
92                         linux,code = <KEY_WPS_BUTTON>;
93                 };
94         };
95 };
96
97 &spi0 {
98         status = "okay";
99
100         w25q64@0 {
101                 compatible = "jedec,spi-nor";
102                 reg = <0>;
103                 spi-max-frequency = <10000000>;
104                 m25p,chunked-io = <32>;
105
106                 partitions {
107                         compatible = "fixed-partitions";
108                         #address-cells = <1>;
109                         #size-cells = <1>;
110
111                         partition@0 {
112                                 label = "u-boot";
113                                 reg = <0x0 0x20000>;
114                                 read-only;
115                         };
116
117                         partition@20000 {
118                                 compatible = "tplink,firmware";
119                                 label = "firmware";
120                                 reg = <0x20000 0x5e0000>;
121                         };
122
123                         config: partition@600000 {
124                                 label = "config";
125                                 reg = <0x600000 0x50000>;
126                                 read-only;
127                         };
128
129                         radio: partition@7f0000 {
130                                 label = "radio";
131                                 reg = <0x7f0000 0x10000>;
132                                 read-only;
133                         };
134                 };
135         };
136 };
137
138 &pcie {
139         status = "okay";
140 };
141
142 &pcie0 {
143         mt76@0,0 {
144                 reg = <0x0000 0 0 0 0>;
145                 mediatek,mtd-eeprom = <&radio 0>;
146                 mtd-mac-address = <&config 0x10008>;
147                 mtd-mac-address-increment = <1>;
148         };
149 };
150
151 &pcie1 {
152         mt76@0,0 {
153                 reg = <0x0000 0 0 0 0>;
154                 mediatek,mtd-eeprom = <&radio 0x8000>;
155                 ieee80211-freq-limit = <5000000 6000000>;
156                 mtd-mac-address = <&config 0x10008>;
157                 mtd-mac-address-increment = <2>;
158         };
159 };
160
161 &ethernet {
162         mtd-mac-address = <&config 0x10008>;
163 };
164
165 &pinctrl {
166         state_default: pinctrl0 {
167                 gpio {
168                         ralink,group = "rgmii2", "wdt";
169                         ralink,function = "gpio";
170                 };
171         };
172 };