STM32MP15 ECO 5.0.0 OPTEE Panic set_clock_then_voltage
On STM32MP1 discrete power. 512MB DDR , TF-A & OPTEE configure in SYSRAM
E/TC:0 0 Panic at core/arch/arm/plat-stm32mp1/cpu_opp.c:106 <set_clock_then_voltage>
Log attached.
This message seems to unique for stm32mp1 in OP-TEE code. no other platform source file seems to use this message.

Looking further this cpu_opp.c file is not part of OP-TEE on github in ST's stm32mp1 , thus ST unique and added afterwards to the ECO system. Seems to be patch. So that anyone familiar, outside ST, with what this code is doing is probably zero. The source does not reveal much about what is is doing. (no comments) w/o support this may take much more time to debug.

Move the regulator part in the DT (in root USER area) after the CPU clocks. Same result. what does ST's code expect ?
Added some debug traces:
D/TC:0 0 stm32mp1_cpu_opp_get_dt_subnode:296 Found OPP 0 (650000kHz/1200mV) from DT
D/TC:0 0 stm32mp1_cpu_opp_get_dt_subnode:302 DEBUG: clk_cpu: 650000000
D/TC:0 0 stm32mp1_cpu_opp_get_dt_subnode:303 DEBUG: freq_khz: 650000
D/TC:0 0 stm32mp1_cpu_opp_get_dt_subnode:313 DEBUG: freq_khz*1000 <= clk_cpu. calling set_clock_then_voltage
D/TC:0 0 set_clock_then_voltage:101 DEBUG: opp_set_voltage 1200
D/TC:0 0 set_clock_then_voltage:108 DEBUG: current_opp = 1
D/TC:0 0 set_clock_then_voltage:109 DEBUG: Going to panic due to current_opp = cpu_opp.opp_count....
E/TC:0 0 Panic at core/arch/arm/plat-stm32mp1/cpu_opp.c:110 <set_clock_then_voltage>
E/TC:0 0 TEE load address @ 0xde000000
E/TC:0 0 Call stack:
E/TC:0 0 0xde00e703
E/TC:0 0 0xde03da89
E/TC:0 0 0xde013d3b
E/TC:0 0 0xde0142bf
E/TC:0 0 0xde014397
E/TC:0 0 0xde03c3ab
E/TC:0 0 0xde03c799
E/TC:0 0 0xde03ccc7
E/TC:0 0 0xde03f5e9
E/TC:0 0 0xde00e425
E/TC:0 0 0xde00e52b
E/TC:0 0 0xde00019c
M/TC: CPU : 0
M/TC: usr_sp : 0x50044110
M/TC: usr_lr : 0x2080a000
M/TC: irq_spsr : 0x00071500
M/TC: irq_sp : 0x9200a48a
M/TC: irq_lr : 0x08500012
M/TC: fiq_spsr : 0xa28baa02
M/TC: fiq_sp : 0x50414465
M/TC: fiq_lr : 0x80282200
M/TC: svc_spsr : 0x00514014
M/TC: svc_sp : 0x0ac00264
M/TC: svc_lr : 0x41015450
M/TC: abt_spsr : 0xa0080800
M/TC: abt_sp : 0x55145c50
M/TC: abt_lr : 0x0280a280
M/TC: und_spsr : 0x3080c400
M/TC: und_sp : 0x00a8802a
M/TC: und_lr : 0x50454511
M/TC: pmcr : 0x2020a080
A voltage check if failing: it seems OPT-EE is expecting 1.2V instead of 1.35V for core ?

