No kmod-i2c-gpio-custom in new firmware

Hello. You can find out why the new versions of openwrt (21.02, 22.03) do not have the i2c-gpio-custom module? Or is there already a replacement for this module? How to determine gpio for i2с?

tried kmod-i2c-gpio ?

if kmod-i2c-gpio then how to use it? Where to set parameters to specify the desired gpio port?

insmod i2c-gpio-custom bus0=0,7,29 - this is for kmod-i2c-gpio-custom, and how will it be for kmod-i2c-gpio?

insmod i2c-gpio-custom bus0=0,7,29 - this is for kmod-i2c-gpio-custom, and how will it be for kmod-i2c-gpio?

What is your router?

1 Like

TP-Link mr-3020. I used two gpio outputs

I assume you have TL-MR3020 v3 that is based on MT7628NN. This chip has a native GPIO interface shared with GPIO pins 4 and 5. If you can get access to these pins, you don't need to emulate i2c over GPIO.

No. My question is how to override gpio for i2c. It doesn't matter what router. For instead i2c_gpio_custom

You cannot override, you either use native interface or emulate it over GPIO.
In the old times it was exactly like you mentioned above - modprobe i2c-gpio-custom bus0=0,x,y where x and y are the GPIOs used. However in the recent kernel(s) this module is not available anymore, see here.
But reading this gives some hope and shows how to define the pins for i2c-gpio.

How to access these contacts?

My understanding that in your case you should discover what pins are available for physical connections and then use them in your configuration. Possible candidates are the GPIO pins on PCB and the pins originally used for the sliding switch.
If you can connect your I²C device(s) to pins 7 and 29 mentioned earlier, then you need to configure the same pins in your DTS file prior to building a new image.