How to replicate the spiflash sample code for external flash other than MX25R64

we are using nRF52840 

External flash is 128Mb flash.

we have tested the C:\ncs\v2.1.0\zephyr\samples\drivers\spi_flash\ on DK and it works fine.

In MAIN.C file for the following line 

flash_dev = DEVICE_DT_GET(DT_ALIAS(spi_flash0)); 
it fills flash_dev  with "mx25r6435f@0"(defined in DTS).
Our query here is how spi_flash0 is understood as  mx25r6435f@0.
Our external flash is MT25QL128ABA and it is of 128Mb.
we are using Qspi: parameter to define it.
For this same falsh when we use the same code as function in our application 
flash_dev = DEVICE_DT_GET(DT_ALIAS(spi_flash0));  is not getting success.
Can you suggest what and all the parameters we need to modify to proceed further to bring up our flash.
It is SPI flash only.