ramips: add support for ALFA Network Quad-E4G
[oweals/openwrt.git] / target / linux / ramips / dts / rt5350_hame_mpr-a2.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-a2", "ralink,rt5350-soc";
10         model = "HAME MPR-A2";
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         leds {
20                 compatible = "gpio-leds";
21
22                 led_system: system {
23                         label = "mpr-a2:blue:system";
24                         gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
25                 };
26
27                 power {
28                         label = "mpr-a2:red:power";
29                         gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
30                 };
31         };
32
33         keys {
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                                 compatible = "denx,uimage";
95                                 label = "firmware";
96                                 reg = <0x50000 0x7b0000>;
97                         };
98                 };
99         };
100 };
101
102 &pinctrl {
103         state_default: pinctrl0 {
104                 gpio {
105                         ralink,group = "i2c", "jtag", "uartf";
106                         ralink,function = "gpio";
107                 };
108         };
109 };
110
111 &ethernet {
112         mtd-mac-address = <&factory 0x4>;
113 };
114
115 &esw {
116         mediatek,portmap = <0x1>;
117         mediatek,portdisable = <0x3e>;
118 };
119
120 &wmac {
121         ralink,mtd-eeprom = <&factory 0>;
122 };
123
124 &ehci {
125         status = "okay";
126 };
127
128 &ohci {
129         status = "okay";
130 };