I2C_IMX support for i.MX8MP
Hi list,
Just found out about this imx ML and I'm not sure if it is also intended for questions, but I'll give it a try. Please correct me if I'm wrong.
We are currently in the process of creating a BSP for a custom i.MX8MP based board which features 3 I2C busses. Unfortunately I'm currently unable to get them to live with the i2c-imx or i2c-imxlpi2c drivers. Using i2c-gpio (with adapted SW_MUX_CTL and unchanged SW_PAD_CTL) works fine.
I'm aware of ERR007805 and tried therefore to configure the busses to 200kHz, but I don't get any signals/edges on the pins.
So the basic question for me is (as I was unable to find any trustworthy answers on the net) if the i2c-imx driver supports the i.MX8MP at all?
Any feedback is warmly welcome!
regards;rl
P.S. All tests were done with mainline linux 5.19.y.
P.P.S I've also sent this mail to [email protected] before.
Hello Richard,
This is not an ML for imx product support. It is for i.MX related Linux development for upstreaming.
Regards
Shenwei
Quoted 32 lines
-----Original Message-----
From: Richard Leitner <[email protected]>
Sent: Wednesday, August 17, 2022 5:39 AM
To: [email protected]
Subject: [EXT]I2C_IMXsupport for i.MX8MPCaution: EXT Email
Hi list,
Just found out about this imx ML and I'm not sure if it is also intended for questions, but I'll give it a try. Please correct me if I'm wrong.
We are currently in the process of creating a BSP for a custom i.MX8MP based board which features 3 I2C busses. Unfortunately I'm currently unable to get them to live with the i2c-imx or i2c-imxlpi2c drivers.
Using i2c-gpio (with adaptedSW_MUX_CTLand unchangedSW_PAD_CTL) works fine.I'm aware of ERR007805 and tried therefore to configure the busses to 200kHz, but I don't get any signals/edges on the pins.
So the basic question for me is (as I was unable to find any trustworthy answers on the net) if the i2c-imx driver supports the i.MX8MP at all?
Any feedback is warmly welcome!
regards;rl
P.S. All tests were done with mainline linux 5.19.y.
P.P.SI've also sent this mail to [email protected] before.
Quoted 3 lines · Shenwei Wang
Hello Richard,
This is not an ML for imx product support. It is for i.MX related Linux development for upstreaming.
Thanks for the information and sorry for the obviously inappropriate support request.
May I then ask the question differently?
Is i2c-imx supposed to support i.MX8MP on current mainline?
If yes: Great! I'll take a deeper look into my setup, I guess I've done something wrong then...
If not: Are you aware of anybody working on it already?
regards;rl
Quoted 4 lines
Regards
Shenwei
Quoted 20 lines
-----Original Message-----
From: Richard Leitner <[email protected]>
Sent: Wednesday, August 17, 2022 9:07 AM
To: Shenwei Wang <[email protected]>
Cc: [email protected]
Subject: Re: [EXT]I2C_IMXsupport for i.MX8MPCaution: EXT Email
Quoted 3 lines · Shenwei Wang
Hello Richard,
This is not an ML for imx product support. It is for i.MX related Linux
development for upstreaming.
Thanks for the information and sorry for the obviously inappropriate support request.
Quoted 8 lines
May I then ask the question differently?
Is i2c-imx supposed to support i.MX8MP on current mainline?
If yes: Great! I'll take a deeper look into my setup, I guess I've done something wrong then...
If not: Are you aware of anybody working on it already?
The support for imx8mp-evk board has already pushed to mainline. That includes the usage of i2c-imx. For example, a GPIO expander is connected to I2C3 on evk board.
Regards,
Shenwei
Quoted 7 lines
regards;rl
Quoted 4 lines
Regards
Shenwei
Quoted 7 lines · Shenwei Wang
Quoted 7 lines
Caution: EXT Email
On Wed, Aug 17, 2022 at 02:01:00PM +0000, Shenwei Wang wrote:
Is i2c-imx supposed to support i.MX8MP on current mainline?
Quoted 7 lines
Quoted 4 lines
If yes: Great! I'll take a deeper look into my setup, I guess I've done something wrong then...
If not: Are you aware of anybody working on it already?
The support for imx8mp-evk board has already pushed to mainline. That includes the usage of i2c-imx. For example, a GPIO expander is connected to I2C3 on evk board.
Thanks! I didn't thought of the EVK.
regards;rl
Quoted 3 lines · Shenwei Wang
The support for imx8mp-evk board has already pushed to mainline. That includes the usage of i2c-imx. For example, a GPIO expander is connected to I2C3 on evk board.
Thanks again. It now works with linux v6.0-rc1.
The missing piece was setting the 0x40000000 bit in the SW_PAD_CTL registers of SCL and SDA.
Unfortunately this bit seems to be undocumented in the RefManual and also the driver documentation doesn't state anything about it.
Can you please shed some light in this "magic" bit? Would be really helpful, thanks!
Furthermore I guess documenting it somewhere in the driver or setting it implicitely (if that's possible) would be a good idea?
regards;rl
Hi Richard,
Nothing is hidden here. That is PAD control register, and should be documented in the IOMUXC and PIN Control section in the RM.
Regards,
Shenwei
Quoted 29 lines
-----Original Message-----
From: Richard Leitner <[email protected]>
Sent: Thursday, August 18, 2022 3:41 AM
To: Shenwei Wang <[email protected]>
Cc: [email protected]
Subject: Re: [EXT]I2C_IMXsupport for i.MX8MPCaution: EXT Email
Quoted 2 lines · Shenwei Wang
The support for imx8mp-evk board has already pushed to mainline. That
includes the usage of i2c-imx.
Quoted 1 line
For example, a GPIO expander is connected to I2C3 on evk board.
Thanks again. It now works with linux v6.0-rc1.
The missing piece was setting the
0x40000000bit in theSW_PAD_CTLregisters of SCL and SDA.
Unfortunately this bit seems to be undocumented in the RefManual and also the driver documentation doesn't state anything about it.Can you please shed some light in this "magic" bit? Would be really helpful, thanks!
Furthermore I guess documenting it somewhere in the driver or setting it implicitely (if that's possible) would be a good idea?
regards;rl
Quoted 4 lines · Shenwei Wang
Hi Richard,
Nothing is hidden here. That is PAD control register, and should be documented in the IOMUXC and PIN Control section in the RM.
Checking the IOMUX and PADs' settings is the first step when enabling an interface.
David
Quoted 32 lines
Regards,
ShenweiQuoted 29 lines
-----Original Message-----
From: Richard Leitner <[email protected]>
Sent: Thursday, August 18, 2022 3:41 AM
To: Shenwei Wang <[email protected]>
Cc: [email protected]
Subject: Re: [EXT]I2C_IMXsupport for i.MX8MPCaution: EXT Email
Quoted 2 lines · Shenwei Wang
The support for imx8mp-evk board has already pushed to mainline. That
includes the usage of i2c-imx.
Quoted 1 line
For example, a GPIO expander is connected to I2C3 on evk board.
Thanks again. It now works with linux v6.0-rc1.
The missing piece was setting the
0x40000000bit in theSW_PAD_CTLregisters of SCL and SDA.
Unfortunately this bit seems to be undocumented in the RefManual and also the driver documentation doesn't state anything about it.Can you please shed some light in this "magic" bit? Would be really helpful, thanks!
Furthermore I guess documenting it somewhere in the driver or setting it implicitely (if that's possible) would be a good idea?
regards;rl
Quoted 8 lines · David Wolfson
Quoted 4 lines · Shenwei Wang
Hi Richard,
Nothing is hidden here. That is PAD control register, and should be documented in the IOMUXC and PIN Control section in the RM.
Checking the IOMUX and PADs' settings is the first step when enabling an interface.
Sure, that's what I've done. Nonetheless the "8.2.4.280 SW_PAD_CTL_PAD_I2C3_SCL SW PAD Control Register (IOMUXC_SW_PAD_CTL_PAD_I2C3_SCL)" section in the IMX8MPRM says bit 30 is reserved.
So does "8.2.4.128 SW_MUX_CTL_PAD_I2C3_SCL SW MUX Control Register (IOMUXC_SW_MUX_CTL_PAD_I2C3_SCL)".
Maybe I'm just too dumb do find it... So it would be really helpful if you could please give a pointer where to find that documentation?
Thanks & regards;rl
Quoted 3 lines
David
Hi Shenwei, Hi David,
friendly ping.
Quoted 15 lines · Richard Leitner
Quoted 8 lines · David Wolfson
Quoted 4 lines · Shenwei Wang
Hi Richard,
Nothing is hidden here. That is PAD control register, and should be documented in the IOMUXC and PIN Control section in the RM.
Checking the IOMUX and PADs' settings is the first step when enabling an interface.
Sure, that's what I've done. Nonetheless the "8.2.4.280
SW_PAD_CTL_PAD_I2C3_SCLSW PAD Control Register (IOMUXC_SW_PAD_CTL_PAD_I2C3_SCL)" section in the IMX8MPRM says bit 30 is reserved.
Quoted 5 lines
So does "8.2.4.128
SW_MUX_CTL_PAD_I2C3_SCLSW MUX Control Register (IOMUXC_SW_MUX_CTL_PAD_I2C3_SCL)".Maybe I'm just too dumb do find it... So it would be really helpful if you could please give a pointer where to find that documentation?
Any hints on where to find the documentation of that bit?
Thanks & regards;rl