workspace/skills/hardware/references/board-pinout.md
| Bus | Pins | Notes |
|---|---|---|
| I2C-1 | P18 (SCL), P21 (SDA) | Shared with WiFi SDIO — must stop WiFi first |
| I2C-3 | Available on header | Check device tree for pin assignment |
| I2C-5 | Software (BitBang) | Slower but no pin conflicts |
| Bus | Pins | Notes |
|---|---|---|
| SPI-2 | P18 (CS), P21 (MISO), P22 (MOSI), P23 (SCK) | Shared with WiFi — must stop WiFi first |
| SPI-4 | Software (BitBang) | Slower but no pin conflicts |
# 1. Stop WiFi (shares pins with I2C-1)
/etc/init.d/S30wifi stop
# 2. Configure pinmux for I2C-1
devmem 0x030010D0 b 0x2 # P18 → I2C1_SCL
devmem 0x030010DC b 0x2 # P21 → I2C1_SDA
# 3. Load i2c-dev module
modprobe i2c-dev
# 4. Verify
ls /dev/i2c-*
# 1. Stop WiFi (shares pins with SPI-2)
/etc/init.d/S30wifi stop
# 2. Configure pinmux for SPI-2
devmem 0x030010D0 b 0x1 # P18 → SPI2_CS
devmem 0x030010DC b 0x1 # P21 → SPI2_MISO
devmem 0x030010E0 b 0x1 # P22 → SPI2_MOSI
devmem 0x030010E4 b 0x1 # P23 → SPI2_SCK
# 3. Verify
ls /dev/spidev*
spidev_test is pre-installed on the official image for loopback testing| Bus | Pins | Notes |
|---|---|---|
| I2C-1 | Overlaps with WiFi | Not recommended |
| I2C-3 | Overlaps with WiFi | Not recommended |
| I2C-5 | A15 (SCL), A27 (SDA) | Recommended — software I2C, no conflicts |
# Configure pins using pinmap utility
# (MaixCAM uses a pinmap tool instead of devmem)
# Refer to: https://wiki.sipeed.com/hardware/en/maixcam/gpio.html
# Load i2c-dev
modprobe i2c-dev
# Verify
ls /dev/i2c-*
| Bus | Pins | Notes |
|---|---|---|
| I2C-6 | A1 (SCL), A0 (SDA) | Available on header |
| I2C-7 | Available | Check device tree |
# Configure pinmap for I2C-6
# A1 → I2C6_SCL, A0 → I2C6_SDA
# Refer to MaixCAM2 documentation for pinmap commands
modprobe i2c-dev
ls /dev/i2c-*
Uses the same SG2002 SoC as LicheeRV Nano. GPIO and I2C access follows the same pinmux procedure. Refer to the LicheeRV Nano section above.
Check NanoKVM-specific pin headers for available I2C/SPI lines:
The devmem utility may not be in the default image. Options:
busybox devmem if busybox is installedI2C adapter numbers can change between boots depending on driver load order. Always use i2c detect to find current bus assignments rather than hardcoding bus numbers.
/dev/i2c-* and /dev/spidev* typically require root access. Options:
i2c and spi groupsSUBSYSTEM=="i2c-dev", MODE="0666"