ramips: add work-in-progress support for D-Link DIR-X1860
[openwrt/staging/nbd.git] / target / linux / ramips / dts / mt7621_dlink_dir-x1860.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "dlink,dir-x1860", "mediatek,mt7621-soc";
8 model = "DLink DIR-X1860";
9
10 chosen {
11 bootargs-override = "console=ttyS0,115200";
12 };
13
14 aliases {
15 label-mac-device = &gmac0;
16 led-boot = &led_power_orange;
17 led-failsafe = &led_power_white;
18 led-running = &led_power_white;
19 led-upgrade = &led_net_orange;
20 };
21
22 gpio-leds {
23 compatible = "gpio-leds";
24
25 led_power_white: power_white {
26 label = "white:power";
27 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
28 };
29
30 led_net_orange: net_orange {
31 label = "orange:net";
32 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
33 };
34
35 led_power_orange: power_orange {
36 label = "orange:power";
37 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
38 };
39
40 led_net_white {
41 label = "white:net";
42 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
43 };
44 };
45
46 keys {
47 compatible = "gpio-keys";
48
49 reset {
50 label = "reset";
51 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
52 linux,code = <KEY_RESTART>;
53 };
54
55 wps {
56 label = "wps";
57 linux,code = <KEY_WPS_BUTTON>;
58 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
59 };
60 };
61 };
62
63 &mdio {
64 phy4: ethernet-phy@4 {
65 reg = <4>;
66 };
67 };
68
69 &gmac1 {
70 status = "okay";
71 phy-handle = <&phy4>;
72 };
73
74 &switch0 {
75 ports {
76 port@0 {
77 status = "okay";
78 label = "lan4";
79 };
80
81 port@1 {
82 status = "okay";
83 label = "lan3";
84 };
85
86 port@2 {
87 status = "okay";
88 label = "lan2";
89 };
90
91 port@3 {
92 status = "okay";
93 label = "lan1";
94 };
95 };
96 };
97
98 &nand {
99 status = "okay";
100
101 partitions {
102 compatible = "fixed-partitions";
103 #address-cells = <1>;
104 #size-cells = <1>;
105
106 partition@0 {
107 label = "u-boot";
108 reg = <0x00000 0x80000>;
109 read-only;
110 };
111
112 partition@80000 {
113 label = "u-boot-env";
114 reg = <0x80000 0x80000>;
115 };
116
117 factory: partition@100000 {
118 label = "factory";
119 reg = <0x100000 0x80000>;
120 };
121
122 partition@180000 {
123 label = "kernel";
124 reg = <0x180000 0x400000>;
125 };
126
127 partition@580000 {
128 label = "ubi";
129 reg = <0x580000 0x2b00000>;
130 };
131
132 partition@2c80000 {
133 label = "firmware2";
134 reg = <0x2c80000 0x2b00000>;
135 };
136
137 partition@5780000 {
138 label = "Devdata";
139 reg = <0x5780000 0x800000>;
140 };
141
142 partition@5f80000 {
143 label = "User_data";
144 reg = <0x5f80000 0x2000000>;
145 };
146 };
147 };
148
149 &state_default {
150 gpio {
151 groups = "i2c", "uart3", "jtag", "wdt";
152 function = "gpio";
153 };
154 };
155
156 &pcie {
157 status = "okay";
158 };
159
160 &pcie1 {
161 mt76@0,0 {
162 reg = <0x0000 0 0 0 0>;
163 mediatek,mtd-eeprom = <&factory 0x0000>;
164 };
165 };