Files
GL-XE300/i2c_firmware/README.md

48 lines
1.2 KiB
Markdown

# OpenWRT 24.10.4 Firmware with GPIO I²C for GL.iNet XE300
Custom OpenWRT build enabling **GPIO-based I²C master** on the XE300 using `i2c-gpio` driver and clean DTS integration.
## Locate & Edit DTS
target/linux/ath79/dts/qca9531_glinet_gl-xe300.dts
git clone https://git.openwrt.org/openwrt/openwrt.git
cd openwrt
git checkout v24.10.4
./scripts/feeds update -a
./scripts/feeds install -a
## Menu Config
Target System: Atheros ATH79
Target Profile: GL.iNet GL-XE300
Kernel Modules → I2C Support:
kmod-i2c-core
kmod-i2c-gpio
Utilities → i2c-tools
make -j$(nproc)
## Test It
ls /dev/i2c-*
i2cdetect -y 0
cat /sys/kernel/debug/gpio
i2cdump -y 0 0x48 # Adjust address accordingly
## Notes
- ✅ If you connect the resistors after boot, bus works great (ADS1115 detected at 0x48).
- ✅ Reboots are fine — problem only occurs on cold boot / full power cycle.
- ✅ The ADS1115 can be powered before boot or after — no issue.
- ❌ The presence of 3.3V on SDA/SCL at boot causes the SoC to hang.
Ubuntu 22.04+ build tools:
```bash
sudo apt update && sudo apt install -y \
build-essential clang flex bison g++ gawk gcc-multilib \
g++-multilib gettext libncurses-dev libssl-dev python3 \
python3-pip rsync unzip zlib1g-dev file wget git