How can I access I2C1? In the QSYS it looks like its activated in the HPS, in the Pinout File I see A21 and K18 are mapped to the HPS_I2C1, but in the Kernel only I2C0 with the accelerometer is exported as /dev/i2c0, in Uboot I only see I2C0
Uboot finds I2C device 53, which is the 0xA6/0xA7 stated in the Schematic on page 16. As adresses are shifted by 1 bit it is for sure the Accelerometer.
How can I switch to I2C1 in Uboot? Same for the Linux.
Do I need a new devicetree or even a new kernel? I want to do some quick tests to see if I2C1 is working as I’m layouting a shield for the Nano Soc which needs I2C support via the LTC connector.
So, I changed the I2C1 in the PinMux Tool in QSYS, rebuilt the preloader, rebuilt uboot, grabbed the GHRD devicetree DTB file. decompiled it to the DTS raw XML, enabled the I2C1 (the sopc2dts tool creates a tree that lacks some stuff regarding reset manager and doesn’t start the bridges and the GMAC properly).
The bus shows up in /dev and I can play on it with I2Cdetect, but it doesn’t find my externally connected device (with 3K9 Pullups).
Dows anyone have a project where I2C1 is mapped on the LTC connector and that works? I want to compare settings to see if i overlooked something.
Got it running. Turns out my I2C device is a bit deaf sometimes…
I have a similar issue. Maybe you run also into this:
I have I2C0 and I2C1 setup in QSYS. As far as I understand the designware-i2c driver I have to add the defines “#define CONFIG_I2C_MULTI_BUS” and “#define CONFIG_SYS_I2C_BUS_MAX 1” to my board-header file for preloader and u-boot to have access to it. Also spl.c is modified to enable I2C. However, it seems that when u-boot comes up, it hangs.
Did you have that modifications, too or did you just change the dts/dtb?
I don’t need the I2C in UBoot, I changed the Devicetree to make it work in LINUX. I cannot remember the details right now, and I’m a father of triplets since last tuesday (even more challenging than the LINUX kernel ), so I will stay away from work for some time.
If it’s really really helping you a lot I can try to send you my DTS file when I’m next time in my company.
Congratulations! I hope you’ll get some sleep