8devices Community https://www.8devices.com/community/ |
|
Carambola2 I²C https://www.8devices.com/community/viewtopic.php?f=13&t=416 |
Page 2 of 3 |
Author: | hutorny [ 13 Oct 2013, 19:35 ] |
Post subject: | Re: Carambola2 I²C |
Author: | tty [ 14 Oct 2013, 08:13 ] |
Post subject: | Re: Carambola2 I²C |
Author: | hutorny [ 14 Oct 2013, 10:51 ] |
Post subject: | Re: Carambola2 I²C |
Author: | shawnup [ 20 Nov 2013, 03:21 ] |
Post subject: | Re: Carambola2 I²C |
I'm having trouble getting i2c working on a Carambola2. My image is compiled straight from the 8devices carambola2 github repository. I get the following messages when the kernel boots: root@carambola2:/# dmesg | grep i2c [ 0.550000] i2c-gpio i2c-gpio.0: using pins 18 (SDA) and 19 (SCL) [ 2.930000] i2c /dev entries driver I've been trying to generate i2c traffic with no devices connected, by using i2cdetect and i2cdump from the i2c-tools package. For example I use the command "i2cdetect 0" which successfully starts running. However with a scope I see that both gpio18 and gpio19 are always low while i2cdetect runs. Also, using a tool to read the device registers I see that 0x1804000 (GPIO_OE) never changes the values for 18/19, nor does 0x1804004 (GPIO_IN) or 0x18040008 (GPIO_OUT). I can use the same tool to set bits on gpio18/19, which do get reflected on my scope. I've also tried using the Openwrt i2c-gpio-custom driver to setup i2c on other gpios, to no avail. So what am I doing wrong? Thanks in advance. |
Author: | shawnup [ 20 Nov 2013, 03:36 ] |
Post subject: | Re: Carambola2 I²C |
And of course I figured this out just after I posted. I had assumed I would see gpio action without actually pulling scl and sda high, but I was wrong. I put a resistors from 3.3v to sda and scl, now I see traffic. |
Author: | Mike123 [ 28 Nov 2013, 11:16 ] |
Post subject: | Re: Carambola2 I²C |
I cannot compile i2c-tools (dl/i2c-tools-3.1.0.tar.bz2), many compile errors regarding i2c.h . Kernel ist from carambola2 github (ca. 3 months ago), updated and upgraded. make menuconfig <*> kmod-i2c-core <*> kmod-i2c-gpio <*> i2c-tools <*> python-smbus Found: target/linux/ar71xx/config-3.7 with CONFIG_I2C_CHARDEV=y target/linux/ar71xx/config-3.8 without " and have to hand edit second file to get I2C character device (SDA GPIO 18, SCL GPIO 19) with 8devices carambola patch. There are some OpenWrt mails with the same issue some months ago, but I do not read a solution. Any hints? Fresh carambola2 github download since shawnup was able to compile i2c-tools some days ago? |
Author: | FPeter [ 29 Nov 2013, 13:26 ] |
Post subject: | Re: Carambola2 I²C |
Author: | Mike123 [ 03 Dec 2013, 04:53 ] |
Post subject: | Re: Carambola2 I²C |
Thank you for the hint. The tools and Python smbus and I2C are working now. But the compilation issue for newer versions remains. Not really a problem since with files dir I am able to prepare a firmware image with some older binary only tools. |
Author: | valent [ 13 Feb 2014, 20:16 ] | ||
Post subject: | Re: Carambola2 I²C | ||
I tried using SPI pins (GPIO 3 and 4) but couldn't get them to work as I2C pins. For explanation which pins are which, and how they map to GPIO pins check out attached image. Check out my blog for detailed instructions: http://kernelreloaded.blog385.com/index ... g-openwrt/ Strange thing is that while booting up Carambola 2 there is a lot of chatter on SPI pins when they are connected to osciloscope... so is it possible that SPI pins (gpio 3 and 4) need to be somehow disabled before they can be used as I2C pins?
|
Author: | FPeter [ 13 Feb 2014, 20:54 ] |
Post subject: | Re: Carambola2 I²C |
Page 2 of 3 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |