title: Linux: device tree to acpi driver
body: <p>I need help on this, my driver already work on device tree mode, and I want support acpi mode for it, I'm stuck on create partitions:</p>
  
  <p>Device Tree:</p>
  
  <pre><code>&amp;spi0 {
  status = "ok";
  
  flash: n25q256a@0 {
  status = "ok";
  cell-index = &lt;0&gt;;
  #address-cells = &lt;1&gt;;
  #size-cells = &lt;1&gt;;
      compatible = "n25q256a";
      reg = &lt;0&gt;;
      spi-max-frequency = &lt;15000000&gt;;
      spi-cpha;
      spi-cpol;
  
      partition@0x00000000 {
          label = "Boot loader";
          reg = &lt;0x00000000 0x01000000&gt;;
      };
      partition@0x01000000 {
              label = "n25q256a-test";
              reg = &lt;0x01000000 0x01000000&gt;;
      };
      partition@0x01100000 {
              label = "n25q256a-data";
              reg = &lt;0x01100000 0x00f00000&gt;;
      };
    };
  };
  </code></pre>
  
  <p>Below is acpi table:</p>
  
  <pre><code>        Device (N25P){      
              Name (_ADR, 1)
              Name (_CID, "N25Q256A")
              Name (_CRS, ResourceTemplate (){
                  SPISerialBus(
                      0,          //Slave select CS0 (_ADR)
                      PolarityLow,        //Polarity of CS0 output(_DPL)
                      FourWireMode,       //(_MOD)
                      8,          //8-bit frame(_LEN)
                      ControllerInitiated,    //(_SLV)
                      15000000,       //Speed Hz (_SPE)
                      ClockPolarityHigh,  //(_POL)
                      ClockPhaseSecond,   //(_PHA)
                      "\\_SB.AHBC.SPI0",          //Controller
                  )
  
              })
          //============ Partitons =========
          }
  </code></pre>