Skip to main content
Associate
June 20, 2025
Solved

STM32mp13 Possible ways to write to RCC_SECCFGR (linux/yocto)

  • June 20, 2025
  • 1 reply
  • 276 views

Good morning,
fairly new to this mpu family, I did a bit of a research but I'd like to get pointed to the correct procedure to, for instance, change bit 31 of RCC_SECCFGR.

This register would allow me for example to modify also PWR_CR1:BDP and PWR_CR2:MONEN registers/bits by unblocking PWR registers protection.

Assuming I'm working in a yocto/meta-st environment my first thought is to patch optee-os-stm32mp to modify that register and the PWR registers too since this kind of operations usually require secure context.

Question:

- Is there any easier approach, or high level approach (eg from uboot or kernel through SCMI) ?

Thanks in advance.

 

 

This topic has been closed for replies.
Best answer by MatDeb

Well,

since i'm working with stm32mp135d, the simplest seems to patch and activate the tamper node in the optee-os device tree:

stm32mp131.dtsi:

tamp: tamp@5c00a000 {
			compatible = "st,stm32mp13-tamp";
			reg = <0x5c00a000 0x400>;
			#address-cells = <1>;
			#size-cells = <1>;
			interrupts = <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&rcc RTCAPB>;
			ranges;
			st,backup-zones = <10 5 17>;
			/* <INT_TAMPER_BKUP_DOMAIN_THRESHOLD TAMPER_CONFIRMED_MODE> */
			st,tamp-internal-tampers = <1 1>; 

 

then activate it inside stm32mp135d top level optee-os  dts file:

&tamp {
	status = "okay";		
};

 

1 reply

MatDebAuthorBest answer
Associate
June 20, 2025

Well,

since i'm working with stm32mp135d, the simplest seems to patch and activate the tamper node in the optee-os device tree:

stm32mp131.dtsi:

tamp: tamp@5c00a000 {
			compatible = "st,stm32mp13-tamp";
			reg = <0x5c00a000 0x400>;
			#address-cells = <1>;
			#size-cells = <1>;
			interrupts = <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&rcc RTCAPB>;
			ranges;
			st,backup-zones = <10 5 17>;
			/* <INT_TAMPER_BKUP_DOMAIN_THRESHOLD TAMPER_CONFIRMED_MODE> */
			st,tamp-internal-tampers = <1 1>; 

 

then activate it inside stm32mp135d top level optee-os  dts file:

&tamp {
	status = "okay";		
};