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