62686b5489bf7b46943fdb081dbc8561d34dd81e
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3050_edimax_3g-6200n.dts
1 #include "rt3050.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/mtd/partitions/uimage.h>
6
7 / {
8 compatible = "edimax,3g-6200n", "ralink,rt3050-soc";
9 model = "Edimax 3g-6200n";
10
11 aliases {
12 led-boot = &led_power;
13 led-failsafe = &led_power;
14 led-running = &led_power;
15 led-upgrade = &led_power;
16 };
17
18 flash@1f000000 {
19 compatible = "cfi-flash";
20 reg = <0x1f000000 0x800000>;
21 bank-width = <2>;
22 device-width = <2>;
23
24 partitions {
25 compatible = "fixed-partitions";
26 #address-cells = <1>;
27 #size-cells = <1>;
28
29 partition@0 {
30 label = "u-boot";
31 reg = <0x0 0x30000>;
32 read-only;
33 };
34
35 partition@30000 {
36 label = "u-boot-env";
37 reg = <0x30000 0x10000>;
38 read-only;
39 };
40
41 factory: partition@40000 {
42 label = "factory";
43 reg = <0x40000 0x10000>;
44 read-only;
45
46 nvmem-layout {
47 compatible = "fixed-layout";
48 #address-cells = <1>;
49 #size-cells = <1>;
50
51 eeprom_factory_0: eeprom@0 {
52 reg = <0x0 0x200>;
53 };
54
55 macaddr_factory_4: macaddr@4 {
56 reg = <0x4 0x6>;
57 };
58 };
59 };
60
61 partition@3e0000 {
62 label = "cimage";
63 reg = <0x3e0000 0x20000>;
64 read-only;
65 };
66
67 partition@50000 {
68 compatible = "openwrt,uimage", "denx,uimage";
69 openwrt,offset = <FW_EDIMAX_OFFSET>;
70 openwrt,partition-magic = <FW_MAGIC_EDIMAX>;
71 label = "firmware";
72 reg = <0x50000 0x390000>;
73 };
74 };
75 };
76
77 leds {
78 compatible = "gpio-leds";
79
80 led_power: power {
81 label = "green:power";
82 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
83 };
84
85 wlan {
86 label = "amber:wlan";
87 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
88 };
89
90 3g {
91 label = "blue:3g";
92 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
93 trigger-sources = <&otg_port1>;
94 linux,default-trigger = "usbport";
95 };
96 };
97
98 keys {
99 compatible = "gpio-keys-polled";
100 poll-interval = <20>;
101
102 reset {
103 label = "reset";
104 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
105 linux,code = <KEY_RESTART>;
106 };
107
108 rfkill {
109 label = "wlanswitch";
110 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
111 linux,code = <KEY_RFKILL>;
112 };
113 };
114 };
115
116 &state_default {
117 gpio {
118 groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
119 function = "gpio";
120 };
121 };
122
123 &ethernet {
124 nvmem-cells = <&macaddr_factory_4>;
125 nvmem-cell-names = "mac-address";
126 };
127
128 &esw {
129 mediatek,portmap = <0x2f>;
130 };
131
132 &wmac {
133 nvmem-cells = <&eeprom_factory_0>;
134 nvmem-cell-names = "eeprom";
135 };
136
137 &otg {
138 status = "okay";
139 };