• Announcements

    • 1. Check power supply, check SD card and check other people experiences

      Power supply issues are one of the three biggest issues you'll face when starting with Single Board Computers (SBCs). SD card issues, whether fake or faulty, are another and issues resulting from poor board design is the other common issues you can encounter.   Power supply issues can be tricky. You might have a noisy power supply that works with one board because it has extra filtering, but won't work with another. Or you're using that cheap phone charger because your board has a microUSB connector, and it is either erratic, or doesn't start up, or even becomes the cause of some SD card issues.    Some tips to avoid the most common causes of problems reported:   Don't power via micro USB  - unless you have optimised your setup for low power requirements. Micro USB is great for mobile phones because they are simply charging a battery. It's bad for SBCs. Yes, it does work for a lot of people, but it also causes more problems and headaches over time than it is worth, unless you know exactly what you are doing. If you have a barrel jack power connector on your SBC, use it instead! If there is an option for powering via header connections, use that option!
        Don't use mobile phone chargers. They might be convenient and cheap, but this is because they are meant for charging phones, not powering your SBC which has particular power requirements.
        When you are evaluating a power supply, make sure you run some stress tests on your system to ensure that it will not cause issues down the path.   (Micro) SD card issues can be sneaky. They might appear right at the start causing strange boot and login errors, or they might cause problems over time. It is best to run a test on any new SD card you use, to ensure that it really is what it is, and to ensure that isn't faulty. Armbian provides you a simple way to do this   --   armbianmonitor -c /path/to/device/to/test  
    • 2. Make sure to collect and provide all necessary information

      We can only help if you provide quality information for us to work with. All stable images from the download section are tested, most stable upgrades are tested and we have tens of thousands of users. Even with regular and extensive testings, bugs sometimes do slip through. This is a voluntary support service and is unrelated to board makers, and is not obligated to provide you any answers. Repeated asking the same questions because you're not happy with the answers will result in you being ignored.

      Before you post a question, use the forum search as someone else might have already had the same problem and resolved it. And make sure you've read the Armbian documentation. If you still haven't found an answer, make sure you include the following in your post:   1. Logs when you can boot the board: armbianmonitor -u (paste URL to your forum post)   2. If your board does not boot, provide a log from serial console or at least make a picture, where it stops.   3. Describe the problem the best you can and provide all necessary info that we can reproduce the problem. We are not clairvoyant or mind readers. Please describe your setup as best as possible so we know what your operating environment is like.     We will not help in cases you are not using stable official Armbian builds, you have a problem with 3rd party hardware or reported problem would not be able to reproduced.

How install RTC schield by Hardkernell in Odroid c2 with OMV Erasmus 3.0.92?
0

43 posts in this topic

Recommended Posts

 

 

Hi Armbian people, this is my first time here and i feel like a child in a chemical laboratory... strange things, linux is a new world for me so i apologize for dumbs questions...

Im trying to install RTC Shield in my odroid c2 with Openmediavault Erasmus.

Someone can give me a hand?

I've start with the tutorial provided by Hardkernell.. is for Ubuntu, so i have an error (see first picture) since the second step.

After that, Odroid from HD suggest probe rtc with

sudo modprobe aml_i2c

sudo modprobe rtc_pcf8563..

.. it seems that the driver is not present or that is not the right thing to do (see second picture).

After that i"ve try with hwclock - - debug and... see the 3rd picture.

Im thinking to give up...

Or someone can help me?

My apologize for dumb questions and BAD english.

Marcello 99844925199df4293f15047affc66b32.jpgd25d8e961445b05ea0c98d3b8fe4b303.jpg28e5e687056bfb1bca6d4b72d6ba2b71.jpg

 

Share this post


Link to post
Share on other sites

First part of the journey happened here: https://forum.openmediavault.org/index.php/Thread/20464-Problem-installing-Rtc-shield-Hardkernell-on-Openmediavault-Erasmus/?postID=159296#post159296

 

IMO it's just fdtput not doing what it should for reasons I haven't checked (since not using C2 anyway). To proceed it would help if @marcellom would put the result of 'dtc -I dtb -O dts -o meson64_odroidc2.dts meson64_odroidc2.dtb' to an online pasteboard service like pastebin.com. Just paste meson64_odroidc2.dts to it and post the link.

marcellom likes this

Share this post


Link to post
Share on other sites

Looks like the i2c device is enabled in the DTS file

I'd use i2cdetect to see if the RTC is on the i2c bus and responding.

 

You will need to install the "i2c-tools" package if you don't have i2cdetect

root@cubie:~# i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- UU -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

It should look something like that, the UU on this one says that address 0x34 is being used by a driver

The "0" is the i2c bus number to check, you should have some /dev/i2c-* files

Share this post


Link to post
Share on other sites
3 hours ago, marcellom said:

im really a noob so apologize for what i say...

 

Please don't get this wrong... but since I asked you already over at OMV forum and still miss the answer (or might have overlooked it): What do you need a RTC for on a NAS? The N in NAS is 'Network' just like in NTP (Network time protocol -- active by default on OMV and usually providing exactly the same correct time than RTC which is needed on systems w/o network connections)

Share this post


Link to post
Share on other sites

Hi Tkaiser, yes, you are right...ntp update date and time.

 

I'm convinced myself that a nas MUST have a rtc to plan a week backup strategy since my odroid is not under UPS  and an accidental shutdown reset date to1970 for about half an hour.

Maybe I do not really need one RTC, my OMV Nas store just ripped music library for Volumio player.

But it is so frustrating to have something that does not work..

Share this post


Link to post
Share on other sites

i quote myself

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

.. im really a noob so apologize for what i say... is possible that the directory /dev does not exist? 

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

was, obviously, a stupid question...

/dev directory does exist....i2c file... not!

 

a pastebin of my config-3.14.29-51 file....inside /boot

This can help?

https://pastebin.com/kgVznbPj

Share this post


Link to post
Share on other sites

Since you're using a Legacy kernel, I2C port needs to be enabled in FEX file, meaning that you need to decompile /boot/script.bin into /boot/script.fex, edit it to enable I2C port, then recompile it into /boot/script.bin, assuming that you've created a backup first as /boot/script.bin-bak.

 

Share this post


Link to post
Share on other sites
8 minutes ago, martinayotte said:

Since you're using a Legacy kernel, I2C port needs to be enabled in FEX file, meaning that you need to decompile /boot/script.bin into /boot/script.fex, edit it to enable I2C port, then recompile it into /boot/script.bin, assuming that you've created a backup first as /boot/script.bin-bak.

 

If that doesn't make the /dev/i2c* files show up

try "modprobe i2c-dev" and "modprobe aml_i2c"

If that works, add them to your /etc/modules file. Your config shows the i2c AML driver is enabled as a module, so might not be loaded "CONFIG_I2C_AML=m"

Have a read through https://www.abelectronics.co.uk/kb/article/1036/odroid-c2-running-ubuntu-i2c-setup

 

Share this post


Link to post
Share on other sites
9 hours ago, martinayotte said:

Since you're using a Legacy kernel, I2C port needs to be enabled in FEX file, meaning that you need to decompile /boot/script.bin into /boot/script.fex, edit it to enable I2C port, then recompile it into /boot/script.bin, assuming that you've created a backup first as /boot/script.bin-bak.

Only AW 3.4.x kernel uses fex, this is Odroid C2 and it has DT from the start.

Share this post


Link to post
Share on other sites
root@raspberrypi:~# modprobe i2c-dev
root@raspberrypi:~# modprobe rtc-pcf8563
root@raspberrypi:~# echo pcf8563 0x51 > /sys/class/i2c-adapter/i2c-0/new_device

the first command makes sure the i2c-dev driver is loaded

the second command loads the pcf8563 driver

the third one tells the kernel to use the pcf8563 driver for the device with addres 0x51 on i2c-0. You'll want to change i2c-0 to i2c-1 as that's the i2c port with your rtc device.

 

This is from http://www.susa.net/wordpress/2012/06/raspberry-pi-pcf8563-real-time-clock-rtc/

marcellom likes this

Share this post


Link to post
Share on other sites

Great Chrisf...we have great news...

rtc is working...the last part is...how i can set the clock to work at boot?

Must follow Hard Kernell tutorial? (in the first post).

 

greatnews.png

Share this post


Link to post
Share on other sites

You have a few options

1) create an init/systemd script to perform those actions on boot.

2) update your device tree to load the drivers

https://www.kernel.org/doc/Documentation/i2c/instantiating-devices

The sooner device tree overlays are supported for all SoC's the better I say...

 

Your device is referenced in https://www.kernel.org/doc/Documentation/devicetree/bindings/i2c/trivial-devices.txt it will only need a compatable = "nxp,pcf8563"; field and a reg = <0x51>; field

 

Share this post


Link to post
Share on other sites

another "stupid" question...

Im not at home now but im thinking about what Chrisf says..

 

actually in my DT i have this

 

i2c@c1108500 {
        compatible = "amlogic, meson-i2c";
        dev_name = "i2c-A";
        status = "okay";
        reg = <0x0 0xc1108500 0x0 0x20>;
        device_id = <0x1>;
        pinctrl-names = "default";
        pinctrl-0 = <0x10>;
        #address-cells = <0x1>;
        #size-cells = <0x0>;
        use_pio = <0x0>;
        master_i2c_speed = <0x493e0>;
        clocks = <0xc 0xa>;
        clock-names = "clk_i2c";
        resets = <0xc 0x9>;
 

is enough change the bold parameters like this?

 

2c@c1108500 {
        compatible = "nxp,pcf8563";
        dev_name = "i2c-A";
        status = "okay";
        reg = <0x51>;
        device_id = <0x1>;
        pinctrl-names = "default";
        pinctrl-0 = <0x10>;
        #address-cells = <0x1>;
        #size-cells = <0x0>;
        use_pio = <0x0>;
        master_i2c_speed = <0x493e0>;
        clocks = <0xc 0xa>;
        clock-names = "clk_i2c";
        resets = <0xc 0x9>;

 

 

:D

Share this post


Link to post
Share on other sites
3 hours ago, marcellom said:

is enough change the bold parameters like this?

No, you need to add a slave device to this node. Something like this

i2c@c1108500 {
        compatible = "amlogic, meson-i2c";
        dev_name = "i2c-A";
        status = "okay";
        reg = <0x0 0xc1108500 0x0 0x20>;
        device_id = <0x1>;
        pinctrl-names = "default";
        pinctrl-0 = <0x10>;
        #address-cells = <0x1>;
        #size-cells = <0x0>;
        use_pio = <0x0>;
        master_i2c_speed = <0x493e0>;
        clocks = <0xc 0xa>;
        clock-names = "clk_i2c";
        resets = <0xc 0x9>;
        
        rtc@51 {
            compatible = "nxp,pcf8563";
            reg = <0x51>;
        };
};

 

marcellom likes this

Share this post


Link to post
Share on other sites

Ok Armbians... i tried with update of device tree and added the node as suggested...
After the mods and meson64_odroidc2.dtb recode from dts i have rebooted Odroid..
When the system time has updated and synch with ntp server time i havedone a hwclock - w to write the current time in hardware rtc.
After reboot the time and date was reset to 1970...
Grrrr...
So... i need to try with a different mode (script at start)...
Suggestions? :/
Ah, tnx for help boys... :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

0

  • Support the project

    We need your help to stay focused on the project.

    Choose the amount and currency you would like to donate in below.