Hello Maduranga,
Welcome to the Forum!
The best place to start with Bluetooth would be the www.bluetooth.org. There are two parts to the Core Bluetooth v4.0 Specs. This forum is specific to the Low Energy or BLE. Should you wish to continue with BLE on the CC2540\CC2541, I suggest you read the following post: http://e2e.ti.com/support/low_power_rf/f/538/p/259987/909317.aspx#909317
BLE only supports piconets as briefly described here: http://e2e.ti.com/support/low_power_rf/f/538/p/260425/910723.aspx.
Role change from master to slave is possible through code. You can visit the BLE-wiki to see how to dynamically switch between master and slave.
For a scatternet, you would want the standard Bluetooth and there is a Bluetooth Applications forum for that. You can further reference the following post: http://e2e.ti.com/support/low_power_rf/f/538/t/136805.aspx
There is however a device, the CC2564 that combines both (dual mode) BLE and EDR so there may be some back and forth between forums if you choose this device. It is not an SoC, a MCU of your choice can be used to interface with it. The search option in both forums should provide you with a quick answer to many of the questions you may have regarding both devices..
Thanks,