Skip to content

Commit

Permalink
updated bone bus PWM DT overlays
Browse files Browse the repository at this point in the history
  • Loading branch information
lorforlinux committed Jul 22, 2020
1 parent b9f4928 commit 56fb13e
Show file tree
Hide file tree
Showing 3 changed files with 138 additions and 0 deletions.
45 changes: 45 additions & 0 deletions src/arm/BONE-PWM0.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Copyright (C) 2020 Deepak Khatri <[email protected]>
*
* Virtual cape for /dev/pwm/ehrpwm0a & /dev/pwm/ehrpwm0a (only on BBBWL/BBB)
*
* 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-PWM0 = __TIMESTAMP__;
};
};

/*
* Update the default pinmux of the pins.
* See these files for the phandles (&P9_* & &P8_*)
* https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/am335x-bone-common-univ.dtsi
* https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/am572x-bone-common-univ.dtsi
*/
&ocp {
P9_22_pinmux { pinctrl-0 = <&P9_22_pwm_pin>; }; /* PWM A */
P9_21_pinmux { pinctrl-0 = <&P9_21_pwm_pin>; }; /* PWM B */
};

/*
* See these files for the phandles (&bone_*) and other bone bus nodes
* https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbai-bone-buses.dtsi
* https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbb-bone-buses.dtsi
*/
&bone_pwmss_0 {
status = "okay";
};

&bone_pwm_0 {
status = "okay";
};
47 changes: 47 additions & 0 deletions src/arm/BONE-PWM1.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* Copyright (C) 2020 Deepak Khatri <[email protected]>
*
* Virtual cape for
* BBBWL/BBB: /dev/bone/ehrpwm1a & /dev/bone/ehrpwm1b
* BBAI: /dev/bone/ehrpwm2a & /dev/bone/ehrpwm2b
*
* 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-PWM1 = __TIMESTAMP__;
};
};

/*
* Update the default pinmux of the pins.
* See these files for the phandles (&P9_* & &P8_*)
* https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/am335x-bone-common-univ.dtsi
* https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/am572x-bone-common-univ.dtsi
*/
&ocp {
P9_14_pinmux { pinctrl-0 = <&P9_14_pwm_pin>; }; /* PWM A */
P9_16_pinmux { pinctrl-0 = <&P9_16_pwm_pin>; }; /* PWM B */
};

/*
* See these files for the phandles (&bone_*) and other bone bus nodes
* https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbai-bone-buses.dtsi
* https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbb-bone-buses.dtsi
*/
&bone_pwmss_1 {
status = "okay";
};

&bone_pwm_1 {
status = "okay";
};
46 changes: 46 additions & 0 deletions src/arm/BONE-PWM2.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Copyright (C) 2020 Deepak Khatri <[email protected]>
*
* Virtual cape for
* BBBWL/BBB: /dev/bone/ehrpwm2a & /dev/bone/ehrpwm2b
* BBAI: /dev/bone/ehrpwm1a & /dev/bone/ehrpwm1b
*
* 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-PWM2 = __TIMESTAMP__;
};
};
/*
* Update the default pinmux of the pins.
* See these files for the phandles (&P9_* & &P8_*)
* https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/am335x-bone-common-univ.dtsi
* https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/am572x-bone-common-univ.dtsi
*/
&ocp {
P8_19_pinmux { pinctrl-0 = <&P8_19_pwm_pin>; }; /* PWM A */
P8_13_pinmux { pinctrl-0 = <&P8_13_pwm_pin>; }; /* PWM B */
};

/*
* See these files for the phandles (&bone_*) and other bone bus nodes
* https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbai-bone-buses.dtsi
* https://github.com/beagleboard/BeagleBoard-DeviceTrees/src/arm/bbb-bone-buses.dtsi
*/
&bone_pwmss_2 {
status = "okay";
};

&bone_pwm_2 {
status = "okay";
};

0 comments on commit 56fb13e

Please sign in to comment.