ramips: convert mtd-mac-address to nvmem implementation
[openwrt/staging/jow.git] / target / linux / ramips / dts / rt2880_airlink101_ar725w.dts
1 #include "rt2880.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "airlink101,ar725w", "ralink,rt2880-soc";
8 model = "Airlink101 AR725W";
9
10 aliases {
11 led-boot = &led_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 };
16
17 flash@bdc00000 {
18 compatible = "cfi-flash";
19 reg = <0xbc400000 0x800000>;
20 bank-width = <2>;
21
22 partitions {
23 compatible = "fixed-partitions";
24 #address-cells = <1>;
25 #size-cells = <1>;
26
27 partition@0 {
28 reg = <0x0 0x30000>;
29 label = "u-boot";
30 read-only;
31 };
32
33 partition@30000 {
34 reg = <0x30000 0x10000>;
35 label = "u-boot-env";
36 };
37
38 factory: partition@40000 {
39 reg = <0x40000 0x10000>;
40 label = "factory";
41 read-only;
42 };
43
44 partition@50000 {
45 compatible = "denx,uimage";
46 reg = <0x50000 0x3B0000>;
47 label = "firmware";
48 };
49 };
50 };
51
52 leds {
53 compatible = "gpio-leds";
54
55 led_power: power {
56 label = "green:power";
57 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
58 };
59
60 wpsred {
61 label = "red:wps";
62 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
63 };
64
65 wpsblue {
66 label = "blue:wps";
67 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
68 };
69 };
70
71 keys {
72 compatible = "gpio-keys-polled";
73 poll-interval = <100>;
74
75 wps {
76 label = "wps";
77 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
78 linux,code = <KEY_WPS_BUTTON>;
79 };
80
81 reset {
82 label = "reset";
83 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
84 linux,code = <KEY_RESTART>;
85 };
86 };
87 };
88
89 &state_default {
90 gpio {
91 groups = "i2c", "spi", "uartlite";
92 function = "gpio";
93 };
94 };
95
96 &ethernet {
97 status = "okay";
98 nvmem-cells = <&macaddr_factory_4>;
99 nvmem-cell-names = "mac-address";
100
101 port@0 {
102 phy-handle = <&phy0>;
103 phy-mode = "mii";
104 };
105
106 mdio-bus {
107 status = "okay";
108
109 phy0: ethernet-phy@0 {
110 phy-mode = "mii";
111 reg = <0>;
112 };
113 };
114 };
115
116 &wmac {
117 status = "okay";
118 ralink,mtd-eeprom = <&factory 0x0>;
119 };
120
121 &factory {
122 compatible = "nvmem-cells";
123 #address-cells = <1>;
124 #size-cells = <1>;
125
126 macaddr_factory_4: macaddr@4 {
127 reg = <0x4 0x6>;
128 };
129 };