linux sysfs 中没有 i2c 节点,需要内核配置吗?

No i2c nodes coming in linux sysfs, required kernel configs?

我有一台 Hikey LeMaker 620,我正在尝试在其上启用 I2C,因为目前我没有获得 /dev/i2c* 节点。

我在这里使用文档:https://github.com/96boards/documentation/blob/master/consumer/hikey/hikey620/build/linux-kernel.md

我明白了 I2C_DESIGNWARE_PLATFORM I2C_CHARDEV

已经启用,但我仍然没有在 /sys/bus/i2c/devices/ 中看到任何内容,因此我的 i2cdetect 无法显示“/dev/i2c/0:没有这样的文件或目录”

有没有我遗漏的内核配置?

编辑

这是 dmesg 日志

/ # dmesg | grep i2c
[    0.251154] i2c-core: driver [dummy] registered
[    0.284233] i2c-core: driver [pca953x] registered
[    0.286078] i2c-core: driver [sec_pmic] registered
[    0.287137] i2c_designware f7100000.i2c: could not find pctldev for node /soc/pinmux@f7010000/i2c0_pmx_func, deferring probe
[    0.287167] i2c_designware f7101000.i2c: could not find pctldev for node /soc/pinmux@f7010000/i2c1_pmx_func, deferring probe
[    0.287188] i2c_designware f7102000.i2c: could not find pctldev for node /soc/pinmux@f7010000/i2c2_pmx_func, deferring probe
[    0.323590] i2c-core: driver [cs2000-cp] registered
[    0.328647] i2c-core: driver [fan53555-regulator] registered
[    0.340913] i2c-core: driver [cros-ec-i2c] registered
[    0.341005] i2c-core: driver [max77620] registered
[    0.341054] i2c-core: driver [rk808] registered
[    0.351637] i2c-core: driver [usb3503] registered
[    0.353610] i2c-core: driver [rtc-ds3232] registered
[    0.354842] i2c /dev entries driver
[    0.355782] i2c-core: driver [pca954x] registered
[    0.356294] i2c-core: driver [bq27xxx-battery] registered
[    0.501408] i2c-core: driver [hmc5843] registered
[    2.209817] i2c_designware f7100000.i2c: Unknown Synopsys component type: 0x00000000
[    2.218809] i2c_designware f7101000.i2c: Unknown Synopsys component type: 0x00000000
[    2.227621] i2c_designware f7102000.i2c: Unknown Synopsys component type: 0x00000000

这原来是一个错误。 更多讨论在这里:https://discuss.96boards.org/t/kernel-configuration-for-enabling-i2c-on-hikey-lemaker-620/7517