Hello Alexey Ermakov,
You cannot change the device tree from one to another once the device tree has been loaded. However, you may change the registers that setup the muxing alternatives directly while the system is running.
On using the pad as an analog switch that would not be feasible due to the way the pads work. You can see more details on how the pads work on the product documentation, but the muxing options have also limitations on whether pins can be input/output or may also be fixed.
My apologies for the inconvenience!
Regards,