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