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