577afd3a5c2143dac9cef60d1bd3fd88b049bd99
[openwrt/staging/hauke.git] / target / linux / ramips / dts / rt3052_tenda_3g300m.dts
1 #include "rt3050.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "tenda,3g300m", "ralink,rt3052-soc";
8 model = "Tenda 3G300M";
9
10 aliases {
11 led-boot = &led_ap;
12 led-failsafe = &led_ap;
13 led-running = &led_ap;
14 led-upgrade = &led_ap;
15 };
16
17 leds {
18 compatible = "gpio-leds";
19
20 3grouter {
21 label = "blue:3grouter";
22 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
23 };
24
25 led_ap: ap {
26 label = "blue:ap";
27 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
28 };
29
30 wisprouter {
31 label = "blue:wisprouter";
32 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
33 };
34
35 wirelessrouter {
36 label = "blue:wirelessrouter";
37 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
38 };
39
40 3g {
41 label = "blue:3g";
42 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
43 trigger-sources = <&otg_port1>;
44 linux,default-trigger = "usbport";
45 };
46
47 wpsreset {
48 label = "blue:wpsreset";
49 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
50 };
51 };
52
53 keys {
54 compatible = "gpio-keys-polled";
55 poll-interval = <20>;
56
57 reset {
58 label = "reset";
59 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
60 linux,code = <KEY_RESTART>;
61 };
62
63 mode {
64 label = "mode";
65 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
66 linux,code = <BTN_0>;
67 };
68 };
69 };
70
71 &spi0 {
72 status = "okay";
73
74 flash@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 compatible = "nvmem-cells";
98 label = "factory";
99 reg = <0x40000 0x10000>;
100 #address-cells = <1>;
101 #size-cells = <1>;
102 read-only;
103
104 eeprom_factory_0: eeprom@0 {
105 reg = <0x0 0x200>;
106 };
107
108 macaddr_factory_4: macaddr@4 {
109 reg = <0x4 0x6>;
110 };
111 };
112
113 partition@50000 {
114 compatible = "denx,uimage";
115 label = "firmware";
116 reg = <0x50000 0x3b0000>;
117 };
118 };
119 };
120 };
121
122 &state_default {
123 gpio {
124 groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
125 function = "gpio";
126 };
127 };
128
129 &ethernet {
130 nvmem-cells = <&macaddr_factory_4>;
131 nvmem-cell-names = "mac-address";
132 };
133
134 &esw {
135 mediatek,portmap = <0x2f>;
136 };
137
138 &wmac {
139 nvmem-cells = <&eeprom_factory_0>;
140 nvmem-cell-names = "eeprom";
141 };
142
143 &otg {
144 status = "okay";
145 };