cancel
Showing results for 
Search instead for 
Did you mean: 

How to use I2C1 in TF-A to control STPMIC1?

NBhat.1
Associate III

In our custom board we are using I2C1 to control and configure STPMIC1. I'd like to use I2C1 in TF-A so PMIC can be configured to power DDR during boot. I2C1 is not supported by default in TF-A, but looks like there is a way to do it as described in

https://wiki.st.com/stm32mpu/wiki/PMIC_hardware_components#TF-A

I followed the procedure described in the above link, but still when I include the reference to &i2c1 in my stm32mp153c-<project>.dts it throws the following build error

| Building stm32mp1

| Error: fdts/stm32mp153c-<project name>.dts:355.1-6 Label or path i2c1 not found

| FATAL ERROR: Syntax error parsing input tree

Am I missing something?

Thanks,

Nikhil

12 REPLIES 12
Olivier GALLIEN
ST Employee

​Hi @TWest.2​ , @NBhat.1​ ,

Since the problem was too complex to be addressed trough community I manage to get you in direct touch with local ST people @Greg DAVIS​ .

I'm confident that this will help to get you out of the situation shortly.

No more need to udpate this post along your investigation.

Once fixed, we will share here solution for benefit of all the community

BR,

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Olivier GALLIEN
ST Employee

Hi @TWest.2​ , @NBhat.1​ ,

Thanks to local support you finally succeed to boot.

As summarize for community :

>> ERROR:  BL2: Failed to load image (-80)

Was due to missing &nvmem_layout in your board device, giving pkh_otp address to be used by TF-A.

Even if not really a bug, it has been decided to prevent this issue in next TF-A release. ( delivered in next V2.1 ecosystem release )

Note that this is not answering initial post.

Do you still target to use I2C1 instead of I2C4 ?

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

HI @Community member​ ,

We decided to use I2C4 to control PMIC.

Thanks,

Nikhil