ramips: add support for ipTIME A3
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_xiaomi_miwifi-mini.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "xiaomi,miwifi-mini", "ralink,mt7620a-soc";
10 model = "Xiaomi MiWiFi Mini";
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 led_blue: blue {
28 label = "miwifi-mini:blue:status";
29 gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
30 default-state = "on";
31 };
32
33 yellow {
34 label = "miwifi-mini:yellow:status";
35 gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
36 };
37
38 red {
39 label = "miwifi-mini:red:status";
40 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
41 };
42 };
43
44 keys {
45 compatible = "gpio-keys-polled";
46 poll-interval = <20>;
47
48 reset {
49 label = "reset";
50 gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
51 linux,code = <KEY_RESTART>;
52 };
53 };
54 };
55
56 &gpio0 {
57 status = "okay";
58 };
59
60 &gpio1 {
61 status = "okay";
62 };
63
64 &gpio2 {
65 status = "okay";
66 };
67
68 &spi0 {
69 status = "okay";
70
71 m25p80@0 {
72 compatible = "jedec,spi-nor";
73 reg = <0>;
74 spi-max-frequency = <10000000>;
75
76 partitions {
77 compatible = "fixed-partitions";
78 #address-cells = <1>;
79 #size-cells = <1>;
80
81 partition@0 {
82 label = "u-boot";
83 reg = <0x0 0x30000>;
84 };
85
86 partition@30000 {
87 label = "u-boot-env";
88 reg = <0x30000 0x10000>;
89 read-only;
90 };
91
92 factory: partition@40000 {
93 label = "factory";
94 reg = <0x40000 0x10000>;
95 read-only;
96 };
97
98 partition@50000 {
99 compatible = "denx,uimage";
100 label = "firmware";
101 reg = <0x50000 0xf80000>;
102 };
103
104 partition@fd0000 {
105 label = "crash";
106 reg = <0xfd0000 0x10000>;
107 };
108
109 partition@fe0000 {
110 label = "reserved";
111 reg = <0xfe0000 0x10000>;
112 read-only;
113 };
114
115 partition@ff0000 {
116 label = "Bdata";
117 reg = <0xff0000 0x10000>;
118 };
119 };
120 };
121 };
122
123 &ehci {
124 status = "okay";
125 };
126
127 &ohci {
128 status = "okay";
129 };
130
131 &ethernet {
132 pinctrl-names = "default";
133 pinctrl-0 = <&ephy_pins>;
134 mtd-mac-address = <&factory 0x28>;
135 mediatek,portmap = "llllw";
136 };
137
138 &wmac {
139 ralink,mtd-eeprom = <&factory 0>;
140 pinctrl-names = "default";
141 pinctrl-0 = <&pa_pins>;
142 };
143
144 &pcie {
145 status = "okay";
146 };
147
148 &pcie0 {
149 mt76@0,0 {
150 reg = <0x0000 0 0 0 0>;
151 mediatek,mtd-eeprom = <&factory 0x8000>;
152 ieee80211-freq-limit = <5000000 6000000>;
153 };
154 };
155
156 &pinctrl {
157 state_default: pinctrl0 {
158 gpio {
159 ralink,group = "i2c", "rgmii1";
160 ralink,function = "gpio";
161 };
162 };
163 };