AnsweredAssumed Answered

Spread Spectrum Enable in plug in with secure boot

Question asked by Asma Alekar on Jan 22, 2020
Latest reply on Jan 27, 2020 by Asma Alekar

Hello Everyone,

 

I am trying to enable Spread Spectrum in our board which is running uboot version: U-Boot 2018.03-00038-g34c3d6bfa9-dirty and kernel version: 4.19.35-04790-ga5119fdf76b3-dirty also I am using OPTEE revision 3.2 (062c5f78).

 

i have made following changes to enable SS:

1.Set CONFIG_USE_IMXIMG_PLUGIN=y in our defconfig


2. added plugin.s file as we did not use before(contents of plugin.s), following document enable the spread spectrum 

.macro imx6ul_ddr3_arm2_setting
ldr r0, =CCM_BASE_ADDR
ldr r1, [r0,#0x18]
ldr r3, [r0,#0x18]
/* set periph_clik2_sel to select OSC_CLK */
and r1, r1, #0xffffcfff
orr r1, r1, #0x00001000
str r1, [r0,#0x18]
/* set periph_clk_set to switch to OSC_CLK */
ldr r1, [r0,#0x14]
ldr r2, [r0,#0x14]
orr r1, r1, #0x02000000
str r1, [r0,#0x14]
/* power down PLL2 */
ldr r0, =0x020c8000
ldr r1, [r0,#0x30]
orr r1, r1, #0x00010000
str r1, [r0,#0x30]
/* enable spread spectrum & configure */
ldr r1, =0x00001770
str r1, [r0,#0x60]
ldr r1, =0x05dc8006
str r1, [r0,#0x40]

ldr r1, [r0,#0x30]
and r1, r1, #0xFFFEFFFF
str r1, [r0,#0x30]
/* need delay short time before switch PLL2 it back */
ldr r4, =0x0
pu_delay:
add r4, r4, #0x1
cmp r4, #0x200000
bne pu_delay
/* recovery the previous PLL source setting */
ldr r0, =CCM_BASE_ADDR
str r2, [r0,#0x14]
str r3, [r0,#0x18]
.endm

 

macro imx6_ddr_setting
#if defined (CONFIG_TARGET_MX6UL)
imx6ul_ddr3_arm2_setting
#else
#error "SOC not configured"
#endif
.endm

 

/* include the common plugin code here */
#include <asm/arch/mx6_plugin.S>

 

when I compile uboot its giving me following error:

AS board/freescale/mx6ul/plugin.o
arm-poky-linux-gnueabi-objcopy -O binary --gap-fill 0xff board/freescale/mx6ul/plugin.o board/freescale/mx6ul/plugin.bin
MKIMAGE u-boot-dtb.imx
Error: Header v2: SECURE_BOOT is only supported in DCD mode!arch/arm/mach-imx/Makefile:144: recipe for target 'u-boot-dtb.imx' failed
make[1]: *** [u-boot-dtb.imx] Error 1
Makefile:912: recipe for target 'u-boot-dtb.imx' failed
make: *** [u-boot-dtb.imx] Error 2
/home/asmas/imx-dev/cst-dev/sign
/home/asmas/imx-dev/cst-dev/sign/uboot-qt850 has invalid IVT (self)
cp: cannot stat '/home/asmas/imx-dev/cst-dev/sign/uboot-qt850.hab': No such file or directory

 

My question is:

1.Is it possible to use SECURE_BOOT and Spread spectrum plugin together?

2. If SECURE_BOOT and plug in cannot be used together, what is the other method to enable spread spectrum?

 

Thanks in advance for any help.

 

Regards,

Asma

Outcomes