title: PWM chip to pin mapping on BeagleBone Black (v4.14)
body: <p>There is very little information how to configure the Beaglebone for PWM on newer versions of the kernel. I followed the instructions from <a href="https://stackoverflow.com/questions/50203064/pwm-on-beaglebone-black-v4-14">PWM on BeagleBone Black (v4.14)</a> to interface with the PWM chips, but now I need to figure out the pin that each chip is connected to.</p>
  
  <p>Based on the Cape Expansion Headers image in the <a href="http://beagleboard.org/support/bone101" rel="nofollow noreferrer">BeagleBone Black documentation</a>, I know:</p>
  
  <ul>
  <li><code>EHRPWM0A</code> = <code>P9_22</code></li>
  <li><code>EHRPWM0B</code> = <code>P9_21</code></li>
  <li><code>EHRPWM1A</code> = <code>P9_14</code></li>
  <li><code>EHRPWM1B</code> = <code>P9_16</code></li>
  <li><code>EHRPWM2A</code> = <code>P8_19</code></li>
  <li><code>EHRPWM2B</code> = <code>P8_13</code></li>
  <li><code>ECAP0</code>    = <code>P9_42</code></li>
  </ul>
  
  <p>When I run <code>ls -lh /sys/class/pwm</code> to see the available PWM interfaces I see:</p>
  
  <pre><code>lrwxrwxrwx 1 root pwm 0 May  6 14:31 pwmchip0 -&gt; ../../devices/platform/ocp/48300000.epwmss/48300100.ecap/pwm/pwmchip0
  lrwxrwxrwx 1 root pwm 0 May  6 14:31 pwmchip1 -&gt; ../../devices/platform/ocp/48300000.epwmss/48300200.pwm/pwm/pwmchip1
  lrwxrwxrwx 1 root pwm 0 May  6 14:31 pwmchip3 -&gt; ../../devices/platform/ocp/48302000.epwmss/48302200.pwm/pwm/pwmchip3
  lrwxrwxrwx 1 root pwm 0 May  6 14:31 pwmchip5 -&gt; ../../devices/platform/ocp/48304000.epwmss/48304100.ecap/pwm/pwmchip5
  lrwxrwxrwx 1 root pwm 0 May  6 14:31 pwmchip6 -&gt; ../../devices/platform/ocp/48304000.epwmss/48304200.pwm/pwm/pwmchip6
  </code></pre>
  
  <p>When I compare this to the <a href="https://github.com/beagleboard/bb.org-overlays/blob/master/examples/cape-unversal-pwm.txt" rel="nofollow noreferrer">BeagleBone PWM example</a>, I see that the available chips and adresses are different. The example does mention that the PWMs can change, so I need to figure out the new mapping.</p>
  
  <p><strong>How do I determine the PWM chip to pin mapping?</strong> I am using a TI AM335x BeagleBone Black Wireless running kernel version 4.14.37-ti-r46.</p>