5f97eb61b1ce0ef2862ead4ea63dbc4618dcf8d4
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7620a_hnet_c108.dts
1 // SPDX-License-Identifier: BSD-3-Clause
2 /*
3 * Copyright(c) 2017 Kristian Evensen <kristian.evensen@gmail.com>.
4 * All rights reserved.
5 */
6
7 #include "mt7620a.dtsi"
8
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/input/input.h>
11
12 / {
13 compatible = "hnet,c108", "ralink,mt7620a-soc";
14 model = "HNET C108";
15
16 aliases {
17 led-boot = &led_lan_green;
18 led-failsafe = &led_lan_green;
19 led-running = &led_lan_green;
20 led-upgrade = &led_lan_green;
21 };
22
23 chosen {
24 bootargs = "console=ttyS0,115200";
25 };
26
27 gpio-export {
28 compatible = "gpio-export";
29 #size-cells = <0>;
30
31 power_modem {
32 gpio-export,name = "power_modem";
33 gpio-export,output = <1>;
34 gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
35 };
36 };
37
38 leds {
39 compatible = "gpio-leds";
40
41 sdcard {
42 label = "green:sdcard";
43 gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
44 };
45
46 modem_green {
47 label = "green:modem";
48 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
49 };
50
51 modem_red {
52 label = "red:modem";
53 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
54 };
55
56 lan_red {
57 label = "red:lan";
58 gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
59 };
60
61 led_lan_green: lan_green {
62 label = "green:lan";
63 gpios = <&gpio2 4 GPIO_ACTIVE_HIGH>;
64 };
65 };
66
67 keys {
68 compatible = "gpio-keys";
69
70 reset {
71 label = "reset";
72 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
73 linux,code = <KEY_RESTART>;
74 };
75 };
76 };
77
78 &gpio1 {
79 status = "okay";
80 };
81
82 &gpio2 {
83 status = "okay";
84 };
85
86 &spi0 {
87 status = "okay";
88
89 flash@0 {
90 compatible = "jedec,spi-nor";
91 reg = <0>;
92 spi-max-frequency = <10000000>;
93
94 partitions {
95 compatible = "fixed-partitions";
96 #address-cells = <1>;
97 #size-cells = <1>;
98
99 partition@0 {
100 label = "u-boot";
101 reg = <0x0 0x30000>;
102 read-only;
103 };
104
105 partition@30000 {
106 label = "u-boot-env";
107 reg = <0x30000 0x10000>;
108 read-only;
109 };
110
111 factory: partition@40000 {
112 compatible = "nvmem-cells";
113 label = "factory";
114 reg = <0x40000 0x10000>;
115 #address-cells = <1>;
116 #size-cells = <1>;
117 read-only;
118
119 eeprom_factory_0: eeprom@0 {
120 reg = <0x0 0x200>;
121 };
122
123 macaddr_factory_28: macaddr@28 {
124 reg = <0x28 0x6>;
125 };
126 };
127
128 partition@50000 {
129 compatible = "denx,uimage";
130 label = "firmware";
131 reg = <0x50000 0xfb0000>;
132 };
133 };
134 };
135 };
136
137 &sdhci {
138 status = "okay";
139 };
140
141 &ehci {
142 status = "okay";
143 };
144
145 &ohci {
146 status = "okay";
147 };
148
149 &ethernet {
150 nvmem-cells = <&macaddr_factory_28>;
151 nvmem-cell-names = "mac-address";
152 };
153
154 &wmac {
155 nvmem-cells = <&eeprom_factory_0>;
156 nvmem-cell-names = "eeprom";
157 };
158
159 &state_default {
160 default {
161 groups = "i2c", "uartf", "spi refclk", "ephy";
162 function = "gpio";
163 };
164 };
165
166 &pcie {
167 status = "okay";
168 };