I would like to enable Spread Spectrum following this guide:
My understanding is that I have to patch a board_parameter(board_param_t param) function in a board.c file, but I can not find this file in yocto. I have been looking in the linux-toradex code
git clone git://git.toradex.com/linux-toradex.git --branch toradex_4.14-2.0.x-imx
but the files
$ find . -name board.c
./arch/mips/loongson32/ls1c/board.c
./arch/mips/loongson32/ls1b/board.c
./arch/mips/pnx833x/stb22x/board.c
./arch/mips/ath25/board.c
./arch/mips/bcm47xx/board.c
./drivers/staging/board/board.c
do not seem to be the correct ones and the firmware folder is empty except for a makefile. Can someone point me to the correct files/recipes in yocto?
Dear @bdecker
This board.c is part of the SCU. You can find the SCU here:
We normally don’t modify the SCU firmware but here some documentation about how to build the final images:
Regards,
Stefan
Hi @benbrenson
I’m not sure what you mean. The board.c file is this:
/*
** ###################################################################
**
** Copyright (c) 2016 Freescale Semiconductor, Inc.
** Copyright 2017-2022 NXP
** Copyright 2017-2022 Toradex
**
** Redistribution and use in source and binary forms, with or without modification,
** are permitted provided that the following conditions are met:
**
** o Redistributions of source code must retain the above copyright notice, this list
** of conditions and the following disclaimer.
**
** o Redistributions in binary form must reproduce the above copyright notice, this
** list of conditions and the following disclaimer in the documentation and/or
** other materials provided with the distribution.
**
** o Neither the name of the copyright holder nor the names of its
** contributors may be used to endorse or promote products derived from this
** software without specific prior written permission.
This file has been truncated. show original
You need to edit line 411 and 414 according to the NXP document. After that you just need to rebuild it.
Regards,
Stefan
Hi @benbrenson
Unfortunately it’s a bit obfuscated. This article here worked for me with the newest SCFW sources (L4.14.98_2.3.2_SCFWKIT-1.3.2). At least it compiled. You need to use the gcc recommended in the article (ggcc-none-eabi):
Regards,
Stefan
Hi Stefan,
thanks for your reply.
Maybe I got something completely wrong. I’m going to explain my steps a bit further:
First off all I fetched your Version of the scfw from GitHub - toradex/i.MX-System-Controller-Firmware
And then I tried to compile it:
cd imx8-toradex-scufw/src/scfw_export_mx8qm_b0
make qm R=B0 B=apalis
But then I got a lot of “No such file or directory” errors.
So I downloaded the official scfw porting kit from NXP and copied your Repository into it:
imx8-toradex-scufw/src/scfw_export_mx8qm_b0/platform/board/mx8qm_apalis → scfw_porting_kit_1_2_2/src/scfw_export_mx8qm_b0/platform/board/mx8qm_apalis
imx8-toradex-scufw/src/scfw_export_mx8qm_b0/Makefile → scfw_porting_kit_1_2_2/src/scfw_export_mx8qm_b0/Makefile
After this I tried again to compile the scfw but get the following errors:
Generating platform/board/mx8qm_apalis/dcd/imx8_ramid1_dcd_1.6GHz.h
Generating platform/board/mx8qm_apalis/dcd/imx8_ramid2_dcd_1.6GHz.h
Generating platform/board/mx8qm_apalis/dcd/imx8_ramid1_dcd_1.6GHz_retention.h
Generating platform/board/mx8qm_apalis/dcd/imx8_ramid2_dcd_1.6GHz_retention.h
Compiling platform/drivers/pmic/fsl_pmic.c
Compiling platform/drivers/pmic/pf8100/fsl_pf8100.c
Compiling platform/board/mx8qm_apalis/board.c
platform/board/mx8qm_apalis/board.c:64:10: fatal error: drivers/rgpio/fsl_rgpio.h: No such file or directory
64 | #include “drivers/rgpio/fsl_rgpio.h”
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Makefile:461: recipe for target ‘build_mx8qm_b0/board/mx8qm_apalis/board.o’ failed
make: *** [build_mx8qm_b0/board/mx8qm_apalis/board.o] Error 1
So I make something completely wrong here.
Regards,
Benedikt
Hi Stefan,
I’ve taken a look into i.MX-System-Controller-Firmware/src/scfw_export_mx8qm_b0/platform/board/mx8qm_apalis at master · toradex/i.MX-System-Controller-Firmware · GitHub
The repository doesn’t provide any further source files required for building the scufw.
It seems that only toradex specific files and binaries can be found there.
I’m now not sure against which version of the NXP SCFW porting kit it is compiled.
I need to modify the board.c in order to activate the spread spectrum feature.
This guide User Guide of Spread Spectrum Support for i.MX 8Qu... - NXP Community mentioned that it should be possible to activate the feature since SCFW porting kit V1.2.2.
Regards,
Benedikt
Hi @stefan_e.tx ,
thank you very much for link to the article. After following those steps everything worked for me!
But, it only worked for the newest Kit (SCFWKIT-1.3.2)!
The SCFW Kit L4.14.98_2.0.1_SCFWKIT-1.2.5 described in the article didn’t work for me.
Regards,
Benedikt
Perfect, tanks for the feedback! I internally sent a request that we change the version found on the page.