Hi
Yes, this is the way to configure:
For compatibility between B (C) and D device types I would use the following settings
AT45DB011B #define SPI_FLASH_PAGE_LENGTH 264 / #define SPI_FLASH_PAGES 512
AT45DB021B #define SPI_FLASH_PAGE_LENGTH 264 / #define SPI_FLASH_PAGES 1024
AT45DB041B/D #define SPI_FLASH_PAGE_LENGTH 264 / #define SPI_FLASH_PAGES 2048
AT45DB081B #define SPI_FLASH_PAGE_LENGTH 264 / #define SPI_FLASH_PAGES 4096
AT45DB161D #define SPI_FLASH_PAGE_LENGTH 528 / #define SPI_FLASH_PAGES 4096
AT45DB321C/D #define SPI_FLASH_PAGE_LENGTH 528 / #define SPI_FLASH_PAGES 8192
AT45DB641D #define SPI_FLASH_PAGE_LENGTH 1056 / #define SPI_FLASH_PAGES 8192
The D type devices support extra commands, but also legacy ones to ensure compatibility. They can also be programmed (but not unprogrammed!) to support power-of-two page lengths (256 rather than 264, 512 rather than 528 etc.) but these haven't been used to ensure that all types are interchangeable.
Regards
Mark