ramips: enable external amplifier for D-Link DIR-810L
[openwrt/openwrt.git] / target / linux / ramips / dts / LR-25G001.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "lava,lr-25g001", "ralink,mt7620a-soc";
10 model = "LAVA LR-25G001";
11
12 aliases {
13 led-boot = &led_status;
14 led-failsafe = &led_status;
15 led-running = &led_status;
16 led-upgrade = &led_status;
17 };
18
19 keys {
20 compatible = "gpio-keys-polled";
21 poll-interval = <20>;
22
23 wps {
24 label = "wps";
25 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
26 linux,code = <KEY_WPS_BUTTON>;
27 };
28
29 reset {
30 label = "reset";
31 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_RESTART>;
33 };
34 };
35
36 leds {
37 compatible = "gpio-leds";
38
39 led_status: status {
40 label = "lr-25g001:green:status";
41 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
42 };
43
44 wifi2g {
45 label = "lr-25g001:green:wifi2g";
46 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
47 };
48
49 wifi5g {
50 label = "lr-25g001:green:wifi5g";
51 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
52 };
53 };
54
55 gpio_export {
56 compatible = "gpio-export";
57 #size-cells = <0>;
58
59 usbpower {
60 gpio-export,name = "usbpower";
61 gpio-export,output = <1>;
62 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
63 };
64 };
65 };
66
67 &gpio0 {
68 status = "okay";
69 };
70
71 &spi0 {
72 status = "okay";
73
74 flash@0 {
75 compatible = "jedec,spi-nor";
76 reg = <0>;
77 spi-max-frequency = <10000000>;
78
79 partitions {
80 compatible = "fixed-partitions";
81 #address-cells = <1>;
82 #size-cells = <1>;
83
84 partition@0 {
85 label = "jboot";
86 reg = <0x0 0x10000>;
87 read-only;
88 };
89
90 partition@10000 {
91 compatible = "amit,jimage";
92 label = "firmware";
93 reg = <0x10000 0xfe0000>;
94 };
95
96 config: partition@ff0000 {
97 label = "config";
98 reg = <0xff0000 0x10000>;
99 read-only;
100 };
101 };
102 };
103 };
104
105 &ehci {
106 status = "okay";
107 };
108
109 &ohci {
110 status = "okay";
111 };
112
113 &ethernet {
114 status = "okay";
115 pinctrl-names = "default";
116 pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
117
118 port@5 {
119 status = "okay";
120 phy-mode = "rgmii";
121 mediatek,fixed-link = <1000 1 1 1>;
122 };
123
124 mdio-bus {
125 status = "okay";
126 mediatek,mdio-mode = <1>;
127
128 phy0: ethernet-phy@0 {
129 reg = <0>;
130 phy-mode = "rgmii";
131 qca,ar8327-initvals = <
132 0x04 0x87300000 /* PORT0 PAD MODE CTRL */
133 0x0c 0x00000000 /* PORT6 PAD MODE CTRL */
134 0x7c 0x0000007e /* PORT0_STATUS */
135 0x94 0x00000000 /* PORT6_STATUS */
136 >;
137 };
138
139 phy1: ethernet-phy@1 {
140 reg = <1>;
141 phy-mode = "rgmii";
142 };
143
144 phy2: ethernet-phy@2 {
145 reg = <2>;
146 phy-mode = "rgmii";
147 };
148
149 phy3: ethernet-phy@3 {
150 reg = <3>;
151 phy-mode = "rgmii";
152 };
153
154 phy4: ethernet-phy@4 {
155 reg = <4>;
156 phy-mode = "rgmii";
157 };
158 };
159 };
160
161 &pcie {
162 status = "okay";
163 };
164
165 &pcie0 {
166 mt76x0e@0,0 {
167 reg = <0x0000 0 0 0 0>;
168 mtd-mac-address = <&config 0xe07e>;
169 mtd-mac-address-increment = <(2)>;
170 mediatek,mtd-eeprom = <&config 0xe08a>;
171 };
172 };
173
174 &pinctrl {
175 state_default: pinctrl0 {
176 gpio {
177 ralink,group = "uartf", "i2c";
178 ralink,function = "gpio";
179 };
180 };
181 };