Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:common:applications:gpio:i2c

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
products:sbc:common:applications:gpio:i2c [2023/11/07 04:47]
nick [Table]
products:sbc:common:applications:gpio:i2c [2026/09/15 03:24] (current)
nick
Line 24: Line 24:
 | :::       |  I2CM E  |  25(SCL)  |  GPIOZ_11   |  i2cm_e            |  4           |  /dev/i2c-4   | | :::       |  I2CM E  |  25(SCL)  |  GPIOZ_11   |  i2cm_e            |  4           |  /dev/i2c-4   |
 | :::       | :::      |  26(SDA)  |  GPIOZ_12   | :::                | :::          | :::           | | :::       | :::      |  26(SDA)  |  GPIOZ_12   | :::                | :::          | :::           |
 +^  VIM-5    |  I2C D   |  22(SCL)  |  GPIOA_15   |  i2c_d             |  3           |  /dev/i2c-3   |
 +| :::       | :::      |  23(SDA)  |  GPIOA_14   | :::                | :::          | :::           |
 +| :::       |  I2C G   |  25(SCL)  |  GPIOM_1    |  i2c_g             |  6           |  /dev/i2c-6   |
 +| :::       | :::      |  26(SDA)  |  GPIOM_0    | :::                | :::          | :::           |
  
 ===== Enable I2C ===== ===== Enable I2C =====
Line 45: Line 49:
 /dev/i2c-3 /dev/i2c-3
 ``` ```
 +
 +<tabbox VIM3 with 5.15 kernel>
 +
 +Edit ''/boot/dtb/amlogic/kvim3.dtb.overlay.env'' to add i2c node to ''fdt_overlays'' node if it doesn't exist.
 +
 +
 +e.g. To enable ''I2CM 3'', you need to add ''i2c3'' to node ''fdt_overlays'' if it doesn't exist.
 +
 +```shell
 +fdt_overlays=i2c3
 +
 +```
 +
 +After reboot, you will see the I2C device node.
 +
 +<tabbox VIM3L with 5.15 kernel>
 +
 +Edit ''/boot/dtb/amlogic/kvim3l.dtb.overlay.env'' to add i2c node to ''fdt_overlays'' node if it doesn't exist.
 +
 +
 +e.g. To enable ''I2CM 3'', you need to add ''i2c3'' to node ''fdt_overlays'' if it doesn't exist.
 +
 +```shell
 +fdt_overlays=i2c3
 +
 +```
 +
 +After reboot, you will see the I2C device node.
  
 <tabbox VIM4> <tabbox VIM4>
Line 83: Line 115:
 /dev/i2c-4 /dev/i2c-4
 ``` ```
 +
 +<tabbox VIM 5>
 +
 +Edit ''/boot/dtb/amlogic/kvim-5.dtb.overlay.env'' to add i2c node to ''fdt_overlays'' node if it doesn't exist.
 +
 +
 +e.g. To enable ''I2C D'', you need to add ''i2c_d'' to node ''fdt_overlays'' if it doesn't exist.
 +
 +```shell
 +fdt_overlays=i2c_d
 +
 +```
 +
 +After reboot, you will see the I2C device node.
 +
 +```shell
 +$ ls /dev/i2c-3
 +/dev/i2c-3
 +```
 +
  
 </tabbox> </tabbox>
Last modified: 2023/11/07 04:47 by nick