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