Altera_Forum
Honored Contributor
7 years agoDoes anyone have board and dts files that contain i2c0-mux entry?
Hi,
I'm currently using a DE10-Standard board. I noticed that if I use the Linux Console image and write it to a microSD card, the card will contain four files. fpga.dtbo socfpga.dtb u-boot.scr zImage After I've booted and logged in as root, I see that there is an i2c0-mux under the /sys/class/leds directory. This allows me to use HPS_CONTROL_I2C functionality, which is a way to use the HPS to access the onboard ADV7180 Video chip. I can use the C code found in the hps_i2c_switch to read registers contained in the ADV7180. Even if I remove the fpga.dtbo from the microSD card, I can still boot Linux completely and I still see i2c0-mux in the /sys/class/leds directory. Somehow, the dts file that was used to generate the socfpga.dtb file contains an entry for the i2c0-mux in the device tree. I would like to use the i2c0-mux in my own projects but I don't know the device tree syntax that is needed to make it work. I was wondering if anyone in the forum can point me to board info and dts files that allow me to create a dtb file that contains the i2c0-mux entry. Even better, instructions on how to create the socfpga.dtb file that is part of the Linux Console image. I've tried some things out myself but I'm not sure if it is complete. My first go was adding this right below hps0_led in the hps_common_board_info.xml file. <DTAppend name="label" type="string" parentlabel="i2c0mux" val="i2c0-mux"/> <DTAppend name="gpios" parentlabel="i2c0mux" > <val type="phandle">hps_0_gpio1_porta</val> <val type="number">19</val> <val type="number">0</val> </DTAppend> I haven't been able to get it to work because my .rbf file somehow prevents HPS I2C access. Thanks, Raul