ramips: Use dts alias based status led
[oweals/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-status = &led_system;
14         };
15
16         gpio-leds {
17                 compatible = "gpio-leds";
18
19                 led_system: system {
20                         label = "mpr-a1:blue:system";
21                         gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
22                 };
23
24                 power {
25                         label = "mpr-a1:red:power";
26                         gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
27                 };
28         };
29
30         gpio-keys-polled {
31                 compatible = "gpio-keys-polled";
32                 #address-cells = <1>;
33                 #size-cells = <0>;
34                 poll-interval = <20>;
35
36                 wps {
37                         label = "reset";
38                         gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
39                         linux,code = <KEY_RESTART>;
40                 };
41         };
42
43         gpio_export {
44                 compatible = "gpio-export";
45                 #size-cells = <0>;
46
47                 usb {
48                         gpio-export,name = "usb";
49                         gpio-export,output = <1>;
50                         gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
51                 };
52
53                 root_hub {
54                         gpio-export,name = "root_hub";
55                         gpio-export,output = <1>;
56                         gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
57                 };
58         };
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                         read-only;
75                 };
76
77                 partition@30000 {
78                         label = "u-boot-env";
79                         reg = <0x30000 0x10000>;
80                         read-only;
81                 };
82
83                 factory: partition@40000 {
84                         label = "factory";
85                         reg = <0x40000 0x10000>;
86                         read-only;
87                 };
88
89                 partition@50000 {
90                         label = "firmware";
91                         reg = <0x50000 0x3b0000>;
92                 };
93         };
94 };
95
96 &gpio1 {
97         status = "okay";
98 };
99
100 &pinctrl {
101         state_default: pinctrl0 {
102                 gpio {
103                         ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf", "led";
104                         ralink,function = "gpio";
105                 };
106         };
107 };
108
109 &ethernet {
110         mtd-mac-address = <&factory 0x4>;
111 };
112
113 &esw {
114         mediatek,portmap = <0x2f>;
115 };
116
117 &wmac {
118         ralink,mtd-eeprom = <&factory 0>;
119 };
120
121 &ehci {
122         status = "okay";
123 };
124
125 &ohci {
126         status = "okay";
127 };