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