Kernel options for ectool

I am trying get ectool working on my Ryzen 7840U, and I am getting an error when I try to use it. I suspect I am missing some kernel options, I am running a 6.6.3 vanilla (kernel.org) kernel on Gentoo (I am actually working on packaging ectool on Gentoo).

Here is the error I am getting:

# ectool chargecurrentlimit 70
Error getting I/O privilege: Function not implemented
Cannot find I2C adapter
Unable to establish host communication
Couldn't find EC

Here are the I2C options I have enabled in my kernel:

CONFIG_REGMAP_I2C=y
CONFIG_TCG_TIS_I2C_CR50=m
CONFIG_I2C=y
CONFIG_ACPI_I2C_OPREGION=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_MUX=y
CONFIG_I2C_MUX_GPIO=y
CONFIG_I2C_HELPER_AUTO=y
CONFIG_I2C_ALGOBIT=m
CONFIG_I2C_AMD_MP2=m
CONFIG_I2C_PIIX4=y
CONFIG_I2C_DESIGNWARE_CORE=y
CONFIG_I2C_DESIGNWARE_PLATFORM=y
CONFIG_I2C_DESIGNWARE_AMDPSP=y
CONFIG_VIDEO_V4L2_I2C=y
CONFIG_SND_SOC_I2C_AND_SPI=y
CONFIG_I2C_HID=y
CONFIG_I2C_HID_ACPI=y
CONFIG_I2C_HID_CORE=y
CONFIG_RTC_I2C_AND_SPI=y

I am happy to provide the entire kernel config if required, though I feel like it might be a bit large to paste into these forums.

You need the out of tree patchset it’s posted in another thread. There is also a github pipelines artifact of the build of ectool which doesn’t need the kernel support floating around on the forums (I am guessing it’s hardcoded to ignore the kernel module and try the lpc address directly).

With teh cros_ec_lpc patch normal ectool builds will work.

Also a Gentoo user. I have had more success with framework_tool. I’ve created an ebuild for it: https://github.com/Leo3418/leo3418-ebuild-repo/tree/master/app-laptop/framework_tool. I’ll add it to GURU after more daily testing.

1 Like