ramips: convert rt2x00 EEPROM to NVMEM format
[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 compatible = "nvmem-cells";
43 label = "factory";
44 reg = <0x40000 0x10000>;
45 #address-cells = <1>;
46 #size-cells = <1>;
47 read-only;
48
49 eeprom_factory_0: eeprom@0 {
50 reg = <0x0 0x200>;
51 };
52
53 macaddr_factory_4: macaddr@4 {
54 reg = <0x4 0x6>;
55 };
56 };
57
58 partition@3e0000 {
59 label = "cimage";
60 reg = <0x3e0000 0x20000>;
61 read-only;
62 };
63
64 partition@50000 {
65 compatible = "openwrt,uimage", "denx,uimage";
66 openwrt,offset = <FW_EDIMAX_OFFSET>;
67 openwrt,partition-magic = <FW_MAGIC_EDIMAX>;
68 label = "firmware";
69 reg = <0x50000 0x390000>;
70 };
71 };
72 };
73
74 leds {
75 compatible = "gpio-leds";
76
77 led_power: power {
78 label = "green:power";
79 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
80 };
81
82 wlan {
83 label = "amber:wlan";
84 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
85 };
86
87 3g {
88 label = "blue:3g";
89 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
90 trigger-sources = <&otg_port1>;
91 linux,default-trigger = "usbport";
92 };
93 };
94
95 keys {
96 compatible = "gpio-keys-polled";
97 poll-interval = <20>;
98
99 reset {
100 label = "reset";
101 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
102 linux,code = <KEY_RESTART>;
103 };
104
105 rfkill {
106 label = "wlanswitch";
107 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
108 linux,code = <KEY_RFKILL>;
109 };
110 };
111 };
112
113 &state_default {
114 gpio {
115 groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
116 function = "gpio";
117 };
118 };
119
120 &ethernet {
121 nvmem-cells = <&macaddr_factory_4>;
122 nvmem-cell-names = "mac-address";
123 };
124
125 &esw {
126 mediatek,portmap = <0x2f>;
127 };
128
129 &wmac {
130 nvmem-cells = <&eeprom_factory_0>;
131 nvmem-cell-names = "eeprom";
132 };
133
134 &otg {
135 status = "okay";
136 };