modprobe rtc-ds3231 returns module not found?

2,781 views
Skip to first unread message

Will Kostelecky

unread,
Oct 31, 2013, 2:15:28 AM10/31/13
to beagl...@googlegroups.com
I am struggling to get an RTC to work on my BBB.   I see the 0x68 address in i2cdetect but it shows as UU (In Use?).  When I do a "modprobe rtc-ds3231" it returns "FATAL: Module rtc-ds3231 not found."  I have this same config running on another version of the OS and have followed what I think is the same process on this new build.......

Help would be appreciated!
Cheers

smith.wi...@gmail.com

unread,
Oct 31, 2013, 7:43:16 AM10/31/13
to beagl...@googlegroups.com
On Thursday, October 31, 2013 2:15:28 AM UTC-4, Will Kostelecky wrote:
I am struggling to get an RTC to work on my BBB.   I see the 0x68 address in i2cdetect but it shows as UU (In Use?).  When I do a "modprobe rtc-ds3231" it returns "FATAL: Module rtc-ds3231 not found."  I have this same config running on another version of the OS and have followed what I think is the same process on this new build.......

What i2c bus is the DS3231 on?  And do you have the right dto (pinmux) if it's not on i2c2 (pins 19,20) which I believe is always enabled.

Will Kostelecky

unread,
Oct 31, 2013, 7:49:27 AM10/31/13
to beagl...@googlegroups.com
It's on i2c-1.   The frustrating thing is that the HW works with another image that I built a while ago.  I am now trying to build a clean new image (post all my development messing around) and it is not working with the new build.   I am pretty sure I did not have to do anything other than what I am doing now but obviously I have missed something in the new build.

Will


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/v9r8UkN7klk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

smith.wi...@gmail.com

unread,
Oct 31, 2013, 9:31:12 AM10/31/13
to beagl...@googlegroups.com
On Thursday, October 31, 2013 7:49:27 AM UTC-4, Will Kostelecky wrote:
It's on i2c-1.   The frustrating thing is that the HW works with another image that I built a while ago.  I am now trying to build a clean new image (post all my development messing around) and it is not working with the new build.   I am pretty sure I did not have to do anything other than what I am doing now but obviously I have missed something in the new build.

Newer builds require the use of a device tree overlay to ensure the hardware you need is available, in older builds, you had to rebuild the kernel if what you wanted wasn't available.  Although recent builds have had the dto support, I have found various issues here and there.

So i2c-1 is the enumeration linux gave one of the i2c buses and does not necessarily correspond to the i2c pins you are using.  The BBB has two usable i2c devices [1], as follows:
  • i2c0: Not exposed in the expansion headers
  • i2c1: pins P9 17,18 (and 24,26)
  • i2c2: pins P9 19,20 (and 21,22)
The i2c devices appear in the AM335x memory map [2] at the following locations:
  • i2c0: 0x44E0_B000
  • i2c1: 0x4802_A000
  • i2c2: 0x4819_C000
Linux creates mappings in the /sys/bus/i2c/devices pseudo-filesystem that indicates the mappings from the i2c-* devices to the underlying hardware:

root@beaglebone:~# ls -l /sys/bus/i2c/devices/i2c-*
lrwxrwxrwx    1 root     root             0 Jan  1  2000 /sys/bus/i2c/devices/i2c-0 -> ../../../devices/ocp.2/44e0b000.i2c/i2c-0
lrwxrwxrwx    1 root     root             0 Jan  1  2000 /sys/bus/i2c/devices/i2c-1 -> ../../../devices/ocp.2/4819c000.i2c/i2c-1

So you can see here, that on my BBB, i2c0 is mapped to /dev/i2c-0 and i2c2 is mapped to /dev/i2c-1.

You can check your system, but I suspect that i2c-1 is actually i2c2 on pins P9_19,20.


-W.



[2] TI Sitara AM335x SRM, page 211, 212. See http://elinux.org/images/6/65/Spruh73c.pdf
 

Will Kostelecky

unread,
Oct 31, 2013, 10:08:28 AM10/31/13
to beagl...@googlegroups.com
It is now working.  I have no idea what I have done to make it work.  I even created a new image and tried to get it to not work again and could not.   I guess this is good news?
Reply all
Reply to author
Forward
0 new messages