forked from torvalds/linux
/
revpi-connect-overlay.dts
238 lines (217 loc) · 4.98 KB
/
revpi-connect-overlay.dts
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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
/*
* Device tree overlay for Revolution Pi by KUNBUS
*
* RevPi Connect
*/
/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/bcm2835.h>
/{
compatible = "brcm,bcm2837";
fragment@0 {
target-path = "/";
__overlay__ {
compatible = "kunbus,revpi-connect", "brcm,bcm2837",
"brcm,bcm2836";
/*
The reset of the KSZ8851 used for the pibridge has a
circuit, which keeps it pulled for up to 80ms. To
workaroud this issue, a regulator is used. The
circuit implements a reset instead of a n_reset.
*/
pb_rst: regulator_pbrst {
compatible = "regulator-fixed";
regulator-name = "pb_rst";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&gpio 40 GPIO_ACTIVE_LOW>;
startup-delay-us = <80000>;
};
leds {
compatible = "gpio-leds";
power_red {
gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "power_red";
};
a1_green {
gpios = <&gpio 30 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "a1_green";
};
a1_red {
gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "a1_red";
};
a2_green {
gpios = <&gpio 32 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "a2_green";
};
a2_red {
gpios = <&gpio 33 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "a2_red";
};
a3_green {
gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "a3_green";
};
a3_red {
gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "a3_red";
};
act {
status = "disabled";
};
};
};
};
fragment@1 {
target = <&gpio>;
__overlay__ {
spi0_pins {
/* miso mosi clock */
brcm,pins = <37 38 39>;
brcm,function = <BCM2835_FSEL_ALT0>;
brcm,pull = <BCM2835_PUD_OFF>;
};
spi0_cs_pins {
brcm,pins = <36 35>;
brcm,function = <BCM2835_FSEL_GPIO_OUT>;
brcm,pull = <BCM2835_PUD_OFF>;
};
eth2_int_pins {
brcm,pins = <8>;
brcm,function = <BCM2835_FSEL_GPIO_IN>;
brcm,pull = <BCM2835_PUD_OFF>;
};
eth2_reset_pins {
brcm,pins = <40>;
brcm,function = <BCM2835_FSEL_GPIO_OUT>;
brcm,pull = <BCM2835_PUD_OFF>;
};
conbridge_int_pins {
brcm,pins = <28>;
brcm,function = <BCM2835_FSEL_GPIO_IN>;
brcm,pull = <BCM2835_PUD_OFF>;
};
i2c1 {
/* sda scl */
brcm,pins = <44 45>;
brcm,function = <BCM2835_FSEL_ALT2>;
brcm,pull = <BCM2835_PUD_OFF>;
};
rs485_pins: rs485_pins {
/* tx rx rts term */
brcm,pins = <14 15 17 41>;
brcm,function = <BCM2835_FSEL_ALT0
BCM2835_FSEL_ALT0
BCM2835_FSEL_ALT3
BCM2835_FSEL_GPIO_OUT>;
brcm,pull = <BCM2835_PUD_DOWN
BCM2835_PUD_DOWN
BCM2835_PUD_DOWN
BCM2835_PUD_UP>;
};
};
};
fragment@2 {
target = <&i2c1>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
rtc@51 {
compatible = "nxp,pcf2129";
reg = <0x51>;
status = "okay";
};
crypto@60 {
compatible = "atmel,atecc508a";
reg = <0x60>;
status = "okay";
};
};
};
fragment@3 {
target = <&spidev1>;
__overlay__ {
status = "disabled";
};
};
fragment@4 {
target = <&spi0>;
__overlay__ {
cs-gpios = <&gpio 36 GPIO_ACTIVE_LOW>,
<&gpio 35 GPIO_ACTIVE_LOW>;
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
pileft: ethernet@1 {
/* PiBridge Ethernet left */
compatible = "micrel,ks8851";
reg = <1>;
spi-max-frequency = <10000000>; /* <= 40 MHz */
interrupt-parent = <&gpio>;
#interrupt-cells = <2>;
interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
vdd-supply = <&pb_rst>;
status = "okay";
};
};
};
fragment@5 {
target = <&usb>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
hub@1 {
/* SMSC LAN9514 */
compatible = "usb424,9514";
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;
eth0: ethernet@1 {
compatible = "usb424,ec00";
reg = <1>;
};
hub@5 {
/* SMSC LAN9512 */
compatible = "usb424,9512";
reg = <5>;
#address-cells = <1>;
#size-cells = <0>;
eth1: ethernet@1 {
compatible = "usb424,ec00";
reg = <1>;
};
uart@2 {
/* FTDI FT232R (front) */
compatible = "usb403,6001";
reg = <2>;
};
uart@3 {
/* FTDI FT232R (conbridge) */
compatible = "usb403,6001";
reg = <3>;
};
};
};
};
};
fragment@6 {
target = <&uart0>;
__overlay__ {
linux,rs485-enabled-at-boot-time;
pinctrl-names = "default";
pinctrl-0 = <&rs485_pins>;
};
};
__overrides__ {
eth0_mac_hi = <ð0>,"local-mac-address:0";
eth0_mac_lo = <ð0>,"local-mac-address;4";
eth1_mac_hi = <ð1>,"local-mac-address:0";
eth1_mac_lo = <ð1>,"local-mac-address;4";
pileft_mac_hi = <&pileft>,"local-mac-address:0";
pileft_mac_lo = <&pileft>,"local-mac-address;4";
};
};