Odyssey Blue J4105 - I2C device name problems

Hello everyone,

how to fix the I2C device names under Ubuntu 20.04.3 LTS (focal)???
The i2c devices are randomly assigned and not ordered by hardware id’s.

Between two boot actions:


  1. root@eofmc:/lib/udev/rules.d# ls -la /sys/bus/i2c/devices/
    total 0
    drwxr-xr-x 2 root root 0 Nov 7 18:20 .
    drwxr-xr-x 4 root root 0 Nov 7 18:20 …
    lrwxrwxrwx 1 root root 0 Nov 7 18:20 i2c-0 -> …/…/…/devices/pci0000:00/0000:00:17.0/i2c_designware.0/i2c-0
    lrwxrwxrwx 1 root root 0 Nov 7 18:20 i2c-1 -> …/…/…/devices/pci0000:00/0000:00:1f.1/i2c-1
    lrwxrwxrwx 1 root root 0 Nov 7 18:20 i2c-2 -> …/…/…/devices/pci0000:00/0000:00:17.1/i2c_designware.1/i2c-2
    lrwxrwxrwx 1 root root 0 Nov 7 18:20 i2c-3 -> …/…/…/devices/pci0000:00/0000:00:17.2/i2c_designware.2/i2c-3
    lrwxrwxrwx 1 root root 0 Nov 7 18:20 i2c-4 -> …/…/…/devices/pci0000:00/0000:00:02.0/i2c-4
    lrwxrwxrwx 1 root root 0 Nov 7 18:20 i2c-5 -> …/…/…/devices/pci0000:00/0000:00:02.0/i2c-5
    lrwxrwxrwx 1 root root 0 Nov 7 18:20 i2c-6 -> …/…/…/devices/pci0000:00/0000:00:02.0/i2c-6
    lrwxrwxrwx 1 root root 0 Nov 7 18:20 i2c-7 -> …/…/…/devices/pci0000:00/0000:00:02.0/drm/card0/card0-DP-1/i2c-7


  2. root@eofmc:/mnt/ssd/projects# ls -la /sys/bus/i2c/devices/
    total 0
    drwxr-xr-x 2 root root 0 Nov 7 18:54 .
    drwxr-xr-x 4 root root 0 Nov 7 18:54 …
    lrwxrwxrwx 1 root root 0 Nov 7 18:54 i2c-0 -> …/…/…/devices/pci0000:00/0000:00:17.0/i2c_designware.0/i2c-0
    lrwxrwxrwx 1 root root 0 Nov 7 18:54 i2c-1 -> …/…/…/devices/pci0000:00/0000:00:17.1/i2c_designware.1/i2c-1
    lrwxrwxrwx 1 root root 0 Nov 7 18:54 i2c-2 -> …/…/…/devices/pci0000:00/0000:00:17.2/i2c_designware.2/i2c-2
    lrwxrwxrwx 1 root root 0 Nov 7 18:54 i2c-3 -> …/…/…/devices/pci0000:00/0000:00:1f.1/i2c-3
    lrwxrwxrwx 1 root root 0 Nov 7 18:54 i2c-4 -> …/…/…/devices/pci0000:00/0000:00:02.0/i2c-4
    lrwxrwxrwx 1 root root 0 Nov 7 18:54 i2c-5 -> …/…/…/devices/pci0000:00/0000:00:02.0/i2c-5
    lrwxrwxrwx 1 root root 0 Nov 7 18:54 i2c-6 -> …/…/…/devices/pci0000:00/0000:00:02.0/i2c-6
    lrwxrwxrwx 1 root root 0 Nov 7 18:54 i2c-7 -> …/…/…/devices/pci0000:00/0000:00:02.0/drm/card0/card0-DP-1/i2c-7

@britus-eragon thank you for your feedback, we will fix it in the further BIOS version.

Hi Baozhu,

thank you for your reply. This is not a good news. If I don’t want to write additional code, such as auto-detection via all existing I2C interfaces, the board is currently useless for my project.
BTW: I have a Odyssey Blue J4105 with 128GB and SD Slot.

  1. When can I expect a new BIOS version?
  2. Is the BIOS open source?
  3. How safe and stable is a BIOS update?

Best regards

@britus-eragon

  1. When can I expect a new BIOS version?
    you also can use Linux udev to solve this issue.
  2. Is the BIOS open source?
    Sorry, not open source project.
  3. How safe and stable is a BIOS update?
    Please follow our wiki document.

Thank you for your reply. So, do you have a rule set for this problem. I already had this idea. Unfortunately, my rules don’t work.
SUBSYSTEM==“pci”, KERNELS==“0000:00:17.0” ACTION==“add” NAME=“i2c_designware.0”
SUBSYSTEM==“pci”, KERNELS==“0000:00:17.1” ACTION==“add” NAME=“i2c_designware.1”
SUBSYSTEM==“pci”, KERNELS==“0000:00:17.2” ACTION==“add” NAME=“i2c_designware.2”

SUBSYSTEM==“platform”, KERNELS==“i2c_designware.0” ACTION==“add” NAME=“i2c-0” SYMLINK+=“i2c.0”
SUBSYSTEM==“platform”, KERNELS==“i2c_designware.1” ACTION==“add” NAME=“i2c-1” SYMLINK+=“i2c.1”
SUBSYSTEM==“platform”, KERNELS==“i2c_designware.2” ACTION==“add” NAME=“i2c-2” SYMLINK+=“i2c.2”

Hi,
So I think I have the problem solved. After several boot cycles the I2C seems to be fixed for the designware chip, but the second part (symlinks) will not work :frowning:

Part-1 ---------------
ACTION==“add” SUBSYSTEMS==“pci” KERNELS==“0000:00:17.0” ATTRS{vendor}==“0x8086” ATTRS{class}==“0x118000” ATTRS{device}==“0x31b4” NAME=“i2c_designware.0”
ACTION==“add” SUBSYSTEMS==“pci” KERNELS==“0000:00:17.1” ATTRS{vendor}==“0x8086” ATTRS{class}==“0x118000” ATTRS{device}==“0x31b6” NAME=“i2c_designware.1”
ACTION==“add” SUBSYSTEMS==“pci” KERNELS==“0000:00:17.2” ATTRS{vendor}==“0x8086” ATTRS{class}==“0x118000” ATTRS{device}==“0x31b8” NAME=“i2c_designware.2”

Part-2 ----------------------------------------
ACTION==“add”, SUBSYSTEM==“platform” KERNEL==“i2c_designware.0” SYMLINK+=“i2c-adc”
ACTION==“add”, SUBSYSTEM==“platform” KERNEL==“i2c_designware.1” SYMLINK+=“i2c-rly”
ACTION==“add”, SUBSYSTEM==“platform” KERNEL==“i2c_designware.2” SYMLINK+=“i2c-dac”

hmmm :frowning: event not. after the 10th boot, the devices not ordered. now I’m at a loss.