ramips: dts: Unify naming of gpio-led nodes
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / 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 memory@0 {
24 device_type = "memory";
25 reg = <0x0 0x4000000>;
26 };
27
28 leds {
29 compatible = "gpio-leds";
30
31 led_blue: status_blue {
32 label = "miwifi-nano:blue:status";
33 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
34 };
35 status_red {
36 label = "miwifi-nano:red:status";
37 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
38 };
39 status_amber {
40 label = "miwifi-nano:amber:status";
41 gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
42 };
43 };
44
45 keys {
46 compatible = "gpio-keys-polled";
47 poll-interval = <20>;
48
49 reset {
50 label = "reset";
51 gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
52 linux,code = <KEY_RESTART>;
53 };
54 };
55 };
56
57 &pinctrl {
58 state_default: pinctrl0 {
59 gpio {
60 ralink,group = "refclk", "wled_an", "gpio";
61 ralink,function = "gpio";
62 };
63 };
64 };
65
66 &wmac {
67 status = "okay";
68 ralink,mtd-eeprom = <&factory 0x4>;
69 };
70
71 &ethernet {
72 mtd-mac-address = <&factory 0x28>;
73 };
74
75 &spi0 {
76 status = "okay";
77
78 m25p80@0 {
79 compatible = "jedec,spi-nor";
80 reg = <0>;
81 spi-max-frequency = <10000000>;
82 m25p,chunked-io = <32>;
83
84 partitions {
85 compatible = "fixed-partitions";
86 #address-cells = <1>;
87 #size-cells = <1>;
88
89 partition@0 {
90 label = "u-boot";
91 reg = <0x0 0x30000>;
92 read-only;
93 };
94
95 partition@30000 {
96 label = "u-boot-env";
97 reg = <0x30000 0x10000>;
98 read-only;
99 };
100
101 factory: partition@40000 {
102 label = "factory";
103 reg = <0x40000 0x10000>;
104 read-only;
105 };
106
107 partition@50000 {
108 compatible = "denx,uimage";
109 label = "firmware";
110 reg = <0x50000 0xfb0000>;
111 };
112 };
113 };
114 };