Driver for NXP PCF8523 (used by Raspy-Juice) ex 3.8 roadmap?

Ask questions about Arch Linux ARM. Please search before making a new topic.

Re: 3.8 roadmap?

Postby pepedog » Fri Jan 18, 2013 9:28 am

$this->bbcode_second_pass_code('', 'pacman -Syu
sync
sync
sync
reboot')
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: 3.8 roadmap?

Postby more10 » Mon Feb 04, 2013 10:02 am

$this->bbcode_second_pass_quote('pepedog', 'W')ant to upgrade and test now?


Its not working :-(.

$this->bbcode_second_pass_code('', '[root@alarmpi log]# uname -a
Linux alarmpi 3.6.11-4-ARCH+ #1 PREEMPT Wed Jan 16 19:06:54 UTC 2013 armv6l GNU/Linux
[root@alarmpi log]# /sbin/hwclock --systohc --utc
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --debug option to see the details of our search for an access method.
[root@alarmpi log]# journalctl -b | grep pcf
[root@alarmpi log]# journalctl -b | grep rtc
jan 01 01:00:03 alarmpi kernel: drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[root@alarmpi log]# i2cdetect -y 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
')

From Raspy-Juice home:

$this->bbcode_second_pass_quote('', 'A')lso, for setting the system time at kernel boot up (ie. with hctosys.c), the device driver registration code patch for board initialization has been fixed to work either Raspberry Pi Rev.1 or Rev.2 boards where the I2C buses were swapped.


Is this patch needed?
more10
 
Posts: 19
Joined: Mon Sep 10, 2012 10:03 am

Re: 3.8 roadmap?

Postby pepedog » Mon Feb 04, 2013 10:50 am

I will look into it
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: 3.8 roadmap?

Postby pepedog » Mon Feb 04, 2013 4:02 pm

Can you test this before I commit
http://myplugbox.com/linux-raspberrypi-withPCF8523.tar.gz
This is a tar file not a pacman package
And can this be module (as opposed to being built into kernel)?
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: 3.8 roadmap?

Postby catmaker » Mon Feb 04, 2013 4:16 pm

I've performed the
$this->bbcode_second_pass_quote('', '
')pacman -Syu
sync
sync
sync
reboot

and I've got this

$this->bbcode_second_pass_code('', '
root@hagar:~# uname -a
Linux hagar 3.6.11-4-ARCH+ #1 PREEMPT Wed Jan 16 19:06:54 UTC 2013 armv6l GNU/Linux
root@hagar:~# strings /boot/kernel.img | grep -i pcf
pcf8523_set_datetime
pcf8523_get_datetime
pcf8523
rpcf8523_/
rpcf8523_
dpcf8523_
rtc-pcf8523
rtc_pcf8523
')
So I know you've got the PCF8523 RTC driver as a built-in. Thanks!

I test with
$this->bbcode_second_pass_code('', '
root@hagar:~# date
Thu Jan 1 07:30:37 SGT 1970
root@hagar:~# ls /dev/r*
/dev/ram0 /dev/ram11 /dev/ram14 /dev/ram3 /dev/ram6 /dev/ram9
/dev/ram1 /dev/ram12 /dev/ram15 /dev/ram4 /dev/ram7 /dev/random
/dev/ram10 /dev/ram13 /dev/ram2 /dev/ram5 /dev/ram8 /dev/rfkill

/dev/raw:
rawctl
root@hagar:~# i2cdetect -y 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
root@hagar:~# modprobe i2c-dev
root@hagar:~# echo pcf8523 0x68 > /sys/class/i2c-adapter/i2c-0/new_device
root@hagar:~# i2cdetect -y 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
root@hagar:~# ls /dev/r*
/dev/ram0 /dev/ram12 /dev/ram2 /dev/ram6 /dev/random
/dev/ram1 /dev/ram13 /dev/ram3 /dev/ram7 /dev/rfkill
/dev/ram10 /dev/ram14 /dev/ram4 /dev/ram8 /dev/rtc0
/dev/ram11 /dev/ram15 /dev/ram5 /dev/ram9

/dev/raw:
rawctl
root@hagar:~# hwclock
Sat 05 Jan 2013 12:02:06 AM SGT -0.029942 seconds
root@hagar:~# date
Thu Jan 1 07:32:15 SGT 1970
root@hagar:~# hwclock -s
root@hagar:~# date
Sat Jan 5 00:02:42 SGT 2013
root@hagar:~#
')
And it works! Thanks, again.

For more10's hctosys.c to work: i2c-dev, i2c-bcm2708 and a means to device-register a HW device as part of board initialization has to be configured as kernel built-in's. This last part is the patch at http://code.google.com/p/raspy-juice/so ... r-dt.patch

Can help, please?
catmaker
 
Posts: 8
Joined: Fri Jan 18, 2013 3:19 am
Top

Re: 3.8 roadmap?

Postby catmaker » Mon Feb 04, 2013 5:01 pm

$this->bbcode_second_pass_quote('pepedog', 'C')an you test this before I commit
http://myplugbox.com/linux-raspberrypi-withPCF8523.tar.gz
This is a tar file not a pacman package
And can this be module (as opposed to being built into kernel)?


I tried the above, and it works!
$this->bbcode_second_pass_code('', '
[ 485.354874] Restarting system.
øàøø
Arch Linux 3.6.11-5-ARCH+ (ttyAMA0)

hagar login: root
øPassword:
Last login: Tue Feb 5 00:45:00 SGT 2013 on ttyAMA0
Last login: Tue Feb 5 00:53:13 on ttyAMA0
root@hagar:~# uname -a
Linux hagar 3.6.11-5-ARCH+ #1 PREEMPT Mon Feb 4 09:18:25 CST 2013 armv6l GNU/Linux
root@hagar:~# dmesg | grep -i rtc
[ 2.263079] rtc-pcf8523 0-0068: chip found, driver version 1.0
[ 2.265057] rtc-pcf8523 0-0068: rtc core: registered rtc-pcf8523 as rtc0
[ 2.320608] rtc-pcf8523 0-0068: setting system clock to 2013-02-04 16:52:46 UTC (1359996766)
root@hagar:~# ls /dev/r*
/dev/ram0 /dev/ram12 /dev/ram2 /dev/ram6 /dev/random
/dev/ram1 /dev/ram13 /dev/ram3 /dev/ram7 /dev/rfkill
/dev/ram10 /dev/ram14 /dev/ram4 /dev/ram8 /dev/rtc
/dev/ram11 /dev/ram15 /dev/ram5 /dev/ram9 /dev/rtc0

/dev/raw:
rawctl
root@hagar:~#
root@hagar:~# date
Tue Feb 5 00:56:15 SGT 2013
root@hagar:~#
')

Thanks! Where can I find this source tree?

PS: My previous post had an incorrect RTC HW clock setting to Jan instead of Feb -- I corrected that before trying this above test.
catmaker
 
Posts: 8
Joined: Fri Jan 18, 2013 3:19 am
Top

Re: 3.8 roadmap?

Postby catmaker » Mon Feb 04, 2013 5:30 pm

Hi pepedog
$this->bbcode_second_pass_quote('', 'T')hanks! Where can I find this source tree?


I found your source tree at https://github.com/archlinuxarm/PKGBUIL ... 8523.patch

I tried to pull-request this same driver to github.com/raspberrypi a couple of months ago but was advised against it because it was out-of-tree and that merging with upstream more difficult. I later closed the request because there's a similar, but better driver submitted to the kernel.org's linux-3.8-rc3 Release Candidates. (It's better because this newer one sets certain bits for the RTC power-management registers).

Could we try that newer driver before you commit? It's also updated and available at the https://code.google.com/p/raspy-juice/source/browse/trunk/linux-rtc/0001-rtc-pcf8523.patch
catmaker
 
Posts: 8
Joined: Fri Jan 18, 2013 3:19 am
Top

Re: 3.8 roadmap?

Postby pepedog » Mon Feb 04, 2013 7:29 pm

We don't have the kernel source, just how to build, we pull from raspberry pi spource like yo, and patch/build
I will try later one tommorow
Does this module have to be built in, or can it be a module?
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: 3.8 roadmap?

Postby pepedog » Mon Feb 04, 2013 9:49 pm

I rebuilt again, I need to know if not built into kernel is ok, ie a regular module
http://myplugbox.com/linux-raspberrypi-withPCF8523.tar.gz
It has 0001 and 0002 patches
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: 3.8 roadmap?

Postby pepedog » Mon Feb 04, 2013 11:33 pm

I commited, done as modules
https://github.com/archlinuxarm/PKGBUIL ... aspberrypi
examine PKGBUILD for how/what patched, it built and runs fine here, but can't test that driver
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

PreviousNext

Return to User Questions

Who is online

Users browsing this forum: No registered users and 18 guests