ramips: rtxxxx: convert to nvmem-layout
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3050_dlink_dir-300-b1.dts
1 #include "rt3050.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "dlink,dir-300-b1", "ralink,rt3050-soc";
8 model = "D-Link DIR-300 B1";
9
10 aliases {
11 led-boot = &led_status_green;
12 led-failsafe = &led_status_green;
13 led-running = &led_status_green;
14 led-upgrade = &led_status_green;
15 };
16
17 flash@1f000000 {
18 compatible = "cfi-flash";
19 reg = <0x1f000000 0x800000>;
20 bank-width = <2>;
21 device-width = <2>;
22
23 partitions {
24 compatible = "fixed-partitions";
25 #address-cells = <1>;
26 #size-cells = <1>;
27
28 partition@0 {
29 label = "u-boot";
30 reg = <0x0 0x30000>;
31 read-only;
32 };
33
34 devdata: partition@30000 {
35 label = "devdata";
36 reg = <0x30000 0x10000>;
37 read-only;
38
39 nvmem-layout {
40 compatible = "fixed-layout";
41 #address-cells = <1>;
42 #size-cells = <1>;
43
44 eeprom_devdata_4000: eeprom@4000 {
45 reg = <0x4000 0x200>;
46 };
47
48 macaddr_devdata_4004: macaddr@4004 {
49 reg = <0x4004 0x6>;
50 };
51 };
52 };
53
54 partition@40000 {
55 label = "devconf";
56 reg = <0x40000 0x10000>;
57 read-only;
58 };
59
60 partition@50000 {
61 compatible = "denx,uimage";
62 label = "firmware";
63 reg = <0x50000 0x3b0000>;
64 };
65 };
66 };
67
68 keys {
69 compatible = "gpio-keys-polled";
70 poll-interval = <20>;
71
72 reset {
73 label = "reset";
74 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
75 linux,code = <KEY_RESTART>;
76 };
77
78 wps {
79 label = "wps";
80 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
81 linux,code = <KEY_WPS_BUTTON>;
82 };
83 };
84
85 leds {
86 compatible = "gpio-leds";
87
88 status {
89 label = "amber:status";
90 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
91 };
92
93 led_status_green: status2 {
94 label = "green:status";
95 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
96 };
97
98 wan {
99 label = "amber:wan";
100 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
101 };
102
103 wan2 {
104 label = "green:wan";
105 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
106 };
107
108 wps {
109 label = "blue:wps";
110 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
111 };
112 };
113 };
114
115 &state_default {
116 gpio {
117 groups = "i2c", "spi", "jtag", "mdio", "rgmii", "uartf";
118 function = "gpio";
119 };
120 };
121
122 &ethernet {
123 nvmem-cells = <&macaddr_devdata_4004>;
124 nvmem-cell-names = "mac-address";
125 };
126
127 &esw {
128 mediatek,portmap = <0x2f>;
129 };
130
131 &wmac {
132 nvmem-cells = <&eeprom_devdata_4000>;
133 nvmem-cell-names = "eeprom";
134 };