Enabling i2c on NGW (2.6.22...)

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just managed to build an openwrt distro, and it boots from flash... I configured the kernel to have support for i2c etc, but I can't find the relevant /dev/ entries.
I know that plenty of stuff has changed in .22, and it also must be different from the 'official' distro... I just can't find it ! :D

Author of simavr - Follow me on twitter : @buserror

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Cool, sounds good!

I can't see any changes to the I2C API in the .22 changelog (though I might be blind) so the things to check are

1) I2C and Atmel TWI/I2C are both enabled in your config
2) There is a line such as

at32_add_device_twi(0);

in your board setup code (eg arch/avr32/boards/atngw100/setup.c)

I don't think this last bit is done by default so you best check that :)

-S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ahhh that helps tremendously to add the code :D

Now it works.

For info the NGW using that distro, trimmed down to basics, boots the board in about 2 seconds. Thats quite a change from the 'official' distro :D
Only problem I have is that the nfsroot fails; somehow the distro tries to reconfigure the ethernet at the end of the boot, and that kills NFS of course (and lock the board, for lack of /)

And I haven't figured how to install the kernel modules too, theres nothing in /lib! So I linked in as much as I want in the kernel :D

Anyway, I can mount my dev disk via nfs and start fiddling, thanks for the tip :D

Author of simavr - Follow me on twitter : @buserror

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

buserror wrote:
Ahhh that helps tremendously to add the code :D

Now it works.

Awesome :D
buserror wrote:
For info the NGW using that distro, trimmed down to basics, boots the board in about 2 seconds. Thats quite a change from the 'official' distro :D
I've got my BSP-based distro down to a 3 second boot from poweron, admittedly that is without ethernet :D
buserror wrote:
And I haven't figured how to install the kernel modules too, theres nothing in /lib! So I linked in as much as I want in the kernel :D
A simple make modules_install doesn't work? That's weird!

But I always use monolithic kernels too, saves effort ;)

-S.