ramips: add support for ipTIME A3
[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 = &ethernet;
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 = <&gpio0 14 GPIO_ACTIVE_LOW>;
30 };
31
32 status-green {
33 label = "newifi-d1:green:status";
34 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
35 };
36
37 led_blue: status-blue {
38 label = "newifi-d1:blue:status";
39 gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
40 default-state = "on";
41 };
42 };
43
44 keys {
45 compatible = "gpio-keys-polled";
46 poll-interval = <20>;
47
48 reset {
49 label = "reset";
50 gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
51 linux,code = <KEY_RESTART>;
52 };
53 };
54
55 gpio_export {
56 compatible = "gpio-export";
57 #size-cells = <0>;
58
59 usb2power {
60 gpio-export,name = "usb2power";
61 gpio-export,output = <1>;
62 gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
63 };
64
65 usb3power {
66 gpio-export,name = "usb3power";
67 gpio-export,output = <1>;
68 gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
69 };
70 };
71 };
72
73 &sdhci {
74 status = "okay";
75 };
76
77 &spi0 {
78 status = "okay";
79
80 m25p80@0 {
81 compatible = "mx25l25635f", "jedec,spi-nor";
82 reg = <0>;
83 spi-max-frequency = <25000000>;
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 &ethernet {
138 mtd-mac-address = <&factory 0xe000>;
139 };
140
141 &pinctrl {
142 state_default: pinctrl0 {
143 gpio {
144 ralink,group = "wdt", "rgmii2", "jtag", "uart2", "uart3", "i2c";
145 ralink,function = "gpio";
146 };
147 };
148 };