forked from jadonk/cape-firmware
-
Notifications
You must be signed in to change notification settings - Fork 27
/
BB-BONE-BACONE-00A0.dts
169 lines (147 loc) · 3.45 KB
/
BB-BONE-BACONE-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
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
/*
* Copyright (C) 2013 Circuit Co.
*
* 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-BACONE";
/* state the resources this cape uses */
exclusive-use =
/* the pin header uses */
"P9.36", /* AIN5 */
"P8.19", /* gpio-keys: gpio0_23 */
"P9.14", /* pwm: ehrpwm1A */
"P9.16", /* pwm: ehrpwm1B */
"P9.42", /* pwm: eCAP0_in_PWM0_out */
"P9.17", /* shift: gpio0_5 LATCH */
"P9.18", /* shift: gpio0_4 SERIAL */
"P9.22", /* shift: gpio0_2 CLOCK */
/* the hardware IP uses */
"tscadc",
"gpio0_23",
"ehrpwm1A",
"ehrpwm1B",
"eCAP0_in_PWM0_out",
"gpio0_5",
"gpio0_4",
"gpio0_2";
fragment@0 {
target = <&am33xx_pinmux>;
__overlay__ {
bacon_ehrpwm1_pins: pinmux_bacon_ehrpwm1_pins {
pinctrl-single,pins = <
0x048 0x6 /* P9_14 (ZCZ ball U14) | MODE 6 */
0x04c 0x6 /* P9_16 (ZCZ ball T14) | MODE 6 */
>;
};
bacon_ecap0_pins: pinmux_bacon_ecap0_pins {
pinctrl-single,pins = <
0x164 0x0 /* P9_42 (ZCZ ball C18) | MODE 0 */
>;
};
bacon_gpiohelp_pins: pinmux_bacon_gpio_helper_pins {
pinctrl-single,pins = <
0x020 0x2f /* gpmc_ad8.gpio0_22, INPUT | PULLDIS | MODE7 */
0x15c 0x0f /* P9 17 spi0_cs0.gpio0_5 | MODE7 | OUTPUT */
0x158 0x0f /* P9 18 spi0_d1.gpio0_4 | MODE7 | OUTPUT */
0x150 0x0f /* P9 22 spi0_sclk.gpio0_2 | MODE7 | OUTPUT */
>;
};
};
};
fragment@1 {
target = <&ocp>;
__overlay__ {
/* avoid stupid warning */
#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 = <0 1 2 3 4 5 6 7>; /* 8 channels (but only #5 is used) */
};
};
bacon_adc_helper {
compatible = "bone-iio-helper";
vsense-name = "AIN0", "AIN1", "AIN2", "AIN3", "AIN4", "AIN5", "AIN6", "AIN7";
/* report micro-volts */
vsense-scale = <100000 100000 100000 100000 100000 100000 100000 100000>;
status = "okay";
};
};
};
fragment@3 {
target = <&epwmss0>;
__overlay__ {
status = "okay";
};
};
fragment@4 {
target = <&ecap0>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&bacon_ecap0_pins>;
status = "okay";
};
};
fragment@5 {
target = <&epwmss1>;
__overlay__ {
status = "okay";
};
};
fragment@6 {
target = <&ehrpwm1>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&bacon_ehrpwm1_pins>;
status = "okay";
};
};
fragment@8 {
target = <&ocp>;
__overlay__ {
bacon_gpiohelp {
compatible = "gpio-of-helper";
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&bacon_gpiohelp_pins>;
/* declare your gpios */
LATCH {
gpio-name = "LATCH";
gpio = <&gpio1 5 0x00>; /* gpio1 is gpio0 */
output;
init-high;
};
SERIAL {
gpio-name = "SERIAL";
gpio = <&gpio1 4 0x00>; /* gpio1 is gpio0 */
output;
init-low;
};
CLOCK {
gpio-name = "CLOCK";
gpio = <&gpio1 2 0x00>; /* gpio1 is gpio0 */
output;
init-low;
};
BUTTON {
gpio-name = "BUTTON";
gpio = <&gpio1 22 0x01>; /* gpio1 is gpio0 */
input;
};
};
};
};
};