1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
|
// SPDX-License-Identifier: GPL-2.0-or-later
#include "ar9344.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "mikrotik,routerboard-912uag-2hpnd", "qca,ar9342";
model = "MikroTik RouterBOARD 912UAG-2HPnD";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
gpio_latch: gpio_latch {
compatible = "gpio-latch";
gpio-controller;
#gpio-cells = <2>;
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>,
<&gpio 1 GPIO_ACTIVE_HIGH>,
<&gpio 2 GPIO_ACTIVE_HIGH>,
<&gpio 3 GPIO_ACTIVE_HIGH>,
<0>, /* Not connected */
<&gpio 13 GPIO_ACTIVE_HIGH>,
<&gpio 14 GPIO_ACTIVE_HIGH>,
<&gpio 15 GPIO_ACTIVE_HIGH>,
<&gpio 11 GPIO_ACTIVE_LOW>; /* Latch Enable */
};
nand_gpio {
compatible = "mikrotik,rb91x-nand";
gpios = <&gpio_latch 3 GPIO_ACTIVE_HIGH>, /* Read */
<&gpio 4 GPIO_ACTIVE_HIGH>, /* Ready (RDY) */
<&gpio_latch 5 GPIO_ACTIVE_LOW>, /* Chip Enable (nCE) */
<&gpio_latch 6 GPIO_ACTIVE_HIGH>, /* Command Latch Enable (CLE) */
<&gpio_latch 7 GPIO_ACTIVE_HIGH>, /* Address Latch Enable (ALE) */
<&gpio 12 GPIO_ACTIVE_LOW>, /* Read/Write Enable (nRW) */
<&gpio_latch 8 GPIO_ACTIVE_LOW>; /* Latch Enable (nLE) */
partitions {
compatible = "fixed-partitions";
#size-cells = <1>;
partition@0 {
label = "booter";
reg = <0x0 0x0040000>;
read-only;
};
partition@40000 {
label = "kernel";
reg = <0x0040000 0x03c0000>;
};
partition@400000 {
label = "ubi";
reg = <0x0400000 0x7c00000>;
};
};
};
leds {
compatible = "gpio-leds";
led_power: power {
label = "green:power";
gpios = <&gpio_latch 1 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
user {
label = "green:user";
gpios = <&gpio_latch 2 GPIO_ACTIVE_HIGH>;
};
led1 {
label = "green:led1";
gpios = <&ssr 0 GPIO_ACTIVE_HIGH>;
};
led2 {
label = "green:led2";
gpios = <&ssr 1 GPIO_ACTIVE_HIGH>;
};
led3 {
label = "green:led3";
gpios = <&ssr 2 GPIO_ACTIVE_HIGH>;
};
led4 {
label = "green:led4";
gpios = <&ssr 3 GPIO_ACTIVE_HIGH>;
};
led5 {
label = "green:led5";
gpios = <&ssr 4 GPIO_ACTIVE_HIGH>;
};
};
gpio-export {
compatible = "gpio-export";
beeper {
gpio-export,name = "beeper";
gpio-export,output = <1>; /* Must be 1 to avoid EMI induced clicking noise */
gpios = <&ssr 5 GPIO_ACTIVE_HIGH>;
};
usb_power {
gpio-export,name = "power-usb";
gpio-export,output = <1>;
gpios = <&ssr 6 GPIO_ACTIVE_HIGH>;
};
pcie_power {
gpio-export,name = "power-pcie";
gpio-export,output = <0>;
gpios = <&ssr 7 GPIO_ACTIVE_HIGH>;
};
};
};
&spi {
status = "okay";
compatible = "qca,ar7100-spi";
cs-gpios = <0>, <&gpio_latch 0 GPIO_ACTIVE_LOW>;
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
partitions {
compatible = "mikrotik,routerboot-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "routerboot";
reg = <0x0 0x0>;
read-only;
};
hard_config: hard_config {
read-only;
};
bios {
size = <0x1000>;
read-only;
};
soft_config {
};
};
};
ssr: ssr@1 {
compatible = "fairchild,74hc595";
gpio-controller;
#gpio-cells = <2>;
registers-number = <1>;
reg = <1>;
spi-max-frequency = <50000000>;
};
};
&mdio0 {
status = "okay";
phy-mask = <0>;
phy0: ethernet-phy@0 {
reg = <0>;
};
};
ð0 {
status = "okay";
phy-mode = "rgmii-id";
phy-handle = <&phy0>;
pll-data = <0x02000000 0x00000101 0x00001313>;
gmac-config {
device = <&gmac>;
rgmii-gmac0 = <1>;
rgmii-enabled = <1>;
rxd-delay = <1>;
txd-delay = <1>;
};
};
&wmac {
status = "okay";
qca,no-eeprom;
};
&pcie {
status = "okay";
};
&usb {
status = "okay";
};
&usb_phy {
status = "okay";
};
|