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