HI Alexander,
Setup in Low power modes depends on DVFS and DPTC drivers. The device tree shows how they are modified, however, when you are moving into low power modes the DVFS basically is the one handling the Clock to perform a change in the frequency when the voltage decreases.
CCM_REF_EN_B signal is controlled by software (manually) via CCM_CLPCR[dis_ref_osc] bit,
in case when an external oscillator is applied, assuming on-chip oscillator (CCM_CLPCR[SBYOS])
functionality is bypassed. If on-chip oscillator is used instead of the external one, CCM_REF_EN_B
behavior is described in CCM_CLPCR [SBYOS] field description.
Regards