ramips: add support for ipTIME A3
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_mtc_wr1201.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 = "mtc,wr1201", "mediatek,mt7621-soc";
10 model = "MTC Wireless Router WR1201";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 label-mac-device = &ethernet;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,57600";
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 led_power: power {
28 label = "wr1201:green:power";
29 gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
30 };
31
32 usb {
33 label = "wr1201:green:usb";
34 gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
35 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
36 linux,default-trigger = "usbport";
37 };
38
39 eth_link {
40 label = "wr1201:green:eth_link";
41 gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
42 };
43
44 wps {
45 label = "wr1201:green:wps";
46 gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
47 };
48 };
49
50 keys {
51 compatible = "gpio-keys-polled";
52 poll-interval = <20>;
53
54 reset {
55 label = "reset";
56 gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
57 linux,code = <KEY_RESTART>;
58 };
59 };
60 };
61
62 &spi0 {
63 status = "okay";
64
65 flash@0 {
66 compatible = "jedec,spi-nor";
67 reg = <0>;
68 spi-max-frequency = <10000000>;
69
70 partitions {
71 compatible = "fixed-partitions";
72 #address-cells = <1>;
73 #size-cells = <1>;
74
75 partition@0 {
76 label = "Bootloader";
77 reg = <0x0 0x30000>;
78 read-only;
79 };
80
81 partition@30000 {
82 label = "Config";
83 reg = <0x30000 0x10000>;
84 read-only;
85 };
86
87 factory: partition@40000 {
88 label = "factory";
89 reg = <0x40000 0x10000>;
90 read-only;
91 };
92
93 partition@50000 {
94 compatible = "denx,uimage";
95 label = "firmware";
96 reg = <0x50000 0xfa0000>;
97 };
98
99 partition@ff0000 {
100 label = "Second_Config";
101 reg = <0xff0000 0x10000>;
102 read-only;
103 };
104 };
105 };
106 };
107
108 &ethernet {
109 mtd-mac-address = <&factory 0x4>;
110 };
111
112 &sdhci {
113 status = "okay";
114 };
115
116 &pcie {
117 status = "okay";
118 };
119
120 &pcie0 {
121 wifi@0,0 {
122 reg = <0x0000 0 0 0 0>;
123 mediatek,mtd-eeprom = <&factory 0x8000>;
124 ieee80211-freq-limit = <5000000 6000000>;
125
126 led {
127 led-sources = <2>;
128 led-active-low;
129 };
130 };
131 };
132
133 &pcie1 {
134 wifi@0,0 {
135 reg = <0x0000 0 0 0 0>;
136 mediatek,mtd-eeprom = <&factory 0x0000>;
137 ieee80211-freq-limit = <2400000 2500000>;
138
139 led {
140 led-sources = <2>;
141 led-active-low;
142 };
143 };
144 };
145
146
147 &pinctrl {
148 state_default: pinctrl0 {
149 gpio {
150 ralink,group = "rgmii2";
151 ralink,function = "gpio";
152 };
153 };
154 };