-
Notifications
You must be signed in to change notification settings - Fork 221
/
BBORG_MOTOR-00A2.dts
143 lines (125 loc) · 3.35 KB
/
BBORG_MOTOR-00A2.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
/*
* Copyright (C) 2018 Robert Nelson <robertcnelson@gmail.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/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/am33xx.h>
/ {
/*
* Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
*/
fragment@0 {
target-path="/";
__overlay__ {
chosen {
overlays {
BBORG_MOTOR-00A2 = __TIMESTAMP__;
};
};
};
};
/*
* Free up the pins used by the cape from the pinmux helpers.
*/
fragment@1 {
target = <&ocp>;
__overlay__ {
P8_13_pinmux { status = "disabled"; }; /* m3.pwm2.b */
P8_14_pinmux { status = "disabled"; }; /* m3.high */
P8_16_pinmux { status = "disabled"; }; /* m2.high */
P8_18_pinmux { status = "disabled"; }; /* m1.high */
P8_19_pinmux { status = "disabled"; }; /* m4.pwm2.a */
P8_26_pinmux { status = "disabled"; }; /* m4.high */
P9_14_pinmux { status = "disabled"; }; /* m2.pwm1.a */
P9_16_pinmux { status = "disabled"; }; /* m1.pwm1.b */
};
};
fragment@2 {
target = <&am33xx_pinmux>;
__overlay__ {
bborg_motor_led_pins: pinmux-bborg-proto-led-pins {
pinctrl-single,pins = <
AM33XX_IOPAD(0x0828, PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE7) /* P8_14: gpmc_ad10.gpio0_26 */
AM33XX_IOPAD(0x0838, PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE7) /* P8_16: gpmc_ad14.gpio1_14 */
AM33XX_IOPAD(0x088c, PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE7) /* P8_18: gpmc_clk.gpio2_1 */
AM33XX_IOPAD(0x087c, PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE7) /* P8_26: gpmc_csn0.gpio1_29 */
>;
};
bborg_motor_ehrpwm1_pins: pinmux-bborg-proto-ehrpwm1-pins {
pinctrl-single,pins = <
AM33XX_IOPAD(0x0848, PIN_OUTPUT_PULLDOWN | MUX_MODE6) /* P9_14: gpmc_a2.ehrpwm1a */
AM33XX_IOPAD(0x084c, PIN_OUTPUT_PULLDOWN | MUX_MODE6) /* P9_16: gpmc_a3.ehrpwm1b */
>;
};
bborg_motor_ehrpwm2_pins: pinmux-bborg-proto-ehrpwm2-pins {
pinctrl-single,pins = <
AM33XX_IOPAD(0x0824, PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* P8_13: gpmc_ad9.ehrpwm2b */
AM33XX_IOPAD(0x0820, PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* P8_19: gpmc_ad8.ehrpwm2a */
>;
};
};
};
fragment@3 {
target = <&epwmss1>;
__overlay__ {
status = "okay";
};
};
fragment@4 {
target = <&ehrpwm1>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&bborg_motor_ehrpwm1_pins>;
status = "okay";
};
};
fragment@5 {
target = <&epwmss2>;
__overlay__ {
status = "okay";
};
};
fragment@6 {
target = <&ehrpwm2>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&bborg_motor_ehrpwm2_pins>;
status = "okay";
};
};
fragment@7 {
target-path="/";
__overlay__ {
leds {
pinctrl-names = "default";
pinctrl-0 = <&bborg_motor_led_pins>;
compatible = "gpio-leds";
m1_high {
label = "m1_high";
gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
default-state = "off";
};
m2_high {
label = "m2_high";
gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
default-state = "off";
};
m3_high {
label = "m3_high";
gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
default-state = "off";
};
m4_high {
label = "m4_high";
gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;
default-state = "off";
};
};
};
};
};