How to Enable I2C on AML-S905X-CC Le Potato

Ahh, thanks for the clues. For anyone looking for this topic, these are the steps I followed, some may possibly be able to be left out.

clone libretech-wiring-tool
cd libretech-wiring-tool
make
edit libre-computer/aml-s905x-cc/dt/i2c-ao.dts
add “clock-frequency = <400000>;” to overlay section in the fragment with target = <&i2c_AO>;
make
sudo ./ldto remove i2c-ao
sudo reboot
sudo ./ldto merge i2c-ao

and with that, the scope shows 400kHz clock on my connected i2c device when sudo i2cdetect -y 0

2 Likes

The remove command doesn’t appear to exist in the current library, what do I do?

There’s enable/disable that does not persist on reboot.

There’s reset which goes to default. There’s no concept of remove since you cannot remove a merge overlay.

Reset, reboot, merge again.

So I modified the device tree file in the wiring-tool folder after calling make, I just want to load this modified device tree. Do I still need to do a reset? I want to keep the other settings the same.

Yes, without a reset, it only merges which can be an issue if the nodes are not the same anymore. The old nodes will still exist from your previous version.

If I reset won’t that disable the I2C device I enabled by the top post?

Please read the libretech-overlay portion of the wiring tool documentation:

You are not understanding some concepts and sequences correctly and mixing the terms.

There’s a fundamental difference between enable/disable and merge/reset.