Skip to contentSkip to conversation

drivers: tee: i2c: support the NXP SE05x probe errata

PATCH In review Jorge Ramirez-Ortiz 2 participants 4 messages Aug 30, 2022 – Sep 15, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v5 1/1 drivers: tee: i2c: support the NXP SE05x probe errata

Early instantiation of this I2C device would lock up when being probed.

https://www.nxp.com/docs/en/errata/SE050_Erratasheet.pdf
3.2.2
In scenarios of detecting I2C ICs on the bus using an empty I2C frame containing only the address the SE050 will block the I2C bus.

Tested on STM32MP1

---

v5: address Kconfig issue with select (remove)
v4: address build issue when feature not enabled
v3,2,1: no changes (were part of a patchset)

 drivers/tee/optee/Kconfig | 13 ++++++++++++
 drivers/tee/optee/i2c.c   | 44 +++++++++++++++++++++++++++++++++++----
 2 files changed, 53 insertions(+), 4 deletions(-)
drivers/tee/optee/Kconfig +13 -0
index d03028070b..8b02b71be2 100644
@@ -37,6 +37,19 @@ config OPTEE_TA_SCP03
 	help
 	  Enables support for controlling (enabling, provisioning) the
 	  Secure Channel Protocol 03 operation in the OP-TEE SCP03 TA.
+
+config TEE_I2C_NXP_SE05X_ERRATA
+	bool "Enable NXP SE05X Errata"
+	default n
+	help
+	 This config prevents the I2C trampoline driver from probing
+	 on every transfer.
+
+config TEE_I2C_NXP_SE05X_ERRATA_IN_BUS
+	int "I2C bus where to apply the NXP SE05X errata"
+	depends on TEE_I2C_NXP_SE05X_ERRATA
+	default 0
+
 endmenu
 
 endif
drivers/tee/optee/i2c.c +40 -4

85 lines not on this page · raw message

Signature · 1 line
2.34.1
#1 lore raw
Quoted 9 lines · Jorge Ramirez-Ortiz

Early instantiation of this I2C device would lock up when being probed.

https://www.nxp.com/docs/en/errata/SE050_Erratasheet.pdf
3.2.2
In scenarios of detecting I2C ICs on the bus using an empty I2C frame containing only the address the SE050 will block the I2C bus.

Quoted 4 lines

Tested on STM32MP1

This fails causes failure to build on sandbox:
https://source.denx.de/u-boot/u-boot/-/jobs/496922#L51

Signature · 1 line
Tom
#2 lore raw
Quoted 11 lines · Tom Rini
Quoted 9 lines · Jorge Ramirez-Ortiz

Early instantiation of this I2C device would lock up when being probed.

https://www.nxp.com/docs/en/errata/SE050_Erratasheet.pdf
3.2.2
In scenarios of detecting I2C ICs on the bus using an empty I2C frame containing only the address the SE050 will block the I2C bus.

Quoted 7 lines
Quoted 4 lines

Tested on STM32MP1

This fails causes failure to build on sandbox:
https://source.denx.de/u-boot/u-boot/-/jobs/496922#L51

um, will send an updated patch - sorry about it.
does that sandbox uses different build flags?

Quoted 3 lines
Signature · 2 lines
-- 
Tom
#3 lore raw
Quoted 14 lines · Foundries
Quoted 13 lines · Tom Rini
Quoted 11 lines · Jorge Ramirez-Ortiz

Early instantiation of this I2C device would lock up when being probed.

https://www.nxp.com/docs/en/errata/SE050_Erratasheet.pdf
3.2.2
In scenarios of detecting I2C ICs on the bus using an empty I2C frame containing only the address the SE050 will block the I2C bus.

Tested on STM32MP1

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

This fails causes failure to build on sandbox:
https://source.denx.de/u-boot/u-boot/-/jobs/496922#L51

um, will send an updated patch - sorry about it.
does that sandbox uses different build flags?

It's normal sandbox. There's a chance I either mis-applied it (it didn't apply cleanly), or one of the few other patches I'm testing in that branch and about to push to next changed something.

Signature · 1 line
Tom