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