1 /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
2 /* Do not edit directly, auto-generated from: */
3 /* Documentation/netlink/specs/dpll.yaml */
4 /* YNL-GEN uapi header */
6 #ifndef _UAPI_LINUX_DPLL_H
7 #define _UAPI_LINUX_DPLL_H
9 #define DPLL_FAMILY_NAME "dpll"
10 #define DPLL_FAMILY_VERSION 1
13 * enum dpll_mode - working modes a dpll can support, differentiates if and how
14 * dpll selects one of its inputs to syntonize with it, valid values for
15 * DPLL_A_MODE attribute
16 * @DPLL_MODE_MANUAL: input can be only selected by sending a request to dpll
17 * @DPLL_MODE_AUTOMATIC: highest prio input pin auto selected by dpll
25 DPLL_MODE_MAX = (__DPLL_MODE_MAX - 1)
29 * enum dpll_lock_status - provides information of dpll device lock status,
30 * valid values for DPLL_A_LOCK_STATUS attribute
31 * @DPLL_LOCK_STATUS_UNLOCKED: dpll was not yet locked to any valid input (or
32 * forced by setting DPLL_A_MODE to DPLL_MODE_DETACHED)
33 * @DPLL_LOCK_STATUS_LOCKED: dpll is locked to a valid signal, but no holdover
35 * @DPLL_LOCK_STATUS_LOCKED_HO_ACQ: dpll is locked and holdover acquired
36 * @DPLL_LOCK_STATUS_HOLDOVER: dpll is in holdover state - lost a valid lock or
37 * was forced by disconnecting all the pins (latter possible only when dpll
38 * lock-state was already DPLL_LOCK_STATUS_LOCKED_HO_ACQ, if dpll lock-state
39 * was not DPLL_LOCK_STATUS_LOCKED_HO_ACQ, the dpll's lock-state shall remain
40 * DPLL_LOCK_STATUS_UNLOCKED)
42 enum dpll_lock_status {
43 DPLL_LOCK_STATUS_UNLOCKED = 1,
44 DPLL_LOCK_STATUS_LOCKED,
45 DPLL_LOCK_STATUS_LOCKED_HO_ACQ,
46 DPLL_LOCK_STATUS_HOLDOVER,
49 __DPLL_LOCK_STATUS_MAX,
50 DPLL_LOCK_STATUS_MAX = (__DPLL_LOCK_STATUS_MAX - 1)
53 #define DPLL_TEMP_DIVIDER 1000
56 * enum dpll_type - type of dpll, valid values for DPLL_A_TYPE attribute
57 * @DPLL_TYPE_PPS: dpll produces Pulse-Per-Second signal
58 * @DPLL_TYPE_EEC: dpll drives the Ethernet Equipment Clock
66 DPLL_TYPE_MAX = (__DPLL_TYPE_MAX - 1)
70 * enum dpll_pin_type - defines possible types of a pin, valid values for
71 * DPLL_A_PIN_TYPE attribute
72 * @DPLL_PIN_TYPE_MUX: aggregates another layer of selectable pins
73 * @DPLL_PIN_TYPE_EXT: external input
74 * @DPLL_PIN_TYPE_SYNCE_ETH_PORT: ethernet port PHY's recovered clock
75 * @DPLL_PIN_TYPE_INT_OSCILLATOR: device internal oscillator
76 * @DPLL_PIN_TYPE_GNSS: GNSS recovered clock
79 DPLL_PIN_TYPE_MUX = 1,
81 DPLL_PIN_TYPE_SYNCE_ETH_PORT,
82 DPLL_PIN_TYPE_INT_OSCILLATOR,
87 DPLL_PIN_TYPE_MAX = (__DPLL_PIN_TYPE_MAX - 1)
91 * enum dpll_pin_direction - defines possible direction of a pin, valid values
92 * for DPLL_A_PIN_DIRECTION attribute
93 * @DPLL_PIN_DIRECTION_INPUT: pin used as a input of a signal
94 * @DPLL_PIN_DIRECTION_OUTPUT: pin used to output the signal
96 enum dpll_pin_direction {
97 DPLL_PIN_DIRECTION_INPUT = 1,
98 DPLL_PIN_DIRECTION_OUTPUT,
101 __DPLL_PIN_DIRECTION_MAX,
102 DPLL_PIN_DIRECTION_MAX = (__DPLL_PIN_DIRECTION_MAX - 1)
105 #define DPLL_PIN_FREQUENCY_1_HZ 1
106 #define DPLL_PIN_FREQUENCY_10_KHZ 10000
107 #define DPLL_PIN_FREQUENCY_77_5_KHZ 77500
108 #define DPLL_PIN_FREQUENCY_10_MHZ 10000000
111 * enum dpll_pin_state - defines possible states of a pin, valid values for
112 * DPLL_A_PIN_STATE attribute
113 * @DPLL_PIN_STATE_CONNECTED: pin connected, active input of phase locked loop
114 * @DPLL_PIN_STATE_DISCONNECTED: pin disconnected, not considered as a valid
116 * @DPLL_PIN_STATE_SELECTABLE: pin enabled for automatic input selection
118 enum dpll_pin_state {
119 DPLL_PIN_STATE_CONNECTED = 1,
120 DPLL_PIN_STATE_DISCONNECTED,
121 DPLL_PIN_STATE_SELECTABLE,
124 __DPLL_PIN_STATE_MAX,
125 DPLL_PIN_STATE_MAX = (__DPLL_PIN_STATE_MAX - 1)
129 * enum dpll_pin_capabilities - defines possible capabilities of a pin, valid
130 * flags on DPLL_A_PIN_CAPABILITIES attribute
131 * @DPLL_PIN_CAPABILITIES_DIRECTION_CAN_CHANGE: pin direction can be changed
132 * @DPLL_PIN_CAPABILITIES_PRIORITY_CAN_CHANGE: pin priority can be changed
133 * @DPLL_PIN_CAPABILITIES_STATE_CAN_CHANGE: pin state can be changed
135 enum dpll_pin_capabilities {
136 DPLL_PIN_CAPABILITIES_DIRECTION_CAN_CHANGE = 1,
137 DPLL_PIN_CAPABILITIES_PRIORITY_CAN_CHANGE = 2,
138 DPLL_PIN_CAPABILITIES_STATE_CAN_CHANGE = 4,
141 #define DPLL_PHASE_OFFSET_DIVIDER 1000
149 DPLL_A_MODE_SUPPORTED,
155 DPLL_A_MAX = (__DPLL_A_MAX - 1)
160 DPLL_A_PIN_PARENT_ID,
161 DPLL_A_PIN_MODULE_NAME,
164 DPLL_A_PIN_BOARD_LABEL,
165 DPLL_A_PIN_PANEL_LABEL,
166 DPLL_A_PIN_PACKAGE_LABEL,
168 DPLL_A_PIN_DIRECTION,
169 DPLL_A_PIN_FREQUENCY,
170 DPLL_A_PIN_FREQUENCY_SUPPORTED,
171 DPLL_A_PIN_FREQUENCY_MIN,
172 DPLL_A_PIN_FREQUENCY_MAX,
175 DPLL_A_PIN_CAPABILITIES,
176 DPLL_A_PIN_PARENT_DEVICE,
177 DPLL_A_PIN_PARENT_PIN,
178 DPLL_A_PIN_PHASE_ADJUST_MIN,
179 DPLL_A_PIN_PHASE_ADJUST_MAX,
180 DPLL_A_PIN_PHASE_ADJUST,
181 DPLL_A_PIN_PHASE_OFFSET,
184 DPLL_A_PIN_MAX = (__DPLL_A_PIN_MAX - 1)
188 DPLL_CMD_DEVICE_ID_GET = 1,
191 DPLL_CMD_DEVICE_CREATE_NTF,
192 DPLL_CMD_DEVICE_DELETE_NTF,
193 DPLL_CMD_DEVICE_CHANGE_NTF,
197 DPLL_CMD_PIN_CREATE_NTF,
198 DPLL_CMD_PIN_DELETE_NTF,
199 DPLL_CMD_PIN_CHANGE_NTF,
202 DPLL_CMD_MAX = (__DPLL_CMD_MAX - 1)
205 #define DPLL_MCGRP_MONITOR "monitor"
207 #endif /* _UAPI_LINUX_DPLL_H */