Failed to load BB-I2C1-RTC-PCF8563 with kernel 5.10.131

Hi

I have migrated to kernel 5.10.131 as per your suggestions. I could port UART dts files successfully according to 5.10.131 kernel. But dts BB-I2C1-RTC-PCF8563 is not getting loaded. I am seeing below errors,
[ 59.499172] rtc-pcf8563 1-0051: pcf8563_write_block_data: err=-16 addr=0e, data=03
[ 59.499190] rtc-pcf8563 1-0051: pcf8563_probe: write error
[ 59.499428] rtc-pcf8563: probe of 1-0051 failed with error -5
[ 59.499525] i2c i2c-1: new_device: Instantiated device pcf8563 at 0x51

Appreciate your valuable suggestions.

Thanks

Hi @chougulemrudula looking around i don’t see that module, will have another version in a few days to test…

Please run:

sudo beagle-version

or the older…

sudo /opt/scripts/tools/version.sh 

Regards,

Thanks for your reply.
Could you please provide the rtc/ i2c dtbs for enabling the same?
Also I was doing memory profiling with kernel 5.10.131 I have observed that free memory is dying over the time when I am running qt UI-based applications with xorg and Xserver changes. And also parallely verifying the x11vnc functionality.

I would like to know the changes/fixes made in 5.10.131 kernel compared to 5.10.87 kernel. Do you support any memory profiling tool for BB kernel to debug the memory usage at kernel/ application level?

Please provide your valuable inputs.

Thanks

Works for me…

debian@BeagleBone:~$ dmesg | grep pcf
[    8.928507] rtc-pcf8563 1-0051: low voltage detected, date/time is not reliable.
[    8.936299] rtc-pcf8563 1-0051: registered as rtc1

Where did you get the module, what is on the silkscreen of the part??

Oh, that’s probably a years worth of changes…
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/log/?h=v5.10.131

all the same standard linux tools would apply…

Regards,

and this just happened…

[   11.284657] rtc-pcf8563 1-0051: pcf8563_write_block_data: err=-16 addr=0e, data=03
[   11.292283] rtc-pcf8563 1-0051: pcf8563_probe: write error
[   11.297955] rtc-pcf8563: probe of 1-0051 failed with error -5

Edit, looks like it was related to the pinmux, fixed it in git master, back to working for me…

Regards…

Thanks for your quick reply. I will verify and let you know the feedback of rtc working.

As I am monitoring the memory usage in kernel 5.10.87 and 5.10.131, I observed that free memory is dying over time. I could not see any memory usage improvements across the kernel versions. Earlier with kernel version 4.4.27 on ubuntu 16.04 observed that the memory usage is not that much compared to 5.10. It would be helpful to debug and finalize the kernel versions for production. Please share the memory optimization debugging methods for kernel/ user applications.
Appreciate your input.

Thanks

Oh, that’s probably a years worth of changes…
kernel/git/stable/linux.git - Linux kernel stable tree

would like to know more about the memory-related fixes. Are there any optimization or memory leak fixes done in kernel 131 compared to 87 kernel?

Regards

I verified the new dts file and seems like rtc is registered. But write to pcf registers failed

[ 2.421020] rtc-pcf8563 1-0051: registered as rtc1
[ 60.014794] i2c i2c-1: Failed to register i2c client pcf8563 at 0x51 (-16)
[ 229.454408] i2c i2c-1: Failed to register i2c client pcf8563 at 0x51 (-16)
[ 231.261926] i2c i2c-1: Failed to register i2c client pcf8563 at 0x51 (-16)

I am trying to write pcf using below command

sh -c “echo ‘pcf8563 0x51’ > /sys/class/i2c-adapter/i2c-1/new_device”

I am getting below errors though i2c-1 in /sys/class/i2c-adapter is availble
[ 60.014794] i2c i2c-1: Failed to register i2c client pcf8563 at 0x51 (-16)

ls /sys/class/i2c-adapter/i2c-1/
1-0051 device name of_node subsystem
delete_device i2c-dev new_device power uevent

Please provide your input.

Thanks & Regards

As failed to read/write client pcf using i2c-adapter on kernel 131, the date/ time setting after reboot not retaining values properly.

Regards

Battery backed up? Can you share the design of our pcf module or where you got the module from…

Regards,

Here are the 4285 commits between those 2 tags…

Regards,

is that 5.10 on 16.04 or newer userspace?

Every version of ubuntu (and debian) needs more resources… Every new kernel release add’s more drivers…

Regards,

Again the schematic is not available with me.
The dtbs used to work properly on ubuntu 16.04 with kernel version 4.4.27. Here is the log from kernel 4.4.27
[ 36.823375] rtc-pcf8563 1-0051: chip found, driver version 0.4.4
[ 36.842474] rtc-pcf8563 1-0051: rtc core: registered rtc-pcf8563 as rtc1
[ 36.845150] i2c i2c-1: new_device: Instantiated device pcf8563 at 0x51

Regards

5.10 is on Ubuntu 20.04 built using omap-image-builder workspace.

If we disable the unused kernel drivers then would it help to improve the performance of memory usage?

Regards

Why did you upgrade? Our tree has always been setup to allow you to use any kernel and rootfs?

We still have users using 3.8.13, while there is no support, users are free to use what ever they want…

Regards,

Ubuntu is not supported in omap-image-builder, it’s only enabled as a reference config. Currently 5.10 is the main target we are developing for Debian 11.x Bullseye…

Regards,

You are free to disable/enable kernel modules as you see fit…

Regards,

We have cycle for upgrading all devices in production. Mostly after every 5-6 years we upgrade the devices complete software package including bootloader, kernel, filesystem and other software packages. So as a part of that activity we have migrated the complete software.

What would be the correct time frame to get the stable version of kernel and rootfs? I would like to know your views/ suggestions on this upgrade.

Thanks & Regards

The BeagleBoard.org “community” does not operate that way… There is no direct Engineering Team, it’s all community run…

Today there are ‘2’ “Snapshots” updated once a month for Debian 10.x (Buster) ~ mostly stable, and Debian 11.x (Bullseye) ~ mostly fixes and improvements.

As a community, our goal is that anything that works in the Buster 4.19.x-ti kernel should work in the Bullseye 5.10.x-ti kernel…

Due to this thread, you’ve now helped us fix the BB-I2C1-RTC-PCF8563.dts overlay

Now that i see your not using the overlay and instead doing…

sh -c “echo ‘pcf8563 0x51’ > /sys/class/i2c-adapter/i2c-1/new_device”

I know what needs to be tested now…

Regards,

Okay, But still I can build ubuntu 20.04 using omap-image-builder using eewiki_minfs_ubuntu_focal_armhf.conf config files…

Hope the process of building ubuntu 20.04 LTS using omap-image-builder is correct and it is stable one…

Please correct/ suggest in case i’m doing something wrong…

Thanks & Regards