ramips: add support for SNR-CPE-ME2-SFP
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3352_dlink_dir-615-h1.dts
1 #include "rt3352.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "dlink,dir-615-h1", "ralink,rt3352-soc";
8 model = "D-Link DIR-615 H1";
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 leds {
19 compatible = "gpio-leds";
20
21 status {
22 label = "amber:status";
23 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
24 };
25
26 led_status_green: status2 {
27 label = "green:status";
28 gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
29 default-state = "on";
30 };
31
32 wan {
33 label = "amber:wan";
34 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
35 };
36
37 wan2 {
38 label = "green:wan";
39 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
40 };
41
42 wps {
43 label = "blue:wps";
44 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
45 };
46 };
47
48 keys {
49 compatible = "gpio-keys-polled";
50 poll-interval = <20>;
51
52 reset {
53 label = "reset";
54 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
55 linux,code = <KEY_RESTART>;
56 };
57
58 wps {
59 label = "wps";
60 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
61 linux,code = <KEY_WPS_BUTTON>;
62 };
63 };
64 };
65
66 &spi0 {
67 status = "okay";
68
69 flash@0 {
70 compatible = "jedec,spi-nor";
71 reg = <0>;
72 spi-max-frequency = <10000000>;
73
74 partitions {
75 compatible = "fixed-partitions";
76 #address-cells = <1>;
77 #size-cells = <1>;
78
79 partition@0 {
80 label = "u-boot";
81 reg = <0x0 0x30000>;
82 read-only;
83 };
84
85 partition@30000 {
86 label = "u-boot-env";
87 reg = <0x30000 0x10000>;
88 read-only;
89 };
90
91 factory: partition@40000 {
92 label = "factory";
93 reg = <0x40000 0x10000>;
94 read-only;
95 };
96
97 partition@50000 {
98 compatible = "denx,uimage";
99 label = "firmware";
100 reg = <0x50000 0x3b0000>;
101 };
102 };
103 };
104 };
105
106 &state_default {
107 gpio {
108 groups = "i2c", "jtag", "uartf";
109 function = "gpio";
110 };
111 };
112
113 &ethernet {
114 nvmem-cells = <&macaddr_factory_28>;
115 nvmem-cell-names = "mac-address";
116 pinctrl-names = "default";
117 pinctrl-0 = <&rgmii_pins &mdio_pins>;
118 };
119
120 &esw {
121 mediatek,portmap = <0x2f>;
122 };
123
124 &wmac {
125 ralink,mtd-eeprom = <&factory 0x0>;
126 };
127
128 &factory {
129 compatible = "nvmem-cells";
130 #address-cells = <1>;
131 #size-cells = <1>;
132
133 macaddr_factory_28: macaddr@28 {
134 reg = <0x28 0x6>;
135 };
136 };