ramips: fix dtc warnings
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / AWUSFREE1.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 "mt7628an.dtsi"
36
37 #include <dt-bindings/gpio/gpio.h>
38 #include <dt-bindings/input/input.h>
39
40 / {
41 compatible = "alfa-network,awusfree1", "mediatek,mt7628an-soc";
42 model = "ALFA Network AWUSFREE1";
43
44 aliases {
45 led-status = &led_system;
46 };
47
48 chosen {
49 bootargs = "console=ttyS0,115200";
50 };
51
52 gpio-keys-polled {
53 compatible = "gpio-keys-polled";
54 poll-interval = <20>;
55
56 reset {
57 label = "reset";
58 gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
59 linux,code = <KEY_RESTART>;
60 };
61 };
62
63 gpio-leds {
64 compatible = "gpio-leds";
65
66 led_system: system {
67 label = "awusfree1:orange:system";
68 gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
69 };
70
71 wlan {
72 label = "awusfree1:blue:wlan";
73 gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
74 };
75 };
76
77 memory@0 {
78 device_type = "memory";
79 reg = <0x0 0x4000000>;
80 };
81 };
82
83 &ehci {
84 status = "disabled";
85 };
86
87 &esw {
88 mediatek,portdisable = <0x1e>;
89 };
90
91 &ethernet {
92 mtd-mac-address = <&factory 0x2e>;
93 };
94
95 &gpio1 {
96 status = "okay";
97 };
98
99 &ohci {
100 status = "disabled";
101 };
102
103 &pinctrl {
104 state_default: pinctrl0 {
105 gpio {
106 ralink,group = "p0led_an", "wdt", "wled_an";
107 ralink,function = "gpio";
108 };
109
110 ext_lna {
111 ralink,group = "uart1";
112 ralink,function = "sw_r";
113 };
114
115 ext_pa {
116 ralink,group = "i2s";
117 ralink,function = "antenna";
118 };
119 };
120 };
121
122 &spi0 {
123 status = "okay";
124
125 m25p80@0 {
126 #address-cells = <1>;
127 #size-cells = <1>;
128 compatible = "jedec,spi-nor";
129 reg = <0>;
130 spi-max-frequency = <10000000>;
131 m25p,chunked-io = <32>;
132
133 partition@0 {
134 label = "u-boot";
135 reg = <0x0 0x30000>;
136 read-only;
137 };
138
139 partition@30000 {
140 label = "u-boot-env";
141 reg = <0x30000 0x1000>;
142 };
143
144 partition@31000 {
145 label = "config";
146 reg = <0x31000 0xf000>;
147 read-only;
148 };
149
150 factory: partition@40000 {
151 label = "factory";
152 reg = <0x40000 0x10000>;
153 read-only;
154 };
155
156 partition@50000 {
157 label = "firmware";
158 reg = <0x50000 0x7b0000>;
159 };
160 };
161 };
162
163 &wmac {
164 status = "okay";
165 mediatek,mtd-eeprom = <&factory 0x0>;
166 };