ramips/mt762x: convert devices to interrupt-driven gpio-keys
[oweals/openwrt.git] / target / linux / ramips / dts / mt7628an_xiaomi_miwifi-nano.dts
1 /dts-v1/;
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "xiaomi,miwifi-nano", "mediatek,mt7628an-soc";
10         model = "MiWiFi Nano";
11
12         aliases {
13                 led-boot = &led_blue;
14                 led-failsafe = &led_blue;
15                 led-running = &led_blue;
16                 led-upgrade = &led_blue;
17         };
18
19         chosen {
20                 bootargs = "console=ttyS0,115200";
21         };
22
23         leds {
24                 compatible = "gpio-leds";
25
26                 led_blue: status_blue {
27                         label = "miwifi-nano:blue:status";
28                         gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
29                 };
30
31                 status_red {
32                         label = "miwifi-nano:red:status";
33                         gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
34                 };
35
36                 status_amber {
37                         label = "miwifi-nano:amber:status";
38                         gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
39                 };
40         };
41
42         keys {
43                 compatible = "gpio-keys";
44
45                 reset {
46                         label = "reset";
47                         gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
48                         linux,code = <KEY_RESTART>;
49                 };
50         };
51 };
52
53 &pinctrl {
54         state_default: pinctrl0 {
55                 gpio {
56                         ralink,group = "gpio", "refclk", "wdt", "wled_an";
57                         ralink,function = "gpio";
58                 };
59         };
60 };
61
62 &ehci {
63         status = "disabled";
64 };
65
66 &ohci {
67         status = "disabled";
68 };
69
70 &wmac {
71         status = "okay";
72         ralink,mtd-eeprom = <&factory 0x4>;
73 };
74
75 &ethernet {
76         mtd-mac-address = <&factory 0x28>;
77 };
78
79 &spi0 {
80         status = "okay";
81
82         m25p80@0 {
83                 compatible = "jedec,spi-nor";
84                 reg = <0>;
85                 spi-max-frequency = <40000000>;
86
87                 partitions {
88                         compatible = "fixed-partitions";
89                         #address-cells = <1>;
90                         #size-cells = <1>;
91
92                         partition@0 {
93                                 label = "u-boot";
94                                 reg = <0x0 0x30000>;
95                                 read-only;
96                         };
97
98                         partition@30000 {
99                                 label = "u-boot-env";
100                                 reg = <0x30000 0x10000>;
101                         };
102
103                         factory: partition@40000 {
104                                 label = "factory";
105                                 reg = <0x40000 0x10000>;
106                                 read-only;
107                         };
108
109                         partition@50000 {
110                                 compatible = "denx,uimage";
111                                 label = "firmware";
112                                 reg = <0x50000 0xfb0000>;
113                         };
114                 };
115         };
116 };