🛠 Overlays device tree sur Le Potato : activer I2C, PWM, SPI

Libre Computer Amlogic boards — libre-amlogic (flagship: Le Potato AML-S905X-CC) · avance · Schéma : IMG-libre-amlogic-avance-3-libre-amlogic-avance-overlays-device-tree.svg — Activation d'overlays device tree sur Le Potato : armbianEnv.txt et armbian-config injectent des overlays meson-gxl (I2C/PWM/SPI) dans le device tree mainline meson-gxl-s905x-libretech-cc.

Objectives

Understand why the I2C, PWM, and SPI interfaces on the 40-pin connector are disabled by default on the Le Potato, and how to properly enable them using device tree overlays — the board is "mainline-first": everything goes through the upstream device tree (meson-gxl-s905x-libretech-cc.dts in the kernel).

Hardware

Complete code

# 1) Voie recommandee : menus Armbian
sudo armbian-config        # System > Options > HW interfaces : I2C / SPI / PWM
# ou edition directe du fichier de config :
sudo nano /boot/armbianEnv.txt
#   overlays="i2c0 i2c1"   # noms exacts : ls /boot/dtb/overlay/
sudo reboot

# 2) Verifier le device tree effectif
cat /proc/device-tree/compatible
# -> libretech,aml-s905x-cc  amlogic,s905x  amlogic,meson-gxl
ls /dev/i2c-* /dev/spidev* 2>/dev/null
sudo i2cdetect -l

# 3) Overlay maison minimal (exemple d'activation d'un bus I2C)
cat > i2c-ajout.dts <<'EOF'
/dts-v1/;
/plugin/;
&i2c_ao { status = "okay"; };
EOF
sudo dtc -@ -I dts -O dtb -o /boot/dtb/overlay/i2c-ajout.dtbo i2c-ajout.dts

Expected verification

After rebooting, /dev/i2c-N appears and i2cdetect -y N responds; /proc/device-tree reflects the enabled node. Available overlays are listed in /boot/dtb/overlay/ and loaded ones are specified in armbianEnv.txt.

Common errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials