This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
AM3352: I2C1 probe fails
Part Number: TMDXIDK5718
I'm using Linux SDK 5.1, custom HW, strongly based on IDK574.
I have EEPROM (chip address 0x51) on I2C bus 2 behind an pca9546 (chip address 0x70) on channel 1 (In IDK, EPROM and PMIC are both on I2C bus 0.)
I can successfully read eeprom in U-boot as follows:
Setting bus 2: i2c dev 2
setting channel 1 on mux: i2c mw 70 0.1 1
Read 400h bytes: i2c md 51 0.2 400
Now I tried to do same in do_board_detect() of SPL.
int save = i2c_get_bus_num(); // save the bus number because later in board_late_init() we have to talk to bus 0 again
rc = i2c_set_bus_num(i2c_bus /* 2 */);
if (rc) return rc;
// set mux to channel 1uint8_t buffer = 1; // channel 1 rc = i2c_write(0x70, 0, 0, &buffer, 1); // here I always get return code 1 if (rc) return rc;
rc = i2c_probe(0x51);
if (rc) return rc;
rc = i2c_read(0x51, 0x0, 0x2, (uint8_t *)ep, sizeof (struct my_eeprom)); if (rc) return rc;
i2c_set_bus_num(save); // restore bus number
So How I can I use bus number 0 in SPL? Do I have to add the mux and EEPROM in devicetree? I just enabled i2c2:
clock-frequency = <100000>;
status = "okay";
Or do I have to set CONFIG_SYS_OMAP24_I2C_SLAVE<n> or some other CONFIG_?
In reply to Christian Leeb:
Yes - most likely then I2C3 is not being initialized or the pinmux is incorrect. Let me create patch or example code to enable I2C3.
P.S. If this response helps answer your question please mark this post as verified - Thanks!
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
In reply to Marcus Cooksey:
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.