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