GPIO and I2C

  • Hello,


    I would like to connect some hardware to the I/Os of the ArmStoneA8.
    I found the example that uses the sys/class/ mechanism.
    My question is: which gpio number in /sys/class/gpio matches which XGPIO on the feature connector?
    Is there a rule for this or can I find this information in the sourcecode?


    Which I2C bus number is connected to the I2CLK / I2DAT pins of the feature connector.


    Regards,
    Hoba

  • We have added an armStoneA8 GPIO Reference Card describing the GPIO numbers for the old and new feature connector layout.


    Please note that you can't use SPI and I2C at the same time. Pins 10 and 11 on rev 1.10 (pins 16 and 17 on rev. 1.20) share these two functions, i.e. two different GPIO pins are connected on these two pins. So it is important to only configure one output function for any of these pins to not damage the GPIOs or the board in general. If you're using SPI, you can't use I2C and vice versa. And you must not combine the function with GPIO. For example if you need gpio#17 as SPI_MOSI, you must not configure the same pin via gpio#41 (I2CCLK) as output. In the current kernel this association is not sufficiently checked, yet.


    This combination is a little bit unfortunate but necessary for compatibility reasons.


    The I2C on the feature connector is I2C0. There is another I2C on the capacitive touch connector. So if you don't plan to use a capacitive touch, you can also use this I2C for your own purposes. This is I2C2 then.


    Your F&S Support Team

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hello,


    Thank you very much, the reference card answers the questions I had.


    In the meanwhile I activated the I2C support in the kernel and found that the pins on the connector are bound to I2C-0, as you said.
    Is SPI activeded in the standard kernel?


    I have connected a LM92 to I2c-0 and it seems to work. But now I have the following problem:
    When the kernel starts it does a very long delay ( ~ 2 min ) after giving the information that the LM92 was found.
    During that delay nothing is displayed.
    After that delay the kernel continues to boot and everything works fine.


    Any idea what happens there?
    Maybe the I2C bus is scanned for further sensors?


    Hoba

  • Hello again,


    I though this might have been solved with Ver 2, but I still have the same problem.
    As soon as I activate the LM 92 I2C Sensor in the kernel config I get a very long delay ( ~ 2 min ) during boot up.
    Afterwards everythig seems to work well.
    Any idea what happens there or what I can do to find out what happens?


    The sensor is connected to pin 10 and 11 of the HW ver 1.10 board.
    I also disabled SPI in the kernel but no difference.


    LG
    HoBa