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