• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Buried in cloud files? We can help with Spring cleaning!

    Whether you use Dropbox, Drive, G-Suite, OneDrive, Gmail, Slack, Notion, or all of the above, Dokkio will organize your files for you. Try Dokkio (from the makers of PBworks) for free today.

  • Dokkio (from the makers of PBworks) was #2 on Product Hunt! Check out what people are saying by clicking here.



This version was saved 15 years, 8 months ago View current version     Page history
Saved by PBworks
on November 5, 2006 at 8:32:42 pm

I've been working on an I2C bus driver for the WGT634U's GPIO pins. This I2C bus driver has worked (preliminary testing only) under Kamikaze r5435 with 2.6.17 kernel:


I was able to flip the output bits on a PCF8574 chip with a user-space program talking to /dev/i2c-0.


Here are my steps to installing it:

  • copy or link the i2c-bcm5365.c file above into build_mipsel/linux/drivers/i2c/busses
  • edit build_mipsel/linux/drivers/i2c/busses/Makefile adding i2c-bcm5365.o line
  • edit build_mipsel/linux/drivers/i2c/busses/Kconfig adding I2C_BCM5365 stanza
  • edit package/kernel/modules/other.mk adding i2c-core, i2c-dev, i2c-algo-bit, and i2c-bcm5365 stanzas. Autoload priorities should be set so i2c-core loads first, and i2c-bcm5365 loads last.
  • make ARCH=mips menuconfig in the kernel build directory (see http://wiki.openwrt.org/BuildRoot#Customizingthekerneloptions) and choose <m> for I2C, I2C_CHARDEV, I2C_ALGO_BIT, and I2C_BCM5365
  • make menuconfig in the top directory and choose <*> for i2c-core, i2c-dev, i2c-algo-bit, and i2c-bcm5365.
  • make in the top directory.
  • copy the new binary to the router with tftp


running lsmod on the router should show all four i2c-* modules loaded.


You can specify which gpio bits are used in /etc/modules.d/nn-i2c-bcm5365, e.g.

  • i2c-bcm5365 sclbit=0x10 sdabit=0x20


You must mknod /dev/i2c-0 c 89 0 to create the character device for user-space access to the bus.

Comments (0)

You don't have permission to comment on this page.