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