cancel
Showing results for 
Search instead for 
Did you mean: 

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

MatDeb
Associate

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.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
MatDeb
Associate

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";		
};

 

View solution in original post

1 REPLY 1
MatDeb
Associate

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";		
};