How to enable I2C interface on NanoPi K2?

Creating a bug report/issue

I have searched the existing open and closed issues

Required Information

  • DietPi version |
    G_DIETPI_VERSION_CORE=9
    G_DIETPI_VERSION_SUB=2
    G_DIETPI_VERSION_RC=1
    G_GITBRANCH=‘master’
    G_GITOWNER=‘MichaIng’

  • Distro version | bookworm

  • Kernel version |Linux DietPiK 6.6.16-current-meson64 #1 SMP PREEMPT Fri Feb 23 08:25:28 UTC 2024 aarch64 GNU/Linux

  • Architecture | arm64

  • SBC model |NanoPi K2 (aarch64)

  • Power supply used | 5V3A DCin

  • SD card used | SanDisk CANVAS 64G

Additional Information (if applicable)

  • Software title | i2c-tools i2cdetect hwclock
  • Was the software title installed freshly or updated/migrated? freshly
  • Can this issue be replicated on a fresh installation of DietPi? yep
    ← If you sent a “dietpi-bugreport”, please paste the ID here →
  • Bug report ID | echo $G_HW_UUID
    69507465-4dd3-45ec-9e2e-6a7907b52003

Steps to reproduce

  1. I use a DS3231 RTC module for nanopi K2 but can’t found it at I2C bus
  2. Try run i2cdetect -l only show HDMI
    root@DietPiK:~# i2cdetect -l
    i2c-0 i2c DesignWare HDMI I2C adapter
    root@DietPiK:~# i2cdetect -y 0
    0 1 2 3 4 5 6 7 8 9 a b c d e f
    00: – – – – – – – –
    10: – – – – – – – – – – – – – – – –
    20: – – – – – – – – – – – – – – – –
    30: 30 – – – – – – – – – – – – – – –
    40: – – – – – – – – – – – – – – – –
    50: – – – – – – – – – – – – – – – –
    60: – – – – – – – – – – – – – – – –
    70: – – – – – – – –
    root@DietPiK:~#
    Try add overlays=i2c0 at /boot/dietpiEnv.txt but not working too

Expected behaviour


  • I2C bus should detect address “68”
    i2cdetect -l should least two I2Cs

Actual behaviour


  • Can’t use I2C bus
    show HDMI only

Extra details


  • cat /boot/dietpiEnv.txt
    rootdev=UUID=68864810-d37b-4968-8833-2416e0ca6d49
    rootfstype=ext4

The init system logs to the console defined last.

consoleargs=console=ttyAML0,115200 console=tty1
usbstoragequirks=
extraargs=net.ifnames=0
docker_optimizations=off
overlay_path=amlogic
overlay_prefix=meson
overlays=i2c0
user_overlays=