Our custom hardware design uses a PF8100 PMIC with the output from LDO3 driving other parts of the system. LDO3 is disabled in the OTP fuses, but we would like to enable LDO3 at 3.3V from u-boot.
The SDA and SCL on the PF8100 are connected to PMIC_I2C_SDA and PMIC_I2C_SCL on the i.MX8.
I think I know what needs to happen on the i2c between the i.MX8 and the PMIC by reading this data sheet:
https://www.nxp.com/docs/en/data-sheet/PF8100_PF8200.pdf
However I'm not sure how to use the pmic_i2c from the i.MX8.
Is there a u-boot device driver we could use to enable the PMIC through the u-boot device tree?
If not, how do I access the pmic_i2c in the i.MX8 to communicate with the PMIC?
已解决! 转到解答。
Hi Robert
>At this point I think I'm curious to know if that "dynamic_pmic_set_voltage" command is available from the client >side of the IPC in u-boot?
seems if necessary these functions can be added to "scfw_export_uboot" included in scfw kit.
>If so, does example code exist that I can look at to get a better understanding of how to
>use the client side IPC from u-boot?
one can look for example "SC_PM_PW_MODE_ON" usage (it is described in sc_fw_api_qx_b0.pdf) in
cpu.c\imx8\mach-imx\arm\arch - uboot-imx - i.MX U-Boot
Best regards
igor
Hi Robert
one can look at uboot example :
imx8qxp_arm2.c\imx8qxp_arm2\freescale\board - uboot-imx - i.MX U-Boot
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thanks for your quick reply.
There doesn't seem to be anything in that source file that talks directly to the PMIC over the PMIC_I2C interface from the i.MX8. I do see some code that uses an i2c to enable the FEC by enabling an output pin on a port expander, but that i2c is one of the standard i.MX8 i2c peripherals.
After more close research, I think my problem is related to this thread IMX8 PMIC, where you suggested using the API "dynamic_pmic_set_voltage" in the SCFW porting-kit.
At this point I think I'm curious to know if that "dynamic_pmic_set_voltage" command is available from the client side of the IPC in u-boot?
If so, does example code exist that I can look at to get a better understanding of how to use the client side IPC from u-boot?
Hi Robert
>At this point I think I'm curious to know if that "dynamic_pmic_set_voltage" command is available from the client >side of the IPC in u-boot?
seems if necessary these functions can be added to "scfw_export_uboot" included in scfw kit.
>If so, does example code exist that I can look at to get a better understanding of how to
>use the client side IPC from u-boot?
one can look for example "SC_PM_PW_MODE_ON" usage (it is described in sc_fw_api_qx_b0.pdf) in
cpu.c\imx8\mach-imx\arm\arch - uboot-imx - i.MX U-Boot
Best regards
igor
Hi Igor,
I think you are right in that the IPC doesn't currently support enabling/disabling/setting particular regulator voltage on the PMIC. It seems like the IPC generally provides hooks to higher level functionality like setting run modes and enabling/disabling clocks.
I think it would require a level of abstraction that isn't already implemented in that IPC to support all the different regulator configurations for all the different PMIC hardware that could be attached to the i.MX8X.
If I did want to add that level of abstraction to both the server side and the client side (both u_boot and linux), the example you pointed out might be a good choice. However, short of adding new commands to the IPC, I'll see if I can setup and enable LDO3 in the SCFW per the porting guide.
Thank you very much for your help.
Robert McLean