ramips: fix dtc warnings
[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 #address-cells = <1>;
98 #size-cells = <1>;
99 compatible = "jedec,spi-nor";
100 reg = <0>;
101 spi-max-frequency = <10000000>;
102 m25p,chunked-io = <32>;
103
104 partition@0 {
105 label = "u-boot";
106 reg = <0x0 0x30000>;
107 read-only;
108 };
109
110 partition@30000 {
111 label = "u-boot-env";
112 reg = <0x30000 0x10000>;
113 read-only;
114 };
115
116 factory: partition@40000 {
117 label = "factory";
118 reg = <0x40000 0x10000>;
119 read-only;
120 };
121
122 partition@50000 {
123 label = "firmware";
124 reg = <0x50000 0x1fb0000>;
125 };
126 };
127 };
128
129 &pcie {
130 status = "okay";
131 };
132
133 &pcie0 {
134 mt76@0,0 {
135 reg = <0x0000 0 0 0 0>;
136 mediatek,mtd-eeprom = <&factory 0x8000>;
137 ieee80211-freq-limit = <5000000 6000000>;
138 };
139 };
140
141 &pcie1 {
142 mt76@0,0 {
143 reg = <0x0000 0 0 0 0>;
144 mediatek,mtd-eeprom = <&factory 0x0000>;
145 };
146 };
147
148 &ethernet {
149 mtd-mac-address = <&factory 0xe000>;
150 };
151
152 &pinctrl {
153 state_default: pinctrl0 {
154 gpio {
155 ralink,group = "i2c", "jtag", "uart2", "uart3";
156 ralink,function = "gpio";
157 };
158 };
159 };