PMW on P8.13 and P8.19 on Debian 8.1 / Linux 4.1.2-ti-r4

On a BeagleBone Black running Debian 8.1 / Linux 4.1.2-ti-r4, I’d like to be able to enable PWM on P8.13 and P8.19 using two different device tree overlays rather that a single overlay.

The two overlays currently being used are show below. If the first overlay for P8.13 is used, it will work correctly. If the second overlay for P8.19 is used, it will also work correctly. However, if both overlays are used at the same time, only the first one activated will work correctly. The second one will fail to function. I’d imagine the problem is related to fragment@2 in the overlays, but I can’t figure out what needs to be done to make it function correctly. Any help in figuring out how to solve the issue would be greatly appreciated.

Overlay for PWM on P8.13

/dts-v1/;
/plugin/;

/{
compatible = “ti,beaglebone”, “ti,beaglebone-black”;
part-number = “bot_pwm_p8_13”;
version = “00A0”;

exclusive-use =
“P8.13”,
“ehrpwm2B”;

fragment@0 {
target = <&am33xx_pinmux>;
overlay {
bot_pwm_p8_13_pins: pinmux_bot_pwm_p8_13_pins {
pinctrl-single,pins = <
0x024 0x4

;
};
};
};

fragment@1 {
target = <&epwmss2>;
overlay {
status = “okay”;
};
};

fragment@2 {
target = <&ehrpwm2>;
overlay {
pinctrl-names = “default”;
pinctrl-0 = <&bot_pwm_p8_13_pins>;
status = “okay”;
};
};
};

Overlay for PWM onP8.19

/dts-v1/;
/plugin/;

/{
compatible = “ti,beaglebone”, “ti,beaglebone-black”;
part-number = “bot_pwm_p8_19”;
version = “00A0”;

exclusive-use =
“P8.19”,
“ehrpwm2A”;

fragment@0 {
target = <&am33xx_pinmux>;
overlay {
bot_pwm_p8_19_pins: pinmux_bot_pwm_p8_19_pins {
pinctrl-single,pins = <
0x020 0x4

;
};
};
};

fragment@1 {
target = <&epwmss2>;
overlay {
status = “okay”;
};
};

fragment@2 {
target = <&ehrpwm2>;
overlay {
pinctrl-names = “default”;
pinctrl-0 = <&bot_pwm_p8_19_pins>;
status = “okay”;
};
};
};

Brian, for what purpose ? The reason why I ask is that the config-pin utility should be able to achieve the same end goal, and is a userland tool.

Unfortunately, I’m not very familiar with the tool, but at least two people on the groups here should be able to guide you in this respect.

Robert, is there a user manual for Universal IO ?

Anyway, this is the project I speak of, and it should be preinstalled on beagelboard.org debian images. https://github.com/cdsteinkuehler/beaglebone-universal-io

The readme.md is about all I know on the subject, but in a couple cases I’ve seen Robert use it wildly different from how I’ve seen it used previously. e.g. to load device tree overlays, and configure pins in a way I had not seen before.

The goal is to update a tool called bot-io to function with the 4.1 kernel. Among other things, bot-io allows pins to be configured to use drivers that beaglebone-universal-io doesn’t support like gpio-keys and gpio-leds, so beaglebone-universal-io can’t be used.