ramips: enable broken-flash-reset for some 32M flash boards
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_lenovo_newifi-d1.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 = "lenovo,newifi-d1", "mediatek,mt7621-soc";
10 model = "Newifi-D1";
11
12 aliases {
13 led-boot = &led_blue;
14 led-failsafe = &led_blue;
15 led-running = &led_blue;
16 led-upgrade = &led_blue;
17 label-mac-device = &gmac0;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 status-red {
28 label = "newifi-d1:red:status";
29 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
30 };
31
32 status-green {
33 label = "newifi-d1:green:status";
34 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
35 };
36
37 led_blue: status-blue {
38 label = "newifi-d1:blue:status";
39 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
40 default-state = "on";
41 };
42 };
43
44 keys {
45 compatible = "gpio-keys";
46
47 reset {
48 label = "reset";
49 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_RESTART>;
51 };
52 };
53
54 gpio_export {
55 compatible = "gpio-export";
56 #size-cells = <0>;
57
58 usb2power {
59 gpio-export,name = "usb2power";
60 gpio-export,output = <1>;
61 gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
62 };
63
64 usb3power {
65 gpio-export,name = "usb3power";
66 gpio-export,output = <1>;
67 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
68 };
69 };
70 };
71
72 &sdhci {
73 status = "okay";
74 };
75
76 &spi0 {
77 status = "okay";
78
79 m25p80@0 {
80 compatible = "jedec,spi-nor";
81 reg = <0>;
82 spi-max-frequency = <25000000>;
83 broken-flash-reset;
84 m25p,fast-read;
85
86 partitions {
87 compatible = "fixed-partitions";
88 #address-cells = <1>;
89 #size-cells = <1>;
90
91 partition@0 {
92 label = "u-boot";
93 reg = <0x0 0x30000>;
94 read-only;
95 };
96
97 partition@30000 {
98 label = "u-boot-env";
99 reg = <0x30000 0x10000>;
100 read-only;
101 };
102
103 factory: partition@40000 {
104 label = "factory";
105 reg = <0x40000 0x10000>;
106 read-only;
107 };
108
109 partition@50000 {
110 compatible = "denx,uimage";
111 label = "firmware";
112 reg = <0x50000 0x1fb0000>;
113 };
114 };
115 };
116 };
117
118 &pcie {
119 status = "okay";
120 };
121
122 &pcie0 {
123 mt76@0,0 {
124 reg = <0x0000 0 0 0 0>;
125 mediatek,mtd-eeprom = <&factory 0x8000>;
126 ieee80211-freq-limit = <5000000 6000000>;
127 };
128 };
129
130 &pcie1 {
131 mt76@0,0 {
132 reg = <0x0000 0 0 0 0>;
133 mediatek,mtd-eeprom = <&factory 0x0000>;
134 };
135 };
136
137 &gmac0 {
138 mtd-mac-address = <&factory 0xe000>;
139 };
140
141 &switch0 {
142 ports {
143 port@1 {
144 status = "okay";
145 label = "lan2";
146 };
147
148 port@2 {
149 status = "okay";
150 label = "lan1";
151 };
152
153 port@4 {
154 status = "okay";
155 label = "wan";
156 mtd-mac-address = <&factory 0xe006>;
157 };
158 };
159 };
160
161 &state_default {
162 gpio {
163 groups = "jtag", "uart2";
164 function = "gpio";
165 };
166 };