dc2c49cd0b80eee4009b106c77989b4d7faff857
[openwrt/staging/wigyori.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 nvmem-layout {
97 compatible = "fixed-layout";
98 #address-cells = <1>;
99 #size-cells = <1>;
100
101 eeprom_factory_0: eeprom@0 {
102 reg = <0x0 0x200>;
103 };
104
105 macaddr_factory_28: macaddr@28 {
106 reg = <0x28 0x6>;
107 };
108 };
109 };
110
111 partition@50000 {
112 compatible = "denx,uimage";
113 label = "firmware";
114 reg = <0x50000 0x3b0000>;
115 };
116 };
117 };
118 };
119
120 &state_default {
121 gpio {
122 groups = "i2c", "jtag", "uartf";
123 function = "gpio";
124 };
125 };
126
127 &ethernet {
128 nvmem-cells = <&macaddr_factory_28>;
129 nvmem-cell-names = "mac-address";
130 pinctrl-names = "default";
131 pinctrl-0 = <&rgmii_pins &mdio_pins>;
132 };
133
134 &esw {
135 mediatek,portmap = <0x2f>;
136 };
137
138 &wmac {
139 nvmem-cells = <&eeprom_factory_0>;
140 nvmem-cell-names = "eeprom";
141 };