Despite the fact ESP-201 module has D0, D1, D2, D3, CLK, CMD (GPIO6-GPIO11) pins broken out they provide interface to flash chip and cannot be used as regular GPIOs.
An attempt to assign GPIO function to any of these pins, e. g.
PIN_FUNC_SELECT(PERIPHS_IO_MUX_SD_DATA2_U, FUNC_GPIO9); // Select GPIO function for SD_DATA2
will definitely cause module hangup or reboot during the subsequent flash access.
Since it is supported by both ESP8266 and flash chip (25Q40B) the Quad I/O SPI flash interface can be downgraded to Dual I/O SPI thus freeing two data lines (SD_DATA2 and SD_DATA3) and making them available as GPIOs (GPIO9 and GPIO10, marked as D2 and D3 on ESP-201 board).