SMBUS implementation in imx8m plus

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

SMBUS implementation in imx8m plus

ソリューションへジャンプ
1,506件の閲覧回数
aaronrenny
Contributor II

Hi all,

We are working on imx8mplus based custom board. Just wanted to know if we can configure the imx8mplus to act as a SMBUS master in order to communicate with an SMBUS slave connected to the I2C bus. If yes, are there any sample application code using which we can get a start.

 

Hoping for a response,

Aaron

タグ(2)
0 件の賞賛
返信
1 解決策
1,477件の閲覧回数
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hello @aaronrenny ,

->SMB is based on the principles of operation of I2C.
->One has to enable the smbus controller in 8mp soc and configure the register , basically it is part of the i2c bus
->SMBus provides a control bus for the system to pass messages to and from devices instead of using individual control lines, helping to reduce pin count and system wires.
->The SMBus specification refers to three types of devices: host, master, and slave.

->A device can be master only or slave only. It may act as a slave most of the time, but in special instances it becomes a master.
• A master is a device that issues commands, generates the clocks, and terminates the transfer.
• A slave is a device that receives or responds to a command.

->Now one can use smb protocol to communicate with slave.

There are Reserved SMBus addresses.
where 0th bit one can decide to read or write to/from the slave.

To give command and exact data to particular slave please refer Table-3 from the below link.
https://www.nxp.com/docs/en/application-note/AN4471.pdf

for more details on SMB one can refer below links.
https://www.nxp.com/docs/en/data-sheet/PCA6416A.pdf
https://www.nxp.com/docs/en/application-note/AN4471.pdf

Refer <linux_source_code>/drivers/input/mouse/elan_i2c_smbus.c for more details on coding part.

Thanks & Regards,

Sanket Parekh

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
622件の閲覧回数
OrenP
Contributor I

to be more precise, I understand SMBus, just not how to enable the SMBus controller in this board with the available libraries. Is there an existing configuration that needs to be set? or manually send a message to the controller in order to configure it for SMBus?

0 件の賞賛
返信
1,478件の閲覧回数
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hello @aaronrenny ,

->SMB is based on the principles of operation of I2C.
->One has to enable the smbus controller in 8mp soc and configure the register , basically it is part of the i2c bus
->SMBus provides a control bus for the system to pass messages to and from devices instead of using individual control lines, helping to reduce pin count and system wires.
->The SMBus specification refers to three types of devices: host, master, and slave.

->A device can be master only or slave only. It may act as a slave most of the time, but in special instances it becomes a master.
• A master is a device that issues commands, generates the clocks, and terminates the transfer.
• A slave is a device that receives or responds to a command.

->Now one can use smb protocol to communicate with slave.

There are Reserved SMBus addresses.
where 0th bit one can decide to read or write to/from the slave.

To give command and exact data to particular slave please refer Table-3 from the below link.
https://www.nxp.com/docs/en/application-note/AN4471.pdf

for more details on SMB one can refer below links.
https://www.nxp.com/docs/en/data-sheet/PCA6416A.pdf
https://www.nxp.com/docs/en/application-note/AN4471.pdf

Refer <linux_source_code>/drivers/input/mouse/elan_i2c_smbus.c for more details on coding part.

Thanks & Regards,

Sanket Parekh

0 件の賞賛
返信
1,386件の閲覧回数
aaronrenny
Contributor II

Hi @Sanket_Parekh ,

Thank you for the detailed input, I will try out the suggestions given.

Thanks,

Aaron

0 件の賞賛
返信
661件の閲覧回数
OrenP
Contributor I

Did you manage to make it work? I'm having the same problem and need to know which register to set in order to change the configuration to SMBus instead of I2C.

Thank you in advance.

0 件の賞賛
返信