forked from jadonk/cape-firmware
-
Notifications
You must be signed in to change notification settings - Fork 27
/
BB-BONE-REPLICAP-00A4.dts
288 lines (271 loc) · 7.26 KB
/
BB-BONE-REPLICAP-00A4.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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
/*
* Copyright (C) 2013 Intelligent Agent AS <elias@iagent.no>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
/dts-v1/;
/plugin/;
/ {
compatible = "ti,beaglebone", "ti,beaglebone-black";
/* identification */
part-number = "BB-BONE-REPLICAP";
version = "00A4";
/* state the resources this cape uses */
exclusive-use =
/* the pin header P8 uses */
"P8.8", /* FAULT_EXT_2 */
"P8.9", /* FAULT_Y */
"P8.10", /* FAULT_X */
"P8.11", /* STEP_EXT_2 */
"P8.12", /* STEP_Y */
"P8.13", /* STEP_Z */
"P8.14", /* DIR_Z */
"P8.15", /* DIR_EXT_1 */
"P8.16", /* DIR_EXT_2 */
"P8.17", /* STEP_X */
"P8.18", /* FAULT_EXT_1 */
"P8.19", /* DIR_Y */
"P8.26", /* DIR_X */
/* the pin header P9 uses */
"P9.11", /* END_STOP_X2 */
"P9.12", /* STEP_EXT_1 */
"P9.13", /* END_STOP_Z1 */
"P9.16", /* END_STOP_Y2 */
"P9.18", /* END_STOP_Z2 */
"P9.22", /* Dallas 1W */
"P9.23", /* END_STOP_Y1 */
"P9.24", /* FAULT_Z */
"P9.25", /* END_STOP_X1 */
"P9.28", /* SPI1_CS0 */
"P9.29", /* SPI1_MISO */
"P9.30", /* SPI1_MOSI */
"P9.31", /* SPI1_SCLK */
"P9.33", /* AIN4 */
"P9.35", /* AIN6 */
"P9.36", /* AIN5 */
"P9.42"; /* SPI1_CS1 */
fragment@0 {
target = <&am33xx_pinmux>;
__overlay__ {
bone_replicape_spi1_pins: pinmux_replicape_spi1_pins {
pinctrl-single,pins = <
0x190 0x13 /* P9_31 = mcasp0_aclkx.spi1_sclk , OUTPUT_PULLUP | MODE3 */
0x194 0x33 /* P9_29 = mcasp0_fsx.spi1_d0 , INPUT_PULLUP | MODE3 */
0x198 0x13 /* P9_30 = mcasp0_axr0.spi1_d1 , OUTPUT_PULLUP | MODE3 */
0x19c 0x13 /* P9_28 = mcasp0_ahclkr.spi1_cs0 , OUTPUT_PULLUP | MODE3 */
0x164 0x12 /* P9_42 = GPIO0_7 = eCAP0_in_PWM0_out.gpio0[7] , OUTPUT_PULLUP | MODE2 */
>;
};
pruicss_stepper_pins: pinmux_pruicss_stepper_pins{
pinctrl-single,pins = <
0x038 0x07 // P8_16 (3) = DIR_EXT_2 = GPIO1_14
0x03C 0x07 // P8_15 (4) = DIR_EXT_1 = GPIO1_15
0x028 0x07 // P8_14 (5) = DIR_Z = GPIO0_26
0x02C 0x07 // P8_17 (6) = STEP_X = GPIO0_27
0x034 0x07 // P8_11 (22) = step_ext_2 = GPIO1_13
0x030 0x07 // P8_12 (23) = Step_y = GPIO1_12
0x024 0x07 // P8_13 (24) = Step_z = GPIO0_23
0x020 0x07 // P8_19 (25) = Dir_y = GPIO0_22
0x07C 0x07 // P8_26 = Dir_x = GPIO1_29
0x078 0x07 // P9_12 = step ext 1 = GPIO1_28
>;
};
stepper_fault_pins: pinmux_stepper_fault_pins{
pinctrl-single,pins = <
0x094 0x37 // P8_8 = Fault Ext 2 = GPIO2_3 gpmc_oen_ren.gpio2[3]
0x09C 0x37 // P8_9 = FAYLT Y = GPIO2_5
0x098 0x37 // P8_10 = FAULT X = GPIO2_4 gpmc_wen.gpio2[4]
0x08C 0x37 // P8_18 = Fault_ext 1 = GPIO2_1
0x184 0x37 // P9_24 = Fault Z = GPIO0_15
>;
};
end_stop_pins: pinmux_end_stop_pins{
pinctrl-single,pins = <
0x1AC 0x37 // P9_25 = End stop X1 = GPIO3_21
0x070 0x37 // P9_11 = End stop X2 = GPIO0_30
0x044 0x37 // P9_23 = End stop Y1 = GPIO1_17
0x04C 0x37 // P9_16 = End stop Y2 = GPIO1_19
0x074 0x37 // P9_13 = End stop Z1 = GPIO0_31
0x158 0x37 // P9_18 = End stop Z2 = GPIO0_4
>;
};
dallas_w1_pins: pinmux_dallas_w1_pins {
pinctrl-single,pins = <
0x150 0x37 // Dallas 1W
>;
};
};
};
fragment@1 {
target = <&spi1>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&bone_replicape_spi1_pins>;
cs-gpios = <&gpio4 17 0>, <&gpio1 7 0>;
stepper_control{
#address-cells = <1>;
#size-cells = <0>;
compatible = "spidev";
reg = <0>;
spi-max-frequency = <16000000>;
spi-cpha; // Stepper control has mode 1 (CPOL = 0, CPHA = 1)
};
stepper_current{
#address-cells = <1>;
#size-cells = <0>;
compatible = "spidev";
reg = <1>;
spi-max-frequency = <16000000>;
// Stepper current has mode 0 (CPOL = 0, CPHA = 0)
};
};
};
fragment@2{
target = <&pruss>;
__overlay__{
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pruicss_stepper_pins>;
stepper_x{
pin-names = "Replic:pru-step_x", "Replic:pru-dir_x";
gpios = <&gpio1 27 0
&gpio2 29 0>;
};
stepper_y{
pin-names = "Replic:pru-step_y", "Replic:pru-dir_y";
gpios =<&gpio2 12 0
&gpio1 22 0>;
};
stepper_z{
pin-names = "Replic:pru-step_z", "Replic:pru-dir_z";
gpios = <&gpio1 23 0
&gpio1 26 0>;
};
stepper_ext_1{
pin-names = "Replic:pru-step_ext_1", "Replic:pru-dir_ext_1";
gpios = <&gpio2 28 0
&gpio2 15 0>;
};
stepper_ext_2{
pin-names = "Replic:pru-step_ext_2", "Replic:pru-dir_ext_2";
gpios = <&gpio2 13 0
&gpio2 14 0>;
};
};
};
fragment@3 {
target = <&ocp>;
__overlay__ {
#address-cells = <1>;
#size-cells = <1>;
tscadc {
compatible = "ti,ti-tscadc";
reg = <0x44e0d000 0x1000>;
interrupt-parent = <&intc>;
interrupts = <16>;
ti,hwmods = "adc_tsc";
status = "okay";
adc {
ti,adc-channels = <4 5 6 7>;
};
};
gpio_keys {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&end_stop_pins>;
pinctrl-1 = <&stepper_fault_pins>;
#address-cells = <1>;
#size-cells = <0>;
switch_x1 {
label = "End-stop-X1";
debounce_interval = <50>;
linux,code = <112>;
gpios = <&gpio4 21 0x5>;
gpio-key,wakeup;
};
switch_x2 {
label = "End-stop-X2";
debounce_interval = <50>;
linux,code = <113>;
gpios = <&gpio1 30 0x5>;
gpio-key,wakeup;
};
switch_y1 {
label = "End-stop-Y1";
debounce_interval = <50>;
linux,code = <114>;
gpios = <&gpio2 17 0x5>;
gpio-key,wakeup;
};
switch_y2 {
label = "End-stop-Y2";
debounce_interval = <50>;
linux,code = <115>;
gpios = <&gpio2 19 0x5>;
gpio-key,wakeup;
};
switch_z1 {
label = "End-stop-Z1";
debounce_interval = <50>;
linux,code = <116>;
gpios = <&gpio1 31 0x5>;
gpio-key,wakeup;
};
switch_z2 {
label = "End-stop-Z2";
debounce_interval = <50>;
linux,code = <117>;
gpios = <&gpio1 4 0x5>;
gpio-key,wakeup;
};
fault_x {
label = "Fault-X";
debounce_interval = <50>;
linux,code = <90>;
gpios = <&gpio3 4 0x5>;
gpio-key,wakeup;
};
fault_y {
label = "Fault-Y";
debounce_interval = <50>;
linux,code = <91>;
gpios = <&gpio3 5 0x5>;
gpio-key,wakeup;
};
fault_z {
label = "Fault-Z";
debounce_interval = <50>;
linux,code = <92>;
gpios = <&gpio1 15 0x5>;
gpio-key,wakeup;
};
fault_ext_1 {
label = "Fault-Ext-1";
debounce_interval = <50>;
linux,code = <93>;
gpios = <&gpio3 1 0x5>;
gpio-key,wakeup;
};
fault_ext_2 {
label = "Fault-Ext-2";
debounce_interval = <50>;
linux,code = <94>;
gpios = <&gpio3 3 0x5>;
gpio-key,wakeup;
};
};
onewire@0 {
compatible = "w1-gpio";
pinctrl-names = "default";
pinctrl-0 = <&dallas_w1_pins>;
status = "okay";
gpios = <&gpio1 2 0>;
};
};
};
};