forked from beagleboard/bb.org-overlays
/
BONE-TIMER_PWM_2.dts
45 lines (41 loc) · 1.39 KB
/
BONE-TIMER_PWM_2.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
/*
* Copyright (C) 2020 Deepak Khatri <deepaklorkhatri7@gmail.com>
*
* Virtual cape for /sys/devices/platform/bone_timer_pwm_2/
*
* 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/;
/*
* Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
*/
&{/chosen} {
overlays {
BONE-TIMER_PWM_2 = __TIMESTAMP__;
};
};
/*
* Update the default pinmux of the pins.
* See these files for the phandles (&P9_* & &P8_*)
* https://github.com/lorforlinux/BeagleBoard-DeviceTrees/blob/compatibility/src/arm/am335x-bone-common-univ.dtsi
* https://github.com/lorforlinux/BeagleBoard-DeviceTrees/blob/compatibility/src/arm/am572x-bone-common-univ.dtsi
*/
&ocp {
P8_08_pinmux { pinctrl-0 = <&P8_08_timer_pin>; }; /* PWM A */
};
// See these files for the definition
// https://github.com/lorforlinux/BeagleBoard-DeviceTrees/blob/compatibility/src/arm/bbai-bone-buses.dtsi
// https://github.com/lorforlinux/BeagleBoard-DeviceTrees/blob/compatibility/src/arm/bbb-bone-buses.dtsi
&{/} {
bone_timer_pwm_2 {
compatible = "ti,omap-dmtimer-pwm";
#pwm-cells = <3>;
ti,timers = <&bone_timer_2>;
//ti,prescaler = <0>; /* 0 thru 7 */
ti,clock-source = <0x00>; /* timer_sys_ck */
//ti,clock-source = <0x01>; /* timer_32k_ck */
};
};