ramips: mt7620n: convert to nvmem-layout
[openwrt/openwrt.git] / target / linux / ramips / dts / rt2880_buffalo_wli-tx4-ag300n.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,wli-tx4-ag300n", "ralink,rt2880-soc";
10 model = "Buffalo WLI-TX4-AG300N";
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 label = "factory";
44 reg = <0x40000 0x10000>;
45 read-only;
46
47 nvmem-layout {
48 compatible = "fixed-layout";
49 #address-cells = <1>;
50 #size-cells = <1>;
51
52 eeprom_factory_0: eeprom@0 {
53 reg = <0x0 0x200>;
54 };
55
56 macaddr_factory_4: macaddr@4 {
57 reg = <0x4 0x6>;
58 };
59 };
60 };
61
62 partition@50000 {
63 compatible = "denx,uimage";
64 label = "firmware";
65 reg = <0x50000 0x3b0000>;
66 };
67 };
68 };
69
70 keys {
71 compatible = "gpio-keys-polled";
72 poll-interval = <100>;
73
74 wps {
75 label = "wps";
76 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
77 linux,code = <KEY_WPS_BUTTON>;
78 };
79
80 bandwidth {
81 label = "bandwidth";
82 gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
83 linux,code = <KEY_RESTART>;
84 };
85
86 reset {
87 label = "reset";
88 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
89 linux,code = <KEY_RESTART>;
90 };
91 };
92
93 leds {
94 compatible = "gpio-leds";
95
96 diag {
97 label = "red:diag";
98 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
99 };
100
101 led_power: power {
102 label = "blue:power";
103 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
104 };
105
106 security {
107 label = "blue:security";
108 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
109 };
110 };
111 };
112
113 &ethernet {
114 status = "okay";
115 nvmem-cells = <&macaddr_factory_4>;
116 nvmem-cell-names = "mac-address";
117
118 port@0 {
119 mediatek,fixed-link = <100 1 1 1>;
120 };
121
122 mdio-bus {
123 status = "okay";
124
125 phy0: ethernet-phy@0 {
126 phy-mode = "mii";
127 reg = <0>;
128 };
129 };
130 };
131
132 &wmac {
133 nvmem-cells = <&eeprom_factory_0>;
134 nvmem-cell-names = "eeprom";
135 };