Fresh pull from upstream lede-17.01 branch to fix several outstanding
[librecmc/librecmc.git] / target / linux / ramips / dts / MPRA2.dts
1 /dts-v1/;
2
3 #include "rt5350.dtsi"
4
5 #include <dt-bindings/input/input.h>
6
7 / {
8         compatible = "MPRA2", "ralink,rt5350-soc";
9         model = "HAME MPR-A2";
10
11         gpio-leds {
12                 compatible = "gpio-leds";
13
14                 system {
15                         label = "mpr-a2:blue:system";
16                         gpios = <&gpio0 20 1>;
17                 };
18
19                 power {
20                         label = "mpr-a2:red:power";
21                         gpios = <&gpio0 17 1>;
22                 };
23         };
24
25         gpio-keys-polled {
26                 compatible = "gpio-keys-polled";
27                 #address-cells = <1>;
28                 #size-cells = <0>;
29                 poll-interval = <20>;
30
31                 wps {
32                         label = "reset";
33                         gpios = <&gpio0 0 1>;
34                         linux,code = <KEY_RESTART>;
35                 };
36         };
37
38         gpio_export {
39                 compatible = "gpio-export";
40                 #size-cells = <0>;
41
42                 usb {
43                         gpio-export,name = "usb";
44                         gpio-export,output = <1>;
45                         gpios = <&gpio0 7 0>;
46                 };
47
48                 root_hub {
49                         gpio-export,name = "root_hub";
50                         gpio-export,output = <1>;
51                         gpios = <&gpio0 12 0>;
52                 };
53         };
54 };
55
56 &spi0 {
57         status = "okay";
58
59         m25p80@0 {
60                 #address-cells = <1>;
61                 #size-cells = <1>;
62                 compatible = "jedec,spi-nor";
63                 reg = <0>;
64                 spi-max-frequency = <10000000>;
65
66                 partition@0 {
67                         label = "u-boot";
68                         reg = <0x0 0x30000>;
69                         read-only;
70                 };
71
72                 partition@30000 {
73                         label = "u-boot-env";
74                         reg = <0x30000 0x10000>;
75                         read-only;
76                 };
77
78                 factory: partition@40000 {
79                         label = "factory";
80                         reg = <0x40000 0x10000>;
81                         read-only;
82                 };
83
84                 partition@50000 {
85                         label = "firmware";
86                         reg = <0x50000 0x7b0000>;
87                 };
88         };
89 };
90
91 &pinctrl {
92         state_default: pinctrl0 {
93                 gpio {
94                         ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf";
95                         ralink,function = "gpio";
96                 };
97         };
98 };
99
100 &ethernet {
101         mtd-mac-address = <&factory 0x4>;
102 };
103
104 &esw {
105         mediatek,portmap = <0x1>;
106         mediatek,portdisable = <0x3e>;
107 };
108
109 &wmac {
110         ralink,mtd-eeprom = <&factory 0>;
111 };
112
113 &ehci {
114         status = "okay";
115 };
116
117 &ohci {
118         status = "okay";
119 };