ramips: add support for indicating the boot state using multiple leds
[openwrt/openwrt.git] / target / linux / ramips / dts / MPRA1.dts
1 /dts-v1/;
2
3 #include "rt5350.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "hame,mpr-a1", "ralink,rt5350-soc";
10 model = "HAME MPR-A1";
11
12 aliases {
13 led-boot = &led_system;
14 led-failsafe = &led_system;
15 led-running = &led_system;
16 led-upgrade = &led_system;
17 };
18
19 gpio-leds {
20 compatible = "gpio-leds";
21
22 led_system: system {
23 label = "mpr-a1:blue:system";
24 gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
25 };
26
27 power {
28 label = "mpr-a1:red:power";
29 gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
30 };
31 };
32
33 gpio-keys-polled {
34 compatible = "gpio-keys-polled";
35 poll-interval = <20>;
36
37 wps {
38 label = "reset";
39 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
40 linux,code = <KEY_RESTART>;
41 };
42 };
43
44 gpio_export {
45 compatible = "gpio-export";
46 #size-cells = <0>;
47
48 usb {
49 gpio-export,name = "usb";
50 gpio-export,output = <1>;
51 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
52 };
53
54 root_hub {
55 gpio-export,name = "root_hub";
56 gpio-export,output = <1>;
57 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
58 };
59 };
60 };
61
62 &spi0 {
63 status = "okay";
64
65 m25p80@0 {
66 compatible = "jedec,spi-nor";
67 reg = <0>;
68 spi-max-frequency = <10000000>;
69
70 partitions {
71 compatible = "fixed-partitions";
72 #address-cells = <1>;
73 #size-cells = <1>;
74
75 partition@0 {
76 label = "u-boot";
77 reg = <0x0 0x30000>;
78 read-only;
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 0x3b0000>;
96 };
97 };
98 };
99 };
100
101 &gpio1 {
102 status = "okay";
103 };
104
105 &pinctrl {
106 state_default: pinctrl0 {
107 gpio {
108 ralink,group = "i2c", "jtag", "uartf", "led";
109 ralink,function = "gpio";
110 };
111 };
112 };
113
114 &ethernet {
115 mtd-mac-address = <&factory 0x4>;
116 };
117
118 &esw {
119 mediatek,portmap = <0x2f>;
120 };
121
122 &wmac {
123 ralink,mtd-eeprom = <&factory 0>;
124 };
125
126 &ehci {
127 status = "okay";
128 };
129
130 &ohci {
131 status = "okay";
132 };