i m trying to add an RTC on my router , given the glinet instructions :
kmod-i2c-gpio-custom seems no longer available, i guess the kmod I2C gpio does the same, just with different parameters...
but while installink the kmod-i2c-gpio, i finish without any additional i2c module in the lib/modules folder
the modules are not in the packages :
root@OpenWrt:~# opkg files kmod-i2c-gpio Package kmod-i2c-gpio (5.4.179-1) is installed on root and has the following files: /etc/modules.d/59-i2c-gpio root@OpenWrt:~# opkg files kmod-i2c-core Package kmod-i2c-core (5.4.179-1) is installed on root and has the following files: /etc/modules.d/51-i2c-core
to what i understand this could be due to some compile time options/script/whatevermagicabovewhaticanunderstand/ if the I2C is not mentionned in the device tree definition file (DTS).
Before tricking everything, i d like to know if this assumption is correct, or if there is another reason possible like the i2c support being compiled inside the kernel in this case glinet gl mifi, in this way how to alter or add any I2C configuration (apparently i have no /dev/i2c folder)?
Edit : while searching on onlder releases, it seems until 19.07.9 the module was present in the package under the ath79 architecture folder. this probably means there is an issue with the compilation options since the 21.02.0 this module is not delivered with its kmod-package (have to check if its included in the kernel).
opkg install kmod-ikconfig zcat /proc/config.gz
gives the compilation options of the running kernel
root@OpenWrt:/tmp# zcat /proc/config.gz |grep I2C|grep =y CONFIG_REGMAP_I2C=y CONFIG_I2C=y CONFIG_I2C_BOARDINFO=y CONFIG_I2C_CHARDEV=y CONFIG_I2C_ALGOBIT=y CONFIG_I2C_GPIO=y CONFIG_VIDEO_V4L2_I2C=y CONFIG_RTC_I2C_AND_SPI=y
this gives us clues about the I2c and I2C gpio driver presence hard in kernel. now remains to understand how to pass from commandline the correct arguments.
edit 3 : looking deeper, the new kernel module i2c-gpio reads the gpio numbers from the DTS files wich act as peripheral descriptors for platforms like arm. unfortunately theyre quite hard to modify on the fly, some discussions about that on the forums :
what a long way just to hook a RTC module on the platform.