ramips: improve netis WF-2881 support
[oweals/openwrt.git] / target / linux / ramips / dts / rt5350_omnima_miniembplug.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 = "omnima,miniembplug", "ralink,rt5350-soc";
10         model = "Omnima MiniEMBPlug";
11
12         leds {
13                 compatible = "gpio-leds";
14
15                 wlan {
16                         label = "miniembplug:red:wlan";
17                         gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
18                 };
19
20                 mobile {
21                         label = "miniembplug:green:mobile";
22                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
23                         trigger-sources = <&ohci_port1>, <&ehci_port1>;
24                         linux,default-trigger = "usbport";
25                 };
26         };
27
28         keys {
29                 compatible = "gpio-keys-polled";
30                 poll-interval = <20>;
31
32                 wps {
33                         label = "wps";
34                         gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
35                         linux,code = <KEY_WPS_BUTTON>;
36                 };
37
38                 reset {
39                         label = "reset";
40                         gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
41                         linux,code = <KEY_WPS_BUTTON>;
42                 };
43
44                 mode-one {
45                         label = "mode1";
46                         gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
47                         linux,code = <KEY_WPS_BUTTON>;
48                 };
49
50                 mode-two {
51                         label = "mode2";
52                         gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
53                         linux,code = <KEY_WPS_BUTTON>;
54                 };
55         };
56 };
57
58 &pinctrl {
59         state_default: pinctrl0 {
60                 gpio {
61                         ralink,group = "i2c", "jtag", "uartf";
62                         ralink,function = "gpio";
63                 };
64         };
65 };
66
67 &gpio0 {
68         status = "okay";
69 };
70
71 &spi0 {
72         status = "okay";
73
74         m25p80@0 {
75                 compatible = "jedec,spi-nor";
76                 reg = <0>;
77                 spi-max-frequency = <10000000>;
78
79                 partitions {
80                         compatible = "fixed-partitions";
81                         #address-cells = <1>;
82                         #size-cells = <1>;
83
84                         partition@0 {
85                                 label = "u-boot";
86                                 reg = <0x0 0x30000>;
87                                 read-only;
88                         };
89
90                         partition@30000 {
91                                 label = "u-boot-env";
92                                 reg = <0x30000 0x10000>;
93                                 read-only;
94                         };
95
96                         factory: partition@40000 {
97                                 label = "factory";
98                                 reg = <0x40000 0x10000>;
99                                 read-only;
100                         };
101
102                         partition@50000 {
103                                 compatible = "denx,uimage";
104                                 label = "firmware";
105                                 reg = <0x50000 0x7b0000>;
106                         };
107                 };
108         };
109 };
110
111 &ethernet {
112         mtd-mac-address = <&factory 0x4>;
113 };
114
115 &esw {
116         mediatek,portmap = <0x2f>;
117 };
118
119 &wmac {
120         ralink,mtd-eeprom = <&factory 0>;
121 };
122
123 &ehci {
124         status = "okay";
125 };
126
127 &ohci {
128         status = "okay";
129 };