BalenaOS OrangePi One -> rtc clock, i2c, spi support

Hello

No i didn’t , manage to do this. And as i mention 2 times - the RTC message is false - my borard doesn’t have RTC connected. I assume, that there is some fake-hwclock.
But my plan is to connect one over I2C

  1. I don’t know why. It shows /dev/rtc0 without rtc connected (fake-hwclock?)

I don’t have attached RTC

I was trying to use the balenaOS image from @shaunmulligan

Hi, yes its available for download in our staging environment at balena dashboard , you will need to create a new account and app there. There you should be able to download the 2.46.1 and then all that you need to do is take your config.json from the production balenaCloud and put it on the SD card in /resin-boot , this will allow that 2.46.1 image to connect to the balenaCloud production servers and you can continue testing as you have before.

But there are the same problems.

Unfortunately image compilation was successful, but it still doesn’t include i2c and spi.
I tried to copy some things from other orange-pi-lite board (that have explicit config that includes some i2c and spi .dtb) to orange-pi-one, but nothing changes.

So summary:
I2C still not working
Time is still not properly updated (tried on production balena, and stage balena images)
SPI device is still not visible
REAL RTC clock still not working - it requires i2c,
Somehow FAKE RTC is here nad chronyd says that it synchronizes clock, but it can’t

OK thanks for clarifying.

Since you don’t have the RTC connected, I suggest focusing on the NTP issue and it not syncing on boot from the internet sources. Can you confirm the device has the ability to sync NTP manually with the command chronyc makestep

You should be able to see in the logs when it updates the time, or if it fails, with journalctl -u chronyd -fn100

Hi, yes i did it, it works

Hi, this is still to be reviewed by our engineers. We will reply once the team comes back with suggestions.

Hi Adam, sorry for the delay in reviewing this issue.

Allow me to set some context first as the thread above has touched on multiple points.

One thing I’d like to clear out first is the existence of an RTC. The thread above seems to imply that the Orange Pi has no RTC, while the AllWinner H3 SoC in the Orange Pi does appear to have an RTC (http://wiki.friendlyarm.com/wiki/images/4/4b/Allwinner_H3_Datasheet_V1.2.pdf).
If the RTC is available, that would explain the “System time set from RTC” messages in the logs. Also, by default chronyc is configured with the “rtcsync” directive, which means that the system time will be copied to the RTC every 11 minutes.

What I would expect to happen is:

  • Chronyd starts
  • If RTC is available, it sets the system time from it (-s)
  • If the time is older than the driftfile (no RTC or no battery on the RTC), time is restored from the driftfile which will contain the system time from when chronyd was last stopped so applications won’t see backward steps.
  • chronyd will then sync to an NTP source and step the system time if the difference is more than 1 second.

Note that if the device has been off for some time and there is no RTC (or no battery on the RTC), the driftfile will contain the system time from the last time chronyd was stopped and it might take some time for the NTP to sync, so there could be some space of time where the system clock is wrong.

The Orange Pi board is a community supported board and as such I don’t have hardware with me to test with, so I will have to rely on you to perform the tests.

Could you please tell me what’s the output of:

chronyc rtcdata

That should tell use whether there is an RTC in use.