diff options
| author | Tom Rini <[email protected]> | 2024-03-30 21:17:51 -0400 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-03-30 21:17:51 -0400 |
| commit | 27795dd717dadc73091e1b4d6c50952b93aaa819 (patch) | |
| tree | 6759c2a0d5551248ec41c2b71c5edc5b165a1c66 /drivers | |
| parent | 6e2228fb052b68c84688d5baff06e2ebc787a4a5 (diff) | |
| parent | f21b3e2cd954634d405fb522198d099879f3f1e7 (diff) | |
Merge tag 'u-boot-imx-next-20240330' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/20128
- Allow accessing job-rings from non-TrustZone on colibri-imx7.
- Add support for reading XEA hardware revision.
- Convert imx8mq/8mm/8mn/8mp-evk to OF_UPSTREAM.
- Add TMP support on imx8m*-venice-gw72xx.
- Miscellaneous fixes and improvements.
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/crypto/fsl/Kconfig | 6 | ||||
| -rw-r--r-- | drivers/crypto/fsl/jr.c | 19 | ||||
| -rw-r--r-- | drivers/crypto/fsl/jr.h | 2 | ||||
| -rw-r--r-- | drivers/net/fec_mxc.c | 2 | ||||
| -rw-r--r-- | drivers/thermal/imx_tmu.c | 3 |
5 files changed, 31 insertions, 1 deletions
diff --git a/drivers/crypto/fsl/Kconfig b/drivers/crypto/fsl/Kconfig index eaad19633f1..294e1c8a44e 100644 --- a/drivers/crypto/fsl/Kconfig +++ b/drivers/crypto/fsl/Kconfig @@ -62,6 +62,12 @@ config SYS_FSL_SEC_LE if FSL_CAAM +config FSL_CAAM_JR_NTZ_ACCESS + bool "Give CAAM Job Ring access to non-secure world" + help + It is needed when OP-TEE is not used and Freescale CAAM Job Ring linux + driver is used. + config FSL_CAAM_RNG bool "Enable Random Number Generator support" depends on DM_RNG diff --git a/drivers/crypto/fsl/jr.c b/drivers/crypto/fsl/jr.c index ceb66dd6270..203f1625215 100644 --- a/drivers/crypto/fsl/jr.c +++ b/drivers/crypto/fsl/jr.c @@ -673,6 +673,21 @@ static int rng_init(uint8_t sec_idx, ccsr_sec_t *sec) return ret; } +#if CONFIG_IS_ENABLED(FSL_CAAM_JR_NTZ_ACCESS) +static void jr_setown_non_trusted(ccsr_sec_t *sec) +{ + u32 jrown_ns; + int i; + + /* Set ownership of job rings to non-TrustZone mode */ + for (i = 0; i < ARRAY_SIZE(sec->jrliodnr); i++) { + jrown_ns = sec_in32(&sec->jrliodnr[i].ms); + jrown_ns |= JROWN_NS | JRMID_NS; + sec_out32(&sec->jrliodnr[i].ms, jrown_ns); + } +} +#endif + int sec_init_idx(uint8_t sec_idx) { int ret = 0; @@ -761,6 +776,10 @@ int sec_init_idx(uint8_t sec_idx) #if CONFIG_IS_ENABLED(OF_CONTROL) init: #endif +#if CONFIG_IS_ENABLED(FSL_CAAM_JR_NTZ_ACCESS) + jr_setown_non_trusted(sec); +#endif + ret = jr_init(sec_idx, caam); if (ret < 0) { printf("SEC%u: initialization failed\n", sec_idx); diff --git a/drivers/crypto/fsl/jr.h b/drivers/crypto/fsl/jr.h index 4e4c4af5805..b136cd8d05a 100644 --- a/drivers/crypto/fsl/jr.h +++ b/drivers/crypto/fsl/jr.h @@ -37,6 +37,8 @@ #define JRNSLIODN_MASK 0x0fff0000 #define JRSLIODN_SHIFT 0 #define JRSLIODN_MASK 0x00000fff +#define JROWN_NS 0x00000008 +#define JRMID_NS 0x00000001 #define JRDID_MS_PRIM_DID BIT(0) #define JRDID_MS_PRIM_TZ BIT(4) diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index ac937676f9c..90af18f80a8 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -1310,7 +1310,7 @@ static int fecmxc_probe(struct udevice *dev) #ifdef CONFIG_DM_REGULATOR if (priv->phy_supply) { - ret = regulator_set_enable(priv->phy_supply, true); + ret = regulator_set_enable_if_allowed(priv->phy_supply, true); if (ret) { printf("%s: Error enabling phy supply\n", dev->name); return ret; diff --git a/drivers/thermal/imx_tmu.c b/drivers/thermal/imx_tmu.c index c7fe0f07a60..ea6c8329c0a 100644 --- a/drivers/thermal/imx_tmu.c +++ b/drivers/thermal/imx_tmu.c @@ -402,6 +402,7 @@ static inline void imx_tmu_mx8mp_init(struct udevice *dev) { } #endif static inline void imx_tmu_mx93_init(struct udevice *dev) { } +static inline void imx_tmu_mx8mq_init(struct udevice *dev) { } static void imx_tmu_arch_init(struct udevice *dev) { @@ -411,6 +412,8 @@ static void imx_tmu_arch_init(struct udevice *dev) imx_tmu_mx8mp_init(dev); else if (is_imx93()) imx_tmu_mx93_init(dev); + else if (is_imx8mq()) + imx_tmu_mx8mq_init(dev); else dev_err(dev, "Unsupported SoC, TMU calibration not loaded!\n"); } |
