ramips: add support for Sercomm CPJ routers
[openwrt/openwrt.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 compatible = "nvmem-cells";
37 label = "devdata";
38 reg = <0x30000 0x10000>;
39 #address-cells = <1>;
40 #size-cells = <1>;
41 read-only;
42
43 eeprom_devdata_4000: eeprom@4000 {
44 reg = <0x4000 0x200>;
45 };
46 };
47
48 partition@40000 {
49 label = "devconf";
50 reg = <0x40000 0x10000>;
51 read-only;
52 };
53
54 partition@50000 {
55 compatible = "denx,uimage";
56 label = "firmware";
57 reg = <0x50000 0x3b0000>;
58 };
59 };
60 };
61
62 keys {
63 compatible = "gpio-keys-polled";
64 poll-interval = <20>;
65
66 reset {
67 label = "reset";
68 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
69 linux,code = <KEY_RESTART>;
70 };
71
72 wps {
73 label = "wps";
74 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
75 linux,code = <KEY_WPS_BUTTON>;
76 };
77 };
78
79 leds {
80 compatible = "gpio-leds";
81
82 status_amber {
83 label = "amber:status";
84 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
85 };
86
87 led_status_green: status_green {
88 label = "green:status";
89 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
90 default-state = "on";
91 };
92
93 wan_amber {
94 label = "amber:wan";
95 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
96 };
97
98 wan_green {
99 label = "green:wan";
100 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
101 };
102
103 wps {
104 label = "blue:wps";
105 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
106 };
107 };
108 };
109
110 &esw {
111 mediatek,portmap = <0x2f>;
112 };
113
114 &wmac {
115 nvmem-cells = <&eeprom_devdata_4000>;
116 nvmem-cell-names = "eeprom";
117 };
118
119 &state_default {
120 gpio {
121 groups = "i2c", "spi", "jtag", "mdio", "rgmii", "uartf";
122 function = "gpio";
123 };
124 };