ramips: specify "firmware" partition format
[oweals/openwrt.git] / target / linux / ramips / dts / Newifi-D2.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 = "d-team,newifi-d2", "mediatek,mt7621-soc";
10         model = "Newifi-D2";
11
12         aliases {
13                 led-boot = &led_power_blue;
14                 led-failsafe = &led_power_blue;
15                 led-running = &led_power_blue;
16                 led-upgrade = &led_power_blue;
17         };
18
19         memory@0 {
20                 device_type = "memory";
21                 reg = <0x0 0x1c000000>, <0x20000000 0x4000000>;
22         };
23
24         chosen {
25                 bootargs = "console=ttyS0,115200";
26         };
27
28         gpio-leds {
29                 compatible = "gpio-leds";
30
31                 power-amber {
32                         label = "newifi-d2:amber:power";
33                         gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
34                 };
35
36                 led_power_blue: power-blue {
37                         label = "newifi-d2:blue:power";
38                         gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
39                 };
40
41                 internet-amber {
42                         label = "newifi-d2:amber:internet";
43                         gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
44                 };
45
46                 internet-blue {
47                         label = "newifi-d2:blue:internet";
48                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
49                 };
50
51                 wlan2g {
52                         label = "newifi-d2:blue:wlan2g";
53                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
54                 };
55
56                 wlan5g {
57                         label = "newifi-d2:blue:wlan5g";
58                         gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
59                 };
60
61                 usb {
62                         label = "newifi-d2:blue:usb";
63                         gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
64                         trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
65                         linux,default-trigger = "usbport";
66                 };
67         };
68
69         gpio-keys-polled {
70                 compatible = "gpio-keys-polled";
71                 poll-interval = <20>;
72
73                 reset {
74                         label = "reset";
75                         gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
76                         linux,code = <KEY_RESTART>;
77                 };
78
79                 wps {
80                         label = "wps";
81                         gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
82                         linux,code = <KEY_WPS_BUTTON>;
83                 };
84         };
85
86         gpio_export {
87                 compatible = "gpio-export";
88                 #size-cells = <0>;
89
90                 power_usb3 {
91                         gpio-export,name = "power_usb3";
92                         gpio-export,output = <1>;
93                         gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
94                 };
95         };
96 };
97
98 &spi0 {
99         status = "okay";
100
101         m25p80@0 {
102                 compatible = "jedec,spi-nor";
103                 reg = <0>;
104                 spi-max-frequency = <10000000>;
105                 m25p,chunked-io = <32>;
106
107                 partitions {
108                         compatible = "fixed-partitions";
109                         #address-cells = <1>;
110                         #size-cells = <1>;
111
112                         partition@0 {
113                                 label = "u-boot";
114                                 reg = <0x0 0x30000>;
115                                 read-only;
116                         };
117
118                         partition@30000 {
119                                 label = "u-boot-env";
120                                 reg = <0x30000 0x10000>;
121                                 read-only;
122                         };
123
124                         factory: partition@40000 {
125                                 label = "factory";
126                                 reg = <0x40000 0x10000>;
127                                 read-only;
128                         };
129
130                         partition@50000 {
131                                 compatible = "denx,uimage";
132                                 label = "firmware";
133                                 reg = <0x50000 0x1fb0000>;
134                         };
135                 };
136         };
137 };
138
139 &pcie {
140         status = "okay";
141 };
142
143 &pcie0 {
144         mt76@0,0 {
145                 reg = <0x0000 0 0 0 0>;
146                 mediatek,mtd-eeprom = <&factory 0x8000>;
147                 ieee80211-freq-limit = <5000000 6000000>;
148         };
149 };
150
151 &pcie1 {
152         mt76@0,0 {
153                 reg = <0x0000 0 0 0 0>;
154                 mediatek,mtd-eeprom = <&factory 0x0000>;
155         };
156 };
157
158 &ethernet {
159         mtd-mac-address = <&factory 0xe000>;
160 };
161
162 &pinctrl {
163         state_default: pinctrl0 {
164                 gpio {
165                         ralink,group = "i2c", "jtag", "uart2", "uart3";
166                         ralink,function = "gpio";
167                 };
168         };
169 };