ramips: convert rt2x00 EEPROM to NVMEM format
[openwrt/staging/stintel.git] / target / linux / ramips / dts / rt2880_buffalo_wzr-agl300nh.dts
1 #include "rt2880.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 #address-cells = <1>;
8 #size-cells = <1>;
9 compatible = "buffalo,wzr-agl300nh", "ralink,rt2880-soc";
10 model = "Buffalo WZR-AGL300NH";
11
12 aliases {
13 led-boot = &led_router;
14 led-failsafe = &led_router;
15 led-running = &led_router;
16 led-upgrade = &led_router;
17 };
18
19 flash@1f000000 {
20 compatible = "cfi-flash";
21 reg = <0x1f000000 0x800000>;
22 bank-width = <2>;
23 device-width = <2>;
24
25 partitions {
26 compatible = "fixed-partitions";
27 #address-cells = <1>;
28 #size-cells = <1>;
29
30 partition@0 {
31 label = "uboot";
32 reg = <0x0 0x30000>;
33 read-only;
34 };
35
36 partition@30000 {
37 label = "uboot-env";
38 reg = <0x30000 0x10000>;
39 read-only;
40 };
41
42 factory: partition@40000 {
43 compatible = "nvmem-cells";
44 label = "factory";
45 reg = <0x40000 0x10000>;
46 #address-cells = <1>;
47 #size-cells = <1>;
48 read-only;
49
50 eeprom_factory_0: eeprom@0 {
51 reg = <0x0 0x200>;
52 };
53
54 macaddr_factory_4: macaddr@4 {
55 reg = <0x4 0x6>;
56 };
57 };
58
59 partition@50000 {
60 compatible = "denx,uimage";
61 label = "firmware";
62 reg = <0x50000 0x3b0000>;
63 };
64 };
65 };
66
67 rtl8366s {
68 compatible = "realtek,rtl8366s";
69 gpio-sda = <&gpio0 1 GPIO_ACTIVE_HIGH>;
70 gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>;
71 };
72
73 keys {
74 compatible = "gpio-keys-polled";
75 poll-interval = <100>;
76
77 wps {
78 label = "wps";
79 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
80 linux,code = <KEY_WPS_BUTTON>;
81 };
82
83 router {
84 label = "router_switch";
85 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
86 linux,code = <BTN_0>;
87 };
88
89 reset {
90 label = "reset";
91 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
92 linux,code = <KEY_RESTART>;
93 };
94 };
95
96 leds {
97 compatible = "gpio-leds";
98
99 led_router: router {
100 label = "green:router";
101 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
102 };
103
104 diag {
105 label = "red:diag";
106 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
107 };
108
109 security_g {
110 label = "orange:security_g";
111 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
112 };
113
114 security_n {
115 label = "orange:security_n";
116 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
117 };
118 };
119 };
120
121 &state_default {
122 gpio {
123 groups = "i2c", "uartlite", "mdio";
124 function = "gpio";
125 };
126 };
127
128 &ethernet {
129 status = "okay";
130 nvmem-cells = <&macaddr_factory_4>;
131 nvmem-cell-names = "mac-address";
132
133 port@0 {
134 mediatek,fixed-link = <1000 1 1 1>;
135 };
136
137 mdio-bus {
138 status = "okay";
139
140 phy0: ethernet-phy@0 {
141 phy-mode = "mii";
142 reg = <0>;
143 };
144 };
145 };
146
147 &pci {
148 status = "okay";
149 };
150
151 &wmac {
152 nvmem-cells = <&eeprom_factory_0>;
153 nvmem-cell-names = "eeprom";
154 };