ramips: convert rt2x00 EEPROM to NVMEM format
[openwrt/openwrt.git] / target / linux / ramips / dts / rt2880_asus_rt-n15.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 = "asus,rt-n15", "ralink,rt2880-soc";
10 model = "Asus RT-N15";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
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_HIGH>;
80 linux,code = <KEY_WPS_BUTTON>;
81 };
82
83 reset {
84 label = "reset";
85 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
86 linux,code = <KEY_RESTART>;
87 };
88 };
89
90 leds {
91 compatible = "gpio-leds";
92
93 led_power: power {
94 label = "blue:power";
95 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
96 };
97 };
98 };
99
100 &state_default {
101 gpio {
102 groups = "i2c", "uartlite", "mdio";
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 mediatek,fixed-link = <1000 1 1 1>;
114 };
115
116 mdio-bus {
117 status = "okay";
118
119 phy0: ethernet-phy@0 {
120 phy-mode = "mii";
121 reg = <0>;
122 };
123 };
124 };
125
126 &wmac {
127 nvmem-cells = <&eeprom_factory_0>;
128 nvmem-cell-names = "eeprom";
129 };