title: BBB: how to turn on Encoder and PWM devices on linux 3.14
body: <p>I've installed a new image of Ubuntu (14.04.2 LTS) on my <strong>BeagleBone Black</strong> board. I found that cape manager is not supported anymore, so </p>
  
  <pre><code>echo bone_eqep2b &gt; /sys/devices/bone_capemgr.*/slots
  </code></pre>
  
  <p>doesn't work. 
  As far as I understood to load device tree overlay I need the following:</p>
  
  <ol>
  <li>install RSCM</li>
  <li>fix <code>am335x-boneblack.dts</code> file</li>
  <li>run build.sh</li>
  <li>reboot the board</li>
  </ol>
  
  <p>So, I doubt about item 2. How to merge <code>bone_eqep2b.dts</code> and <code>am335x-boneblack.dts</code> correctly?</p>
  
  <p>I guess, to enable eqep2b I just need to change this block of code:</p>
  
  <pre><code>epwmss@48304000 {
          compatible = "ti,am33xx-pwmss";
          reg = &lt;0x48304000 0x10&gt;;
          ti,hwmods = "epwmss2";
          #address-cells = &lt;0x1&gt;;
          #size-cells = &lt;0x1&gt;;
          status = "disabled";
          ranges = &lt;0x48304100 0x48304100 0x80 0x48304180 0x48304180 0x80 0x48304200 0x4
  8304200 0x80&gt;;
  
          ecap@48304100 {
                  compatible = "ti,am33xx-ecap";
                  #pwm-cells = &lt;0x3&gt;;
                  reg = &lt;0x48304100 0x80&gt;;
                  ti,hwmods = "ecap2";
                  status = "disabled";
          };
  
          ehrpwm@48304200 {
                  compatible = "ti,am33xx-ehrpwm";
                  #pwm-cells = &lt;0x3&gt;;
                  reg = &lt;0x48304200 0x80&gt;;
                  ti,hwmods = "ehrpwm2";
                  status = "disabled";
          };
  };
  </code></pre>
  
  <p>by something like</p>
  
  <pre><code>epwmss@48304000 {
          compatible = "ti,am33xx-pwmss";
          reg = &lt;0x48304000 0x10&gt;;
          ti,hwmods = "epwmss2";
          #address-cells = &lt;0x1&gt;;
          #size-cells = &lt;0x1&gt;;
          status = "okay";
  
          count_mode = &lt;0&gt;;  /* 0 - Quadrature mode, normal 90 phase offset cha &amp; chb.  1 - Direction mode.  cha input = clock, chb input = direction */
          swap_inputs = &lt;0&gt;; /* Are channel A and channel B swapped? (0 - no, 1 - yes) */
          invert_qa = &lt;1&gt;;   /* Should we invert the channel A input?  */
          invert_qb = &lt;1&gt;;   /* Should we invert the channel B input? I invert these because my encoder outputs drive transistors that pull down the pins */
          invert_qi = &lt;0&gt;;   /* Should we invert the index input? */
          invert_qs = &lt;0&gt;;   /* Should we invert the strobe input? */
  
          status = "okay";
  
  
          ranges = &lt;0x48304100 0x48304100 0x80 0x48304180 0x48304180 0x80 0x48304200 0x4
  8304200 0x80&gt;;
  
          ecap@48304100 {
                  compatible = "ti,am33xx-ecap";
                  #pwm-cells = &lt;0x3&gt;;
                  reg = &lt;0x48304100 0x80&gt;;
                  ti,hwmods = "ecap2";
                  status = "okay";
          };
  
          ehrpwm@48304200 {
                  compatible = "ti,am33xx-ehrpwm";
                  #pwm-cells = &lt;0x3&gt;;
                  reg = &lt;0x48304200 0x80&gt;;
                  ti,hwmods = "ehrpwm2";
                  status = "okay";
          };
  };
  </code></pre>
  
  <p>Correct?</p>
  
  <p>I couldn't find a ready version, It would be great if somebody has already fixed and can share it.</p>