forked from jadonk/cape-firmware
-
Notifications
You must be signed in to change notification settings - Fork 27
/
cape-bone-geiger-00A0.dts
133 lines (109 loc) · 2.84 KB
/
cape-bone-geiger-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
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
/*
* Copyright (C) 2012 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-BONE-GEIGER";
version = "00A0";
/* state the resources this cape uses */
exclusive-use =
/* the pin header uses */
"P8.29", /* led: gpio2_23 */
"P8.30", /* led: gpio2_25 */
"P9.14", /* geiger: ehrpwm1A */
"P9.28", /* geiger: gpio3_17 */
"P9.36", /* geiger: AIN5 */
/* the hardware IP uses */
"gpio2_23",
"gpio2_25",
"gpio3_17",
"ehrpwm1A",
"tscadc";
fragment@0 {
target = <&am33xx_pinmux>;
__overlay__ {
bone_geiger_cape_led_pins: pinmux_bone_geiger_cape_led_pins {
pinctrl-single,pins = <
0xe4 0x07 /* lcd_hsync.gpio2_23, OUTPUT | MODE7 */
0xec 0x07 /* lcd_ac_bias_en.gpio2_25, OUTPUT | MODE7 */
>;
};
bone_geiger_cape_pins: pinmux_bone_geiger_cape_pins {
pinctrl-single,pins = <
0x48 0x06 /* gpmc_a2.ehrpwm1a, OMAP_MUX_MODE6 | AM33XX_PIN_OUTPUT */
/* 0x19c 0x34 */ /* mcasp0_ahclkr.eCAP2_in_PWM2_out, OMAP_MUX_MODE4 | INPUT_PULLUP */
0x19c 0x37 /* mcasp0_ahclkr.gpio3_17, OMAP_MUX_MODE7 | INPUT_PULLUP */
>;
};
};
};
fragment@1 {
target = <&epwmss1>;
__overlay__ {
status = "okay";
};
};
fragment@2 {
target = <&ehrpwm1>;
__overlay__ {
status = "okay";
};
};
fragment@3 {
target = <&ocp>;
__overlay__ {
/* avoid stupid warning */
#address-cells = <1>;
#size-cells = <1>;
gpio-leds-cape-geiger {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&bone_geiger_cape_led_pins>;
geiger-led0 {
label = "geiger:green:usr0";
gpios = <&gpio3 23 0>;
linux,default-trigger = "geiger-run";
default-state = "off";
};
geiger-led1 {
label = "geiger:red:usr1";
gpios = <&gpio3 25 0>;
linux,default-trigger = "geiger-event";
default-state = "off";
};
};
tscadc {
compatible = "ti,ti-tscadc";
reg = <0x44e0d000 0x1000>;
interrupt-parent = <&intc>;
interrupts = <16>;
ti,hwmods = "adc_tsc";
status = "okay";
adc {
ti,adc-channels = <0 1 2 3 4 5 6 7>;
};
};
bone-cape-geiger {
compatible = "bone-cape-geiger";
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&bone_geiger_cape_pins>;
pwms = <&ehrpwm1 0 500000 0>;
pwm-names = "bone-geiger-cape";
pwm-frequency = <20000>; /* 20KHz */
pwm-duty-cycle = <60>; /* 60% */
event-blink-delay = <30>; /* 30ms */
gpios = <&gpio4 17 0>; /* pulse */
vsense-name = "AIN5"; /* analog vsense */
vsense-scale = <37325>; /* scaling */
};
};
};
};