i2c-bus kernel modules - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: PINE A64(+) (https://forum.pine64.org/forumdisplay.php?fid=4) +--- Forum: Linux on Pine A64(+) (https://forum.pine64.org/forumdisplay.php?fid=6) +---- Forum: Debian (https://forum.pine64.org/forumdisplay.php?fid=24) +---- Thread: i2c-bus kernel modules (/showthread.php?tid=1245) Pages:
1
2
|
i2c-bus kernel modules - robertvaldimarsson - 06-02-2016 Hello forum. I am running debian on a pine64 (2GB) and i want to access a device on the i2c-bus. While two busses show up (/dev/i2c-0 and i2c-1) i can not see my device using i2cdetect. I tried "modprobe i2c-dev" but it does not show up in lsmod after that. Usually there also has to be a kernel module for the processor (i2c_bcm2xxx) that is loaded before i2c-dev, but i can't find it. Is it implemented yet for the cortex 53? Does anyone have ideas what i could try next? Afaik a change in the /boot/config has to be made for the raspberry pi3. Is there maybe a similar change neccessary for the pine? a bit more data maybe: Code: root@pine64pro:/home/debian# ls -l /dev/i2c-* Code: root@pine64pro:/home/debian# i2cdetect -l Code: root@pine64pro:/home/debian# lsmod RE: i2c-bus kernel modules - martinayotte - 06-03-2016 Since "i2cdetect -l" has detected the buses, did you try to scan them with "i2cdetect -y 0" and "i2cdetect -y 1" ? RE: i2c-bus kernel modules - robertvaldimarsson - 06-03-2016 (06-03-2016, 07:47 AM)martinayotte Wrote: Since "i2cdetect -l" has detected the buses, did you try to scan them with "i2cdetect -y 0" and "i2cdetect -y 1" ? Thanks for your reply. Yes i did, but i get all blanks ("--") on all adresses on both busses, although at least one i2c device is connected (via the pi header). RE: i2c-bus kernel modules - martinayotte - 06-03-2016 What kind of device it is ? Are you sure that it is properly connected ? RE: i2c-bus kernel modules - robertvaldimarsson - 06-03-2016 (06-03-2016, 09:16 AM)martinayotte Wrote: What kind of device it is ? Are you sure that it is properly connected ? it was a SN2318 led-controller. to be sure it's not a dead chip i just connected an LM75 temperature sensor, which is a relatively simple chip. same as before (it should show up on address 7): Code: root@pine64pro:/home/debian# i2cdetect -y 0 I have read that on the raspberry pi it is neccessary to load i2c-dev (which should be active here, otherwise i would not see the /dev/i2c-files, right?) and a second kernel module, that allows to access the processors i2c-bus (usually called i2c_bcm8xxx). Is this module maybe missing? Or is it included in the 8723bs or the vfe-io? It seems strange that the buses show up, but not their connected devices. RE: i2c-bus kernel modules - martinayotte - 06-03-2016 I don't have much clues since the bus are showing but empty. On my Pine64, I have it running fine with an MCP23017 GPIO expander. I don't have any kernel module to load since I've compiled my own kernel from longsleep repo with the CONFIG_I2C_CHARDEV=y, so built-in in the kernel. Are you using pin 3 and 5 on Pi header ? Are you sure you didn't invert them ? You can also check if DTS is properly set by doing "hd /proc/device-tree/soc\@01c00000/pinctrl\@01c20800/twi1\@0/allwinner\,pins", it should display "PH2.PH3". RE: i2c-bus kernel modules - robertvaldimarsson - 06-03-2016 thanks for bearing with me the command spits out: 00000000 50 48 32 00 50 48 33 00 |PH2.PH3.| 00000008 i have tested with a ready made module (that has a pi type connector, so i can't confuse the pins) and with the LM75, on which i checked the connections multiple times (because that was my first thought too). could you maybe post what lsmod answers on your system? if the software checks out i will have a look at the pine's hardware tomorrow, to see if i get at least a clock or anything over the bus. RE: i2c-bus kernel modules - martinayotte - 06-03-2016 As I said, at least in my case with my own-built kernel, the I2C isn't driven by a modules, it is part of the main Image. But if you still wish to see : root@pineA64:~# lsmod Module Size Used by vfe_v4l2 744474 0 videobuf2_dma_contig 8764 1 vfe_v4l2 vfe_io 30197 1 vfe_v4l2 videobuf2_memops 1722 1 videobuf2_dma_contig videobuf2_core 24008 1 vfe_v4l2 cedar_ve 13200 0 ss 31587 0 8723bs 1344342 0 cfg80211 369159 1 8723bs ppdev 6380 0 parport 18857 1 ppdev RE: i2c-bus kernel modules - robertvaldimarsson - 06-03-2016 [SOLVED] i now get my i2c device detected, and have no idea why i did a re-setup of debian from scratch. i must have broken something along the way thank you very much for your patience and help martinayotte RE: i2c-bus kernel modules - martinayotte - 06-03-2016 you're welcome ! |