ramips: move dts-v1 statement to top-level DTSI files
[openwrt/staging/dedeckeh.git] / target / linux / ramips / dts / mt7620a_hnet_c108.dts
1 /*
2 * BSD LICENSE
3 *
4 * Copyright(c) 2017 Kristian Evensen <kristian.evensen@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 * * Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * * Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in
15 * the documentation and/or other materials provided with the
16 * distribution.
17 * * Neither the name of Broadcom Corporation nor the names of its
18 * contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 */
33
34 #include "mt7620a.dtsi"
35
36 #include <dt-bindings/gpio/gpio.h>
37 #include <dt-bindings/input/input.h>
38
39 / {
40 compatible = "hnet,c108", "ralink,mt7620a-soc";
41 model = "HNET C108";
42
43 aliases {
44 led-boot = &led_lan_green;
45 led-failsafe = &led_lan_green;
46 led-running = &led_lan_green;
47 led-upgrade = &led_lan_green;
48 };
49
50 chosen {
51 bootargs = "console=ttyS0,115200";
52 };
53
54 gpio-export {
55 compatible = "gpio-export";
56 #size-cells = <0>;
57
58 power_modem {
59 gpio-export,name = "power_modem";
60 gpio-export,output = <1>;
61 gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
62 };
63 };
64
65 leds {
66 compatible = "gpio-leds";
67
68 sdcard {
69 label = "c108:green:sdcard";
70 gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
71 };
72
73 modem_green {
74 label = "c108:green:modem";
75 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
76 };
77
78 modem_red {
79 label = "c108:red:modem";
80 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
81 };
82
83 lan_red {
84 label = "c108:red:lan";
85 gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
86 };
87
88 led_lan_green: lan_green {
89 label = "c108:green:lan";
90 gpios = <&gpio2 4 GPIO_ACTIVE_HIGH>;
91 };
92 };
93
94 keys {
95 compatible = "gpio-keys";
96
97 reset {
98 label = "reset";
99 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
100 linux,code = <KEY_RESTART>;
101 };
102 };
103 };
104
105 &gpio1 {
106 status = "okay";
107 };
108
109 &gpio2 {
110 status = "okay";
111 };
112
113 &spi0 {
114 status = "okay";
115
116 flash@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 0x10000>;
135 read-only;
136 };
137
138 factory: partition@40000 {
139 label = "factory";
140 reg = <0x40000 0x10000>;
141 read-only;
142 };
143
144 partition@50000 {
145 compatible = "denx,uimage";
146 label = "firmware";
147 reg = <0x50000 0xfb0000>;
148 };
149 };
150 };
151 };
152
153 &sdhci {
154 status = "okay";
155 };
156
157 &ehci {
158 status = "okay";
159 };
160
161 &ohci {
162 status = "okay";
163 };
164
165 &ethernet {
166 mtd-mac-address = <&factory 0x28>;
167 };
168
169 &wmac {
170 ralink,mtd-eeprom = <&factory 0x0>;
171 };
172
173 &state_default {
174 default {
175 groups = "i2c", "uartf", "spi refclk", "ephy";
176 function = "gpio";
177 };
178 };
179
180 &pcie {
181 status = "okay";
182 };