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