ramips: convert mtd-mac-address to nvmem implementation
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / rt3052_alfa-network_w502u.dts
1 #include "rt3050.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "alfa-network,w502u", "ralink,rt3052-soc";
8 model = "ALFA Network W502U";
9
10 aliases {
11 led-boot = &led_wps;
12 led-failsafe = &led_wps;
13 led-running = &led_wps;
14 led-upgrade = &led_wps;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,115200";
19 };
20
21 flash@1f000000 {
22 compatible = "cfi-flash";
23 reg = <0x1f000000 0x800000>;
24 bank-width = <2>;
25 device-width = <2>;
26
27 partitions {
28 compatible = "fixed-partitions";
29 #address-cells = <1>;
30 #size-cells = <1>;
31
32 partition@0 {
33 label = "u-boot";
34 reg = <0x0 0x30000>;
35 read-only;
36 };
37
38 partition@30000 {
39 label = "u-boot-env";
40 reg = <0x30000 0x10000>;
41 read-only;
42 };
43
44 factory: partition@40000 {
45 label = "factory";
46 reg = <0x40000 0x10000>;
47 read-only;
48 };
49
50 partition@50000 {
51 compatible = "denx,uimage";
52 label = "firmware";
53 reg = <0x50000 0x7b0000>;
54 };
55 };
56 };
57
58 leds {
59 compatible = "gpio-leds";
60
61 usb {
62 label = "blue:usb";
63 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
64 trigger-sources = <&otg_port1>;
65 linux,default-trigger = "usbport";
66 };
67
68 led_wps: wps {
69 label = "blue:wps";
70 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
71 };
72 };
73
74 keys {
75 compatible = "gpio-keys-polled";
76 poll-interval = <20>;
77
78 reset {
79 label = "reset";
80 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
81 linux,code = <KEY_RESTART>;
82 };
83
84 wps {
85 label = "wps";
86 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
87 linux,code = <KEY_WPS_BUTTON>;
88 };
89 };
90 };
91
92 &state_default {
93 gpio {
94 groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
95 function = "gpio";
96 };
97 };
98
99 &ethernet {
100 nvmem-cells = <&macaddr_factory_28>;
101 nvmem-cell-names = "mac-address";
102 };
103
104 &esw {
105 mediatek,portmap = <0x3e>;
106 };
107
108 &wmac {
109 ralink,mtd-eeprom = <&factory 0x0>;
110 };
111
112 &otg {
113 status = "okay";
114 };
115
116 &factory {
117 compatible = "nvmem-cells";
118 #address-cells = <1>;
119 #size-cells = <1>;
120
121 macaddr_factory_28: macaddr@28 {
122 reg = <0x28 0x6>;
123 };
124 };