| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693 |
- # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
- ---
- name: dpll
- doc: DPLL subsystem.
- definitions:
- -
- type: enum
- name: mode
- doc: |
- working modes a dpll can support, differentiates if and how dpll selects
- one of its inputs to syntonize with it, valid values for DPLL_A_MODE
- attribute
- entries:
- -
- name: manual
- doc: input can be only selected by sending a request to dpll
- value: 1
- -
- name: automatic
- doc: highest prio input pin auto selected by dpll
- render-max: true
- -
- type: enum
- name: lock-status
- doc: |
- provides information of dpll device lock status, valid values for
- DPLL_A_LOCK_STATUS attribute
- entries:
- -
- name: unlocked
- doc: |
- dpll was not yet locked to any valid input (or forced by setting
- DPLL_A_MODE to DPLL_MODE_DETACHED)
- value: 1
- -
- name: locked
- doc: |
- dpll is locked to a valid signal, but no holdover available
- -
- name: locked-ho-acq
- doc: |
- dpll is locked and holdover acquired
- -
- name: holdover
- doc: |
- dpll is in holdover state - lost a valid lock or was forced
- by disconnecting all the pins (latter possible only
- when dpll lock-state was already DPLL_LOCK_STATUS_LOCKED_HO_ACQ,
- if dpll lock-state was not DPLL_LOCK_STATUS_LOCKED_HO_ACQ, the
- dpll's lock-state shall remain DPLL_LOCK_STATUS_UNLOCKED)
- render-max: true
- -
- type: enum
- name: lock-status-error
- doc: |
- if previous status change was done due to a failure, this provides
- information of dpll device lock status error.
- Valid values for DPLL_A_LOCK_STATUS_ERROR attribute
- entries:
- -
- name: none
- doc: |
- dpll device lock status was changed without any error
- value: 1
- -
- name: undefined
- doc: |
- dpll device lock status was changed due to undefined error.
- Driver fills this value up in case it is not able
- to obtain suitable exact error type.
- -
- name: media-down
- doc: |
- dpll device lock status was changed because of associated
- media got down.
- This may happen for example if dpll device was previously
- locked on an input pin of type PIN_TYPE_SYNCE_ETH_PORT.
- -
- name: fractional-frequency-offset-too-high
- doc: |
- the FFO (Fractional Frequency Offset) between the RX and TX
- symbol rate on the media got too high.
- This may happen for example if dpll device was previously
- locked on an input pin of type PIN_TYPE_SYNCE_ETH_PORT.
- render-max: true
- -
- type: enum
- name: clock-quality-level
- doc: |
- level of quality of a clock device. This mainly applies when
- the dpll lock-status is DPLL_LOCK_STATUS_HOLDOVER.
- The current list is defined according to the table 11-7 contained
- in ITU-T G.8264/Y.1364 document. One may extend this list freely
- by other ITU-T defined clock qualities, or different ones defined
- by another standardization body (for those, please use
- different prefix).
- entries:
- -
- name: itu-opt1-prc
- value: 1
- -
- name: itu-opt1-ssu-a
- -
- name: itu-opt1-ssu-b
- -
- name: itu-opt1-eec1
- -
- name: itu-opt1-prtc
- -
- name: itu-opt1-eprtc
- -
- name: itu-opt1-eeec
- -
- name: itu-opt1-eprc
- render-max: true
- -
- type: const
- name: temp-divider
- value: 1000
- doc: |
- temperature divider allowing userspace to calculate the
- temperature as float with three digit decimal precision.
- Value of (DPLL_A_TEMP / DPLL_TEMP_DIVIDER) is integer part of
- temperature value.
- Value of (DPLL_A_TEMP % DPLL_TEMP_DIVIDER) is fractional part of
- temperature value.
- -
- type: enum
- name: type
- doc: type of dpll, valid values for DPLL_A_TYPE attribute
- entries:
- -
- name: pps
- doc: dpll produces Pulse-Per-Second signal
- value: 1
- -
- name: eec
- doc: dpll drives the Ethernet Equipment Clock
- render-max: true
- -
- type: enum
- name: pin-type
- doc: |
- defines possible types of a pin, valid values for DPLL_A_PIN_TYPE
- attribute
- entries:
- -
- name: mux
- doc: aggregates another layer of selectable pins
- value: 1
- -
- name: ext
- doc: external input
- -
- name: synce-eth-port
- doc: ethernet port PHY's recovered clock
- -
- name: int-oscillator
- doc: device internal oscillator
- -
- name: gnss
- doc: GNSS recovered clock
- render-max: true
- -
- type: enum
- name: pin-direction
- doc: |
- defines possible direction of a pin, valid values for
- DPLL_A_PIN_DIRECTION attribute
- entries:
- -
- name: input
- doc: pin used as a input of a signal
- value: 1
- -
- name: output
- doc: pin used to output the signal
- render-max: true
- -
- type: const
- name: pin-frequency-1-hz
- value: 1
- -
- type: const
- name: pin-frequency-10-khz
- value: 10000
- -
- type: const
- name: pin-frequency-77-5-khz
- value: 77500
- -
- type: const
- name: pin-frequency-10-mhz
- value: 10000000
- -
- type: enum
- name: pin-state
- doc: |
- defines possible states of a pin, valid values for
- DPLL_A_PIN_STATE attribute
- entries:
- -
- name: connected
- doc: pin connected, active input of phase locked loop
- value: 1
- -
- name: disconnected
- doc: pin disconnected, not considered as a valid input
- -
- name: selectable
- doc: pin enabled for automatic input selection
- render-max: true
- -
- type: flags
- name: pin-capabilities
- doc: |
- defines possible capabilities of a pin, valid flags on
- DPLL_A_PIN_CAPABILITIES attribute
- entries:
- -
- name: direction-can-change
- doc: pin direction can be changed
- -
- name: priority-can-change
- doc: pin priority can be changed
- -
- name: state-can-change
- doc: pin state can be changed
- -
- type: const
- name: phase-offset-divider
- value: 1000
- doc: |
- phase offset divider allows userspace to calculate a value of
- measured signal phase difference between a pin and dpll device
- as a fractional value with three digit decimal precision.
- Value of (DPLL_A_PHASE_OFFSET / DPLL_PHASE_OFFSET_DIVIDER) is an
- integer part of a measured phase offset value.
- Value of (DPLL_A_PHASE_OFFSET % DPLL_PHASE_OFFSET_DIVIDER) is a
- fractional part of a measured phase offset value.
- -
- type: enum
- name: feature-state
- doc: |
- Allow control (enable/disable) and status checking over features.
- entries:
- -
- name: disable
- doc: |
- feature shall be disabled
- -
- name: enable
- doc: |
- feature shall be enabled
- attribute-sets:
- -
- name: dpll
- enum-name: dpll_a
- attributes:
- -
- name: id
- type: u32
- -
- name: module-name
- type: string
- -
- name: pad
- type: pad
- -
- name: clock-id
- type: u64
- -
- name: mode
- type: u32
- enum: mode
- -
- name: mode-supported
- type: u32
- enum: mode
- multi-attr: true
- -
- name: lock-status
- type: u32
- enum: lock-status
- -
- name: temp
- type: s32
- -
- name: type
- type: u32
- enum: type
- -
- name: lock-status-error
- type: u32
- enum: lock-status-error
- -
- name: clock-quality-level
- type: u32
- enum: clock-quality-level
- multi-attr: true
- doc: |
- Level of quality of a clock device. This mainly applies when
- the dpll lock-status is DPLL_LOCK_STATUS_HOLDOVER. This could
- be put to message multiple times to indicate possible parallel
- quality levels (e.g. one specified by ITU option 1 and another
- one specified by option 2).
- -
- name: phase-offset-monitor
- type: u32
- enum: feature-state
- doc: Receive or request state of phase offset monitor feature.
- If enabled, dpll device shall monitor and notify all currently
- available inputs for changes of their phase offset against the
- dpll device.
- -
- name: phase-offset-avg-factor
- type: u32
- doc: Averaging factor applied to calculation of reported phase offset.
- -
- name: pin
- enum-name: dpll_a_pin
- attributes:
- -
- name: id
- type: u32
- -
- name: parent-id
- type: u32
- -
- name: module-name
- type: string
- -
- name: pad
- type: pad
- -
- name: clock-id
- type: u64
- -
- name: board-label
- type: string
- -
- name: panel-label
- type: string
- -
- name: package-label
- type: string
- -
- name: type
- type: u32
- enum: pin-type
- -
- name: direction
- type: u32
- enum: pin-direction
- -
- name: frequency
- type: u64
- -
- name: frequency-supported
- type: nest
- multi-attr: true
- nested-attributes: frequency-range
- -
- name: frequency-min
- type: u64
- -
- name: frequency-max
- type: u64
- -
- name: prio
- type: u32
- -
- name: state
- type: u32
- enum: pin-state
- -
- name: capabilities
- type: u32
- enum: pin-capabilities
- -
- name: parent-device
- type: nest
- multi-attr: true
- nested-attributes: pin-parent-device
- -
- name: parent-pin
- type: nest
- multi-attr: true
- nested-attributes: pin-parent-pin
- -
- name: phase-adjust-min
- type: s32
- -
- name: phase-adjust-max
- type: s32
- -
- name: phase-adjust
- type: s32
- -
- name: phase-offset
- type: s64
- -
- name: fractional-frequency-offset
- type: sint
- doc: |
- The FFO (Fractional Frequency Offset) between the RX and TX
- symbol rate on the media associated with the pin:
- (rx_frequency-tx_frequency)/rx_frequency
- Value is in PPM (parts per million).
- This may be implemented for example for pin of type
- PIN_TYPE_SYNCE_ETH_PORT.
- -
- name: esync-frequency
- type: u64
- doc: |
- Frequency of Embedded SYNC signal. If provided, the pin is configured
- with a SYNC signal embedded into its base clock frequency.
- -
- name: esync-frequency-supported
- type: nest
- multi-attr: true
- nested-attributes: frequency-range
- doc: |
- If provided a pin is capable of embedding a SYNC signal (within given
- range) into its base frequency signal.
- -
- name: esync-pulse
- type: u32
- doc: |
- A ratio of high to low state of a SYNC signal pulse embedded
- into base clock frequency. Value is in percents.
- -
- name: reference-sync
- type: nest
- multi-attr: true
- nested-attributes: reference-sync
- doc: |
- Capable pin provides list of pins that can be bound to create a
- reference-sync pin pair.
- -
- name: phase-adjust-gran
- type: u32
- doc: |
- Granularity of phase adjustment, in picoseconds. The value of
- phase adjustment must be a multiple of this granularity.
- -
- name: fractional-frequency-offset-ppt
- type: sint
- doc: |
- The FFO (Fractional Frequency Offset) of the pin with respect to
- the nominal frequency.
- Value = (frequency_measured - frequency_nominal) / frequency_nominal
- Value is in PPT (parts per trillion, 10^-12).
- Note: This attribute provides higher resolution than the standard
- fractional-frequency-offset (which is in PPM).
- -
- name: pin-parent-device
- subset-of: pin
- attributes:
- -
- name: parent-id
- -
- name: direction
- -
- name: prio
- -
- name: state
- -
- name: phase-offset
- -
- name: pin-parent-pin
- subset-of: pin
- attributes:
- -
- name: parent-id
- -
- name: state
- -
- name: frequency-range
- subset-of: pin
- attributes:
- -
- name: frequency-min
- -
- name: frequency-max
- -
- name: reference-sync
- subset-of: pin
- attributes:
- -
- name: id
- -
- name: state
- operations:
- enum-name: dpll_cmd
- list:
- -
- name: device-id-get
- doc: |
- Get id of dpll device that matches given attributes
- attribute-set: dpll
- flags: [admin-perm]
- do:
- pre: dpll-lock-doit
- post: dpll-unlock-doit
- request:
- attributes:
- - module-name
- - clock-id
- - type
- reply:
- attributes:
- - id
- -
- name: device-get
- doc: |
- Get list of DPLL devices (dump) or attributes of a single dpll device
- attribute-set: dpll
- flags: [admin-perm]
- do:
- pre: dpll-pre-doit
- post: dpll-post-doit
- request:
- attributes:
- - id
- reply: &dev-attrs
- attributes:
- - id
- - module-name
- - mode
- - mode-supported
- - lock-status
- - lock-status-error
- - temp
- - clock-id
- - type
- - phase-offset-monitor
- - phase-offset-avg-factor
- dump:
- reply: *dev-attrs
- -
- name: device-set
- doc: Set attributes for a DPLL device
- attribute-set: dpll
- flags: [admin-perm]
- do:
- pre: dpll-pre-doit
- post: dpll-post-doit
- request:
- attributes:
- - id
- - mode
- - phase-offset-monitor
- - phase-offset-avg-factor
- -
- name: device-create-ntf
- doc: Notification about device appearing
- notify: device-get
- mcgrp: monitor
- -
- name: device-delete-ntf
- doc: Notification about device disappearing
- notify: device-get
- mcgrp: monitor
- -
- name: device-change-ntf
- doc: Notification about device configuration being changed
- notify: device-get
- mcgrp: monitor
- -
- name: pin-id-get
- doc: |
- Get id of a pin that matches given attributes
- attribute-set: pin
- flags: [admin-perm]
- do:
- pre: dpll-lock-doit
- post: dpll-unlock-doit
- request:
- attributes:
- - module-name
- - clock-id
- - board-label
- - panel-label
- - package-label
- - type
- reply:
- attributes:
- - id
- -
- name: pin-get
- doc: |
- Get list of pins and its attributes.
- - dump request without any attributes given - list all the pins in the
- system
- - dump request with target dpll - list all the pins registered with
- a given dpll device
- - do request with target dpll and target pin - single pin attributes
- attribute-set: pin
- flags: [admin-perm]
- do:
- pre: dpll-pin-pre-doit
- post: dpll-pin-post-doit
- request:
- attributes:
- - id
- reply: &pin-attrs
- attributes:
- - id
- - module-name
- - clock-id
- - board-label
- - panel-label
- - package-label
- - type
- - frequency
- - frequency-supported
- - capabilities
- - parent-device
- - parent-pin
- - phase-adjust-gran
- - phase-adjust-min
- - phase-adjust-max
- - phase-adjust
- - fractional-frequency-offset
- - fractional-frequency-offset-ppt
- - esync-frequency
- - esync-frequency-supported
- - esync-pulse
- - reference-sync
- dump:
- request:
- attributes:
- - id
- reply: *pin-attrs
- -
- name: pin-set
- doc: Set attributes of a target pin
- attribute-set: pin
- flags: [admin-perm]
- do:
- pre: dpll-pin-pre-doit
- post: dpll-pin-post-doit
- request:
- attributes:
- - id
- - frequency
- - direction
- - prio
- - state
- - parent-device
- - parent-pin
- - phase-adjust
- - esync-frequency
- - reference-sync
- -
- name: pin-create-ntf
- doc: Notification about pin appearing
- notify: pin-get
- mcgrp: monitor
- -
- name: pin-delete-ntf
- doc: Notification about pin disappearing
- notify: pin-get
- mcgrp: monitor
- -
- name: pin-change-ntf
- doc: Notification about pin configuration being changed
- notify: pin-get
- mcgrp: monitor
- mcast-groups:
- list:
- -
- name: monitor
|