ramips: add button support and make LEDs known to userspace for DIR-860L B1
[openwrt/openwrt.git] / target / linux / ramips / dts / DIR-860L-B1.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 / {
6 compatible = "ralink,mt7621-eval-board", "ralink,mt7621-soc";
7 model = "D-Link DIR-860L B1";
8
9 memory@0 {
10 device_type = "memory";
11 reg = <0x0 0x8000000>;
12 };
13
14 chosen {
15 bootargs = "console=ttyS0,57600";
16 };
17
18 gpio-leds {
19 compatible = "gpio-leds";
20
21 power {
22 label = "dir-860l-b1:orange:power";
23 gpios = <&gpio0 13 1>;
24 };
25
26 power2 {
27 label = "dir-860l-b1:green:power";
28 gpios = <&gpio0 15 1>;
29 };
30
31 net {
32 label = "dir-860l-b1:orange:net";
33 gpios = <&gpio0 14 1>;
34 };
35
36 net2 {
37 label = "dir-860l-b1:green:net";
38 gpios = <&gpio0 16 1>;
39 };
40 };
41
42 gpio-keys-polled {
43 compatible = "gpio-keys-polled";
44 #address-cells = <1>;
45 #size-cells = <0>;
46 poll-interval = <20>;
47
48 reset {
49 label = "reset";
50 gpios = <&gpio0 7 1>;
51 linux,code = <0x198>;
52 };
53
54 wps {
55 label = "wps";
56 gpios = <&gpio0 18 1>;
57 linux,code = <0x211>;
58 };
59 };
60 };
61
62 &spi0 {
63 status = "okay";
64
65 m25p80@0 {
66 #address-cells = <1>;
67 #size-cells = <1>;
68 compatible = "jedec,spi-nor";
69 reg = <0>;
70 linux,modalias = "m25p80";
71 spi-max-frequency = <10000000>;
72
73 partition@0 {
74 label = "u-boot";
75 reg = <0x0 0x30000>;
76 read-only;
77 };
78
79 partition@30000 {
80 label = "u-boot-env";
81 reg = <0x30000 0x4000>;
82 read-only;
83 };
84
85 radio: partition@34000 {
86 label = "radio";
87 reg = <0x34000 0x4000>;
88 read-only;
89 };
90
91 factory: partition@38000 {
92 label = "factory";
93 reg = <0x38000 0x8000>;
94 read-only;
95 };
96
97 partition@40000 {
98 label = "defaults";
99 reg = <0x40000 0x10000>;
100 read-only;
101 };
102
103 partition@50000 {
104 label = "firmware";
105 reg = <0x50000 0xfb0000>;
106 };
107 };
108 };
109
110 &pcie {
111 status = "okay";
112
113 pcie0 {
114 mt76@0,0 {
115 reg = <0x0000 0 0 0 0>;
116 device_type = "pci";
117 mediatek,mtd-eeprom = <&radio 0x2000>;
118 mediatek,2ghz = <0>;
119 };
120 };
121
122 pcie1 {
123 mt76@1,0 {
124 reg = <0x0000 0 0 0 0>;
125 device_type = "pci";
126 mediatek,mtd-eeprom = <&radio 0>;
127 mediatek,5ghz = <0>;
128 };
129 };
130 };
131
132 &pinctrl {
133 state_default: pinctrl0 {
134 gpio {
135 ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
136 ralink,function = "gpio";
137 };
138 };
139 };