ramips: convert rt2x00 EEPROM to NVMEM format
[openwrt/staging/wigyori.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 compatible = "nvmem-cells";
40 label = "factory";
41 reg = <0x40000 0x10000>;
42 #address-cells = <1>;
43 #size-cells = <1>;
44 read-only;
45
46 eeprom_factory_0: eeprom@0 {
47 reg = <0x0 0x200>;
48 };
49
50 macaddr_factory_4: macaddr@4 {
51 reg = <0x4 0x6>;
52 };
53 };
54
55 partition@50000 {
56 compatible = "denx,uimage";
57 reg = <0x50000 0x3B0000>;
58 label = "firmware";
59 };
60 };
61 };
62
63 leds {
64 compatible = "gpio-leds";
65
66 led_power: power {
67 label = "green:power";
68 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
69 };
70
71 wpsred {
72 label = "red:wps";
73 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
74 };
75
76 wpsblue {
77 label = "blue:wps";
78 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
79 };
80 };
81
82 keys {
83 compatible = "gpio-keys-polled";
84 poll-interval = <100>;
85
86 wps {
87 label = "wps";
88 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
89 linux,code = <KEY_WPS_BUTTON>;
90 };
91
92 reset {
93 label = "reset";
94 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
95 linux,code = <KEY_RESTART>;
96 };
97 };
98 };
99
100 &state_default {
101 gpio {
102 groups = "i2c", "spi", "uartlite";
103 function = "gpio";
104 };
105 };
106
107 &ethernet {
108 status = "okay";
109 nvmem-cells = <&macaddr_factory_4>;
110 nvmem-cell-names = "mac-address";
111
112 port@0 {
113 phy-handle = <&phy0>;
114 phy-mode = "mii";
115 };
116
117 mdio-bus {
118 status = "okay";
119
120 phy0: ethernet-phy@0 {
121 phy-mode = "mii";
122 reg = <0>;
123 };
124 };
125 };
126
127 &wmac {
128 status = "okay";
129 nvmem-cells = <&eeprom_factory_0>;
130 nvmem-cell-names = "eeprom";
131 };