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