forked from jadonk/cape-firmware
-
Notifications
You must be signed in to change notification settings - Fork 27
/
BB-GPIOHELP-00A0.dts
66 lines (58 loc) · 1.42 KB
/
BB-GPIOHELP-00A0.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
/*
* Copyright (C) 2013 Pantelis Antoniou <panto@antoniou-consulting.com>
*
* 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-GPIOHELP";
version = "00A0";
/* state the resources this cape uses */
exclusive-use =
/* the pin header uses */
"P9.27", /* gpio */
"P9.28", /* gpio */
/* the hardware IP uses */
"gpio3_19", "gpio3_17";
fragment@0 {
target = <&am33xx_pinmux>;
__overlay__ {
gpio_helper_pins: pinmux_gpio_helper_pins {
pinctrl-single,pins = <
0x1a4 0x0f /* P9 27 GPIO3_19: mcasp0_fsr.gpio3_19 | MODE7 | OUTPUT */
0x19c 0x2f /* P9 28 SPI1_CS0: mcasp0_ahclkr.gpio3_17 | MODE7 | INPUT */
>;
};
};
};
fragment@2 {
target = <&ocp>;
__overlay__ {
gpio_helper {
compatible = "gpio-of-helper";
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&gpio_helper_pins>;
/* declare your gpios */
test_led {
gpio-name = "test_led";
gpio = <&gpio4 19 0x00>; /* gpio4 is gpio3 */
output;
init-high;
};
test_input {
gpio-name = "test_input";
gpio = <&gpio4 17 0x00>; /* gpio4 is gpio3 */
input;
count-rising-edge;
count-falling-edge;
};
};
};
};
};