ramips: fix pci/pcie related dtc warnings
[openwrt/openwrt.git] / target / linux / ramips / dts / AC1200RM.dts
1 /*
2 * BSD LICENSE
3 *
4 * Copyright (C) 2018 Piotr Dymacz <pepe2k@gmail.com>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 *
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 * 3. Neither the names of the copyright holders nor the names of any
17 * contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33 /dts-v1/;
34
35 #include "mt7620a.dtsi"
36
37 #include <dt-bindings/gpio/gpio.h>
38 #include <dt-bindings/input/input.h>
39
40 / {
41 compatible = "alfa-network,ac1200rm", "ralink,mt7620a-soc";
42 model = "ALFA Network AC1200RM";
43
44 aliases {
45 led-status = &led_wps;
46 };
47
48 chosen {
49 bootargs = "console=ttyS0,115200";
50 };
51
52 gpio-keys-polled {
53 compatible = "gpio-keys-polled";
54 #address-cells = <1>;
55 #size-cells = <0>;
56 poll-interval = <20>;
57
58 reset {
59 label = "reset";
60 gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
61 linux,code = <KEY_RESTART>;
62 };
63 };
64
65 gpio-leds {
66 compatible = "gpio-leds";
67
68 wlan2g {
69 label = "ac1200rm:green:wlan2g";
70 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
71 };
72
73 led_wps: wps {
74 label = "ac1200rm:green:wps";
75 gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
76 };
77 };
78 };
79
80 &ehci {
81 status = "okay";
82 };
83
84 &ethernet {
85 mtd-mac-address = <&factory 0x28>;
86 mediatek,portmap = "llllw";
87 pinctrl-names = "default";
88 pinctrl-0 = <&ephy_pins>;
89 };
90
91 &gpio1 {
92 status = "okay";
93 };
94
95 &gpio2 {
96 status = "okay";
97 };
98
99 &gpio3 {
100 status = "okay";
101 };
102
103 &gsw {
104 mediatek,port4 = "ephy";
105 };
106
107 &ohci {
108 status = "okay";
109 };
110
111 &pcie {
112 status = "okay";
113 };
114
115 &pcie0 {
116 mt76@0,0 {
117 reg = <0x0000 0 0 0 0>;
118 mediatek,mtd-eeprom = <&factory 0x8000>;
119 ieee80211-freq-limit = <5000000 6000000>;
120
121 led {
122 led-sources = <2>;
123 led-active-low;
124 };
125 };
126 };
127
128 &pinctrl {
129 state_default: pinctrl0 {
130 gpio {
131 ralink,group = "nd_sd", "spi refclk", "wled";
132 ralink,function = "gpio";
133 };
134 };
135 };
136
137 &spi0 {
138 status = "okay";
139
140 m25p80@0 {
141 #address-cells = <1>;
142 #size-cells = <1>;
143 compatible = "jedec,spi-nor";
144 reg = <0>;
145 spi-max-frequency = <10000000>;
146
147 partition@0 {
148 label = "u-boot";
149 reg = <0x0 0x30000>;
150 read-only;
151 };
152
153 partition@30000 {
154 label = "u-boot-env";
155 reg = <0x30000 0x1000>;
156 };
157
158 partition@031000 {
159 label = "config";
160 reg = <0x31000 0xf000>;
161 read-only;
162 };
163
164 factory: partition@40000 {
165 label = "factory";
166 reg = <0x40000 0x10000>;
167 read-only;
168 };
169
170 partition@50000 {
171 label = "firmware";
172 reg = <0x50000 0xfb0000>;
173 };
174 };
175 };
176
177 &wmac {
178 ralink,mtd-eeprom = <&factory 0>;
179 };