mx6: peripheral clock from oscillator
Subsystems (3)
PATCH v2 1/1 mx6: peripheral clock from oscillator
In order to be able to run the I2C bus at 400Khz, the chip errata[1] recommends that the peripheral clock runs out of the 24MHz oscillator.
Systems running I2C from OP-TEE before Linux executes - for example to access a Secure Element [2] providing the cryptographic support - expect this clock to be configured by the bootloader [3].
[1] IMX6SLCE Rev. 5, 02/2019, ERR007805.
[2] OP-TEE: support for NXP SE05X Plug and Trust (patch on the list).
[3] OP-TEE: check the imx_i2c.c driver (imx6 patch on the list).
--- arch/arm/mach-imx/mx6/soc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/arm/mach-imx/mx6/soc.c +4 -1
@@ -26,6 +26,9 @@#include <imx_thermal.h> #include <mmc.h> +#define has_err007805 () \ + (is_mx6sl() || is_mx6dl() || is_mx6solo() || is_mx6ull()) +struct scu_regs {u32 ctrl;u32 config;
@@ -469,7 +472,7 @@ int arch_cpu_init(void) }/* Set perclk to source from OSC 24MHz */ -if (is_mx6sl ()) +if (has_err007805 ())setbits_le32 (&ccm->cscmr1,MXC_CCM_CSCMR1_PER_CLK_SEL_MASK );imx_wdog_disable_powerdown ();/* Disable PDE bit of WMCR register */
Signature · 1 line
2.17.1
Fabio Estevam
reviewerPATCH v2 1/1 mx6: peripheral clock from oscillator
Quoted 8 lines · Jorge Ramirez-Ortiz
In order to be able to run the I2C bus at 400Khz, the chip errata[1] recommends that the peripheral clock runs out of the 24MHz oscillator.
Systems running I2C from OP-TEE before Linux executes - for example to access a Secure Element [2] providing the cryptographic support - expect this clock to be configured by the bootloader [3].
Quoted 5 lines
[1] IMX6SLCE Rev. 5, 02/2019, ERR007805.
[2] OP-TEE: support for NXP SE05X Plug and Trust (patch on the list).
[3] OP-TEE: check theimx_i2c.cdriver (imx6 patch on the list).Signed-off-by Jorge Ramirez-Ortiz <[email protected]>
PATCH v2 1/1 mx6: peripheral clock from oscillator
In reply to Jorge Ramirez-OrtizQuoted 10 lines
In order to be able to run the I2C bus at 400Khz, the chip errata[1] recommends that the peripheral clock runs out of the 24MHz oscillator. Systems running I2C from OP-TEE before Linux executes - for example to access a Secure Element [2] providing the cryptographic support - expect this clock to be configured by the bootloader [3].
[1] IMX6SLCE Rev. 5, 02/2019, ERR007805.
[2] OP-TEE: support for NXP SE05X Plug and Trust (patch on the list).
[3] OP-TEE: check theimx_i2c.cdriver (imx6 patch on the list).Signed-off-by Jorge Ramirez-Ortiz <[email protected]>Reviewed-by Fabio Estevam <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================