ramips: move partitions into partition table node
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / 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-status = &led_blue;
14 };
15
16 chosen {
17 bootargs = "console=ttyS0,115200";
18 };
19
20 gpio-leds {
21 compatible = "gpio-leds";
22
23 led_blue: blue {
24 label = "miwifi-mini:blue:status";
25 gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
26 };
27
28 yellow {
29 label = "miwifi-mini:yellow:status";
30 gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
31 };
32
33 red {
34 label = "miwifi-mini:red:status";
35 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
36 };
37 };
38
39 gpio-keys-polled {
40 compatible = "gpio-keys-polled";
41 poll-interval = <20>;
42
43 reset {
44 label = "reset";
45 gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
46 linux,code = <KEY_RESTART>;
47 };
48 };
49 };
50
51 &gpio0 {
52 status = "okay";
53 };
54
55 &gpio1 {
56 status = "okay";
57 };
58
59 &gpio2 {
60 status = "okay";
61 };
62
63 &spi0 {
64 status = "okay";
65
66 m25p80@0 {
67 compatible = "jedec,spi-nor";
68 reg = <0>;
69 spi-max-frequency = <10000000>;
70
71 partitions {
72 compatible = "fixed-partitions";
73 #address-cells = <1>;
74 #size-cells = <1>;
75
76 partition@0 {
77 label = "u-boot";
78 reg = <0x0 0x30000>;
79 };
80
81 partition@30000 {
82 label = "u-boot-env";
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 label = "firmware";
95 reg = <0x50000 0xf80000>;
96 };
97
98 partition@fd0000 {
99 label = "crash";
100 reg = <0xfd0000 0x10000>;
101 };
102
103 partition@fe0000 {
104 label = "reserved";
105 reg = <0xfe0000 0x10000>;
106 read-only;
107 };
108
109 partition@ff0000 {
110 label = "Bdata";
111 reg = <0xff0000 0x10000>;
112 };
113 };
114 };
115 };
116
117 &ehci {
118 status = "okay";
119 };
120
121 &ohci {
122 status = "okay";
123 };
124
125 &ethernet {
126 pinctrl-names = "default";
127 pinctrl-0 = <&ephy_pins>;
128 mtd-mac-address = <&factory 0x28>;
129 mediatek,portmap = "llllw";
130 };
131
132 &wmac {
133 ralink,mtd-eeprom = <&factory 0>;
134 pinctrl-names = "default";
135 pinctrl-0 = <&pa_pins>;
136 };
137
138 &pcie {
139 status = "okay";
140 };
141
142 &pcie0 {
143 mt76@0,0 {
144 reg = <0x0000 0 0 0 0>;
145 mediatek,mtd-eeprom = <&factory 0x8000>;
146 ieee80211-freq-limit = <5000000 6000000>;
147 };
148 };
149
150 &pinctrl {
151 state_default: pinctrl0 {
152 gpio {
153 ralink,group = "i2c", "rgmii1";
154 ralink,function = "gpio";
155 };
156 };
157 };