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