Q: How to check currently which PWM device is active and in which pwmchip on BeagleBone Black? I would like to control a servo motor using PWM. I have loaded the following .dtbo's in the slots in bone_capmgr directory as shown below:
root@beaglebone:/sys/devices/platform/bone_capemgr# cat slots
0: PF----  -1 
1: PF----  -1 
2: PF----  -1 
3: PF----  -1 
4: P-O-L-   0 Override Board Name,00A0,Override Manuf,BB-SPIDEV1
5: P-O-L-   1 Override Board Name,00A0,Override Manuf,am33xx_pwm
7: P-O-L-   2 Override Board Name,00A0,Override Manuf,bspwm_P9_22_3

For PWM, I have successfully loaded pin P9_22 configured as output with mode3 as ehrpwm0A.
Now how do I identify which pwm device is active from the four pwmchips as shown below?
root@beaglebone:/sys/class/pwm# ls
pwmchip0  pwmchip2  pwmchip4  pwmchip5  pwmchip6

I am using BeagleBone Black with the following version:
root@beaglebone:~# uname -a
Linux beaglebone 4.1.18-ti-r53 #1 SMP Thu Mar 17 19:41:05 UTC 2016 armv7l    GNU/Linux

I generated the .dts using the dts generator found HERE. Below is the .dts I used:
 /dts-v1/;
 /plugin/;

 / {
     compatible = "ti,beaglebone", "ti,beaglebone-black";

/* identification */
part-number = "BS_PWM_P9_22_0x3";

/* state the resources this cape uses */
exclusive-use =
    /* the pin header uses */
    "P9.22",
    /* the hardware IP uses */
    "ehrpwm0A";

fragment@0 {
    target = <&am33xx_pinmux>;
    __overlay__ {
        bs_pwm_P9_22_0x3: pinmux_bs_pwm_P9_22_0x3 {
            pinctrl-single,pins = <0x150 0x3>;
        };
    };
};

fragment@1 {
    target = <&ocp>;
    __overlay__ {
        bs_pwm_test_P9_22 {
            compatible  = "pwm_test";
            pwms        = <&ehrpwm0 0 500000 0>;
            pwm-names   = "PWM_P9_22";

            pinctrl-names   = "default";
            pinctrl-0   = <&bs_pwm_P9_22_0x3>;

            enabled     = <1>;
            duty        = <0>;
            status      = "okay";
        };
    };
};
};


A: I got the ehrpwm2A PWM on P8_19 working for the current 4.1 kernel. I followed the solution posted by Kevin on google groups Here. Tested and works:). Note that while compiling the .dts on 4.1 Kernel, please use the new version of dtc i.e. DTC 1.4.1. You can upgrade to the new DTC version using Robert Nelsons BB-Overlays, even this one has been explained in the thread. Also some light has been shed on how to check which pwm device is active in this thread. 
