ramips: add support for indicating the boot state using multiple leds
[openwrt/staging/mkresin.git] / target / linux / ramips / dts / NW718.dts
1 /dts-v1/;
2
3 #include "rt3050.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "netcore,nw718", "ralink,rt3050-soc";
10 model = "Netcore NW718";
11
12 aliases {
13 led-boot = &led_cpu;
14 led-failsafe = &led_cpu;
15 led-running = &led_cpu;
16 led-upgrade = &led_cpu;
17 };
18
19 gpio-leds {
20 compatible = "gpio-leds";
21
22 led_cpu: cpu {
23 label = "nw718:amber:cpu";
24 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
25 };
26
27 usb {
28 label = "nw718:amber:usb";
29 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
30 trigger-sources = <&otg_port1>;
31 linux,default-trigger = "usbport";
32 };
33
34 wps {
35 label = "nw718:amber:wps";
36 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
37 };
38 };
39
40 gpio-keys-polled {
41 compatible = "gpio-keys-polled";
42 poll-interval = <20>;
43
44 reset {
45 label = "reset";
46 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
47 linux,code = <KEY_RESTART>;
48 };
49
50 wps {
51 label = "wps";
52 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
53 linux,code = <KEY_WPS_BUTTON>;
54 };
55 };
56 };
57
58 &spi0 {
59 status = "okay";
60
61 m25p80@0 {
62 compatible = "jedec,spi-nor";
63 reg = <0>;
64 spi-max-frequency = <25000000>;
65
66 partitions {
67 compatible = "fixed-partitions";
68 #address-cells = <1>;
69 #size-cells = <1>;
70
71 partition@0 {
72 label = "u-boot";
73 reg = <0x0 0x30000>;
74 read-only;
75 };
76
77 partition@30000 {
78 label = "config";
79 reg = <0x30000 0x20000>;
80 read-only;
81 };
82
83 factory: partition@50000 {
84 label = "factory";
85 reg = <0x50000 0x10000>;
86 read-only;
87 };
88
89 partition@60000 {
90 label = "firmware";
91 reg = <0x60000 0x3a0000>;
92 };
93 };
94 };
95 };
96
97 &pinctrl {
98 state_default: pinctrl0 {
99 gpio {
100 ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf";
101 ralink,function = "gpio";
102 };
103 };
104 };
105
106 &ethernet {
107 mtd-mac-address = <&factory 0x4>;
108 };
109
110 &esw {
111 mediatek,portmap = <0x2f>;
112 };
113
114 &wmac {
115 ralink,mtd-eeprom = <&factory 0>;
116 };
117
118 &otg {
119 status = "okay";
120 };