Giter VIP home page Giter VIP logo

meta-ha1588's Introduction

HA1588

This layer includes driver(s) for integrating the HA1588 IP core with Linux via OpenEmbedded Yocto. The related project is for enabling hardware-accelerated 1588 support.

Currently the driver(s) include:

  • RTC - Exposed as both RTC and PTP drivers

NOTE: The kernel config removes the synchronization between the system and RTC (hwclock) and vice versa since ideally you may want to sync system time to the RTC after PTP lock.

This layer has been used successfully with a Xilinx PicoZed and AXI Ethernet Subsystem 1G/2.5G produced by Vivado 2018.3.

Layer Compatibility

This layer requires Yocto core. It has been tested with the Rocko branch, but may be compatible with newer versions.

Requirements

The following section defines the requirements for the core.

Yocto

Append your kernel features with ha1588.scc:

KERNEL_FEATURES_append = " ha1588.scc"

NOTE: If you are using any other kernel than linux-yocto, append your kernel recipe with include recipes-kernel/linux/ha1588.inc.

Device Tree

The following is an example device tree segment generated by Xilinx's device-tree-xlnx and patched with the compatibility string and ha1588,period property:

rtc_0: rtc@43c10000 {
    clock-names = "S_AXI_ACLK";
    clocks = <&misc_clk_2>;
    compatible = "ha1588,rtc-1.0";
    reg = <0x43c10000 0x10000>;
    ha1588,period = <0x19 0x00000000>;
};

The important properties are the compatible string name and ha1588,period key-value pair.

The ha1588,period is the the clock period for counting time in the HA1588 IP core. It is 40 bits, nanoseconds, and set in firmware. This property is for that initial value which will be updated by the kernel driver. For example, a 40 MHz (25 ns) clock clock is:

# Python: hex(int(25 * 2**32))
25.0 ns x 2^32 = 0x1900000000

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.