dpll.yaml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582
  1. # SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
  2. name: dpll
  3. doc: DPLL subsystem.
  4. definitions:
  5. -
  6. type: enum
  7. name: mode
  8. doc: |
  9. working modes a dpll can support, differentiates if and how dpll selects
  10. one of its inputs to syntonize with it, valid values for DPLL_A_MODE
  11. attribute
  12. entries:
  13. -
  14. name: manual
  15. doc: input can be only selected by sending a request to dpll
  16. value: 1
  17. -
  18. name: automatic
  19. doc: highest prio input pin auto selected by dpll
  20. render-max: true
  21. -
  22. type: enum
  23. name: lock-status
  24. doc: |
  25. provides information of dpll device lock status, valid values for
  26. DPLL_A_LOCK_STATUS attribute
  27. entries:
  28. -
  29. name: unlocked
  30. doc: |
  31. dpll was not yet locked to any valid input (or forced by setting
  32. DPLL_A_MODE to DPLL_MODE_DETACHED)
  33. value: 1
  34. -
  35. name: locked
  36. doc: |
  37. dpll is locked to a valid signal, but no holdover available
  38. -
  39. name: locked-ho-acq
  40. doc: |
  41. dpll is locked and holdover acquired
  42. -
  43. name: holdover
  44. doc: |
  45. dpll is in holdover state - lost a valid lock or was forced
  46. by disconnecting all the pins (latter possible only
  47. when dpll lock-state was already DPLL_LOCK_STATUS_LOCKED_HO_ACQ,
  48. if dpll lock-state was not DPLL_LOCK_STATUS_LOCKED_HO_ACQ, the
  49. dpll's lock-state shall remain DPLL_LOCK_STATUS_UNLOCKED)
  50. render-max: true
  51. -
  52. type: enum
  53. name: lock-status-error
  54. doc: |
  55. if previous status change was done due to a failure, this provides
  56. information of dpll device lock status error.
  57. Valid values for DPLL_A_LOCK_STATUS_ERROR attribute
  58. entries:
  59. -
  60. name: none
  61. doc: |
  62. dpll device lock status was changed without any error
  63. value: 1
  64. -
  65. name: undefined
  66. doc: |
  67. dpll device lock status was changed due to undefined error.
  68. Driver fills this value up in case it is not able
  69. to obtain suitable exact error type.
  70. -
  71. name: media-down
  72. doc: |
  73. dpll device lock status was changed because of associated
  74. media got down.
  75. This may happen for example if dpll device was previously
  76. locked on an input pin of type PIN_TYPE_SYNCE_ETH_PORT.
  77. -
  78. name: fractional-frequency-offset-too-high
  79. doc: |
  80. the FFO (Fractional Frequency Offset) between the RX and TX
  81. symbol rate on the media got too high.
  82. This may happen for example if dpll device was previously
  83. locked on an input pin of type PIN_TYPE_SYNCE_ETH_PORT.
  84. render-max: true
  85. -
  86. type: const
  87. name: temp-divider
  88. value: 1000
  89. doc: |
  90. temperature divider allowing userspace to calculate the
  91. temperature as float with three digit decimal precision.
  92. Value of (DPLL_A_TEMP / DPLL_TEMP_DIVIDER) is integer part of
  93. temperature value.
  94. Value of (DPLL_A_TEMP % DPLL_TEMP_DIVIDER) is fractional part of
  95. temperature value.
  96. -
  97. type: enum
  98. name: type
  99. doc: type of dpll, valid values for DPLL_A_TYPE attribute
  100. entries:
  101. -
  102. name: pps
  103. doc: dpll produces Pulse-Per-Second signal
  104. value: 1
  105. -
  106. name: eec
  107. doc: dpll drives the Ethernet Equipment Clock
  108. render-max: true
  109. -
  110. type: enum
  111. name: pin-type
  112. doc: |
  113. defines possible types of a pin, valid values for DPLL_A_PIN_TYPE
  114. attribute
  115. entries:
  116. -
  117. name: mux
  118. doc: aggregates another layer of selectable pins
  119. value: 1
  120. -
  121. name: ext
  122. doc: external input
  123. -
  124. name: synce-eth-port
  125. doc: ethernet port PHY's recovered clock
  126. -
  127. name: int-oscillator
  128. doc: device internal oscillator
  129. -
  130. name: gnss
  131. doc: GNSS recovered clock
  132. render-max: true
  133. -
  134. type: enum
  135. name: pin-direction
  136. doc: |
  137. defines possible direction of a pin, valid values for
  138. DPLL_A_PIN_DIRECTION attribute
  139. entries:
  140. -
  141. name: input
  142. doc: pin used as a input of a signal
  143. value: 1
  144. -
  145. name: output
  146. doc: pin used to output the signal
  147. render-max: true
  148. -
  149. type: const
  150. name: pin-frequency-1-hz
  151. value: 1
  152. -
  153. type: const
  154. name: pin-frequency-10-khz
  155. value: 10000
  156. -
  157. type: const
  158. name: pin-frequency-77_5-khz
  159. value: 77500
  160. -
  161. type: const
  162. name: pin-frequency-10-mhz
  163. value: 10000000
  164. -
  165. type: enum
  166. name: pin-state
  167. doc: |
  168. defines possible states of a pin, valid values for
  169. DPLL_A_PIN_STATE attribute
  170. entries:
  171. -
  172. name: connected
  173. doc: pin connected, active input of phase locked loop
  174. value: 1
  175. -
  176. name: disconnected
  177. doc: pin disconnected, not considered as a valid input
  178. -
  179. name: selectable
  180. doc: pin enabled for automatic input selection
  181. render-max: true
  182. -
  183. type: flags
  184. name: pin-capabilities
  185. doc: |
  186. defines possible capabilities of a pin, valid flags on
  187. DPLL_A_PIN_CAPABILITIES attribute
  188. entries:
  189. -
  190. name: direction-can-change
  191. doc: pin direction can be changed
  192. -
  193. name: priority-can-change
  194. doc: pin priority can be changed
  195. -
  196. name: state-can-change
  197. doc: pin state can be changed
  198. -
  199. type: const
  200. name: phase-offset-divider
  201. value: 1000
  202. doc: |
  203. phase offset divider allows userspace to calculate a value of
  204. measured signal phase difference between a pin and dpll device
  205. as a fractional value with three digit decimal precision.
  206. Value of (DPLL_A_PHASE_OFFSET / DPLL_PHASE_OFFSET_DIVIDER) is an
  207. integer part of a measured phase offset value.
  208. Value of (DPLL_A_PHASE_OFFSET % DPLL_PHASE_OFFSET_DIVIDER) is a
  209. fractional part of a measured phase offset value.
  210. attribute-sets:
  211. -
  212. name: dpll
  213. enum-name: dpll_a
  214. attributes:
  215. -
  216. name: id
  217. type: u32
  218. -
  219. name: module-name
  220. type: string
  221. -
  222. name: pad
  223. type: pad
  224. -
  225. name: clock-id
  226. type: u64
  227. -
  228. name: mode
  229. type: u32
  230. enum: mode
  231. -
  232. name: mode-supported
  233. type: u32
  234. enum: mode
  235. multi-attr: true
  236. -
  237. name: lock-status
  238. type: u32
  239. enum: lock-status
  240. -
  241. name: temp
  242. type: s32
  243. -
  244. name: type
  245. type: u32
  246. enum: type
  247. -
  248. name: lock-status-error
  249. type: u32
  250. enum: lock-status-error
  251. -
  252. name: pin
  253. enum-name: dpll_a_pin
  254. attributes:
  255. -
  256. name: id
  257. type: u32
  258. -
  259. name: parent-id
  260. type: u32
  261. -
  262. name: module-name
  263. type: string
  264. -
  265. name: pad
  266. type: pad
  267. -
  268. name: clock-id
  269. type: u64
  270. -
  271. name: board-label
  272. type: string
  273. -
  274. name: panel-label
  275. type: string
  276. -
  277. name: package-label
  278. type: string
  279. -
  280. name: type
  281. type: u32
  282. enum: pin-type
  283. -
  284. name: direction
  285. type: u32
  286. enum: pin-direction
  287. -
  288. name: frequency
  289. type: u64
  290. -
  291. name: frequency-supported
  292. type: nest
  293. multi-attr: true
  294. nested-attributes: frequency-range
  295. -
  296. name: frequency-min
  297. type: u64
  298. -
  299. name: frequency-max
  300. type: u64
  301. -
  302. name: prio
  303. type: u32
  304. -
  305. name: state
  306. type: u32
  307. enum: pin-state
  308. -
  309. name: capabilities
  310. type: u32
  311. enum: pin-capabilities
  312. -
  313. name: parent-device
  314. type: nest
  315. multi-attr: true
  316. nested-attributes: pin-parent-device
  317. -
  318. name: parent-pin
  319. type: nest
  320. multi-attr: true
  321. nested-attributes: pin-parent-pin
  322. -
  323. name: phase-adjust-min
  324. type: s32
  325. -
  326. name: phase-adjust-max
  327. type: s32
  328. -
  329. name: phase-adjust
  330. type: s32
  331. -
  332. name: phase-offset
  333. type: s64
  334. -
  335. name: fractional-frequency-offset
  336. type: sint
  337. doc: |
  338. The FFO (Fractional Frequency Offset) between the RX and TX
  339. symbol rate on the media associated with the pin:
  340. (rx_frequency-tx_frequency)/rx_frequency
  341. Value is in PPM (parts per million).
  342. This may be implemented for example for pin of type
  343. PIN_TYPE_SYNCE_ETH_PORT.
  344. -
  345. name: esync-frequency
  346. type: u64
  347. doc: |
  348. Frequency of Embedded SYNC signal. If provided, the pin is configured
  349. with a SYNC signal embedded into its base clock frequency.
  350. -
  351. name: esync-frequency-supported
  352. type: nest
  353. multi-attr: true
  354. nested-attributes: frequency-range
  355. doc: |
  356. If provided a pin is capable of embedding a SYNC signal (within given
  357. range) into its base frequency signal.
  358. -
  359. name: esync-pulse
  360. type: u32
  361. doc: |
  362. A ratio of high to low state of a SYNC signal pulse embedded
  363. into base clock frequency. Value is in percents.
  364. -
  365. name: pin-parent-device
  366. subset-of: pin
  367. attributes:
  368. -
  369. name: parent-id
  370. -
  371. name: direction
  372. -
  373. name: prio
  374. -
  375. name: state
  376. -
  377. name: phase-offset
  378. -
  379. name: pin-parent-pin
  380. subset-of: pin
  381. attributes:
  382. -
  383. name: parent-id
  384. -
  385. name: state
  386. -
  387. name: frequency-range
  388. subset-of: pin
  389. attributes:
  390. -
  391. name: frequency-min
  392. -
  393. name: frequency-max
  394. operations:
  395. enum-name: dpll_cmd
  396. list:
  397. -
  398. name: device-id-get
  399. doc: |
  400. Get id of dpll device that matches given attributes
  401. attribute-set: dpll
  402. flags: [ admin-perm ]
  403. do:
  404. pre: dpll-lock-doit
  405. post: dpll-unlock-doit
  406. request:
  407. attributes:
  408. - module-name
  409. - clock-id
  410. - type
  411. reply:
  412. attributes:
  413. - id
  414. -
  415. name: device-get
  416. doc: |
  417. Get list of DPLL devices (dump) or attributes of a single dpll device
  418. attribute-set: dpll
  419. flags: [ admin-perm ]
  420. do:
  421. pre: dpll-pre-doit
  422. post: dpll-post-doit
  423. request:
  424. attributes:
  425. - id
  426. reply: &dev-attrs
  427. attributes:
  428. - id
  429. - module-name
  430. - mode
  431. - mode-supported
  432. - lock-status
  433. - lock-status-error
  434. - temp
  435. - clock-id
  436. - type
  437. dump:
  438. reply: *dev-attrs
  439. -
  440. name: device-set
  441. doc: Set attributes for a DPLL device
  442. attribute-set: dpll
  443. flags: [ admin-perm ]
  444. do:
  445. pre: dpll-pre-doit
  446. post: dpll-post-doit
  447. request:
  448. attributes:
  449. - id
  450. -
  451. name: device-create-ntf
  452. doc: Notification about device appearing
  453. notify: device-get
  454. mcgrp: monitor
  455. -
  456. name: device-delete-ntf
  457. doc: Notification about device disappearing
  458. notify: device-get
  459. mcgrp: monitor
  460. -
  461. name: device-change-ntf
  462. doc: Notification about device configuration being changed
  463. notify: device-get
  464. mcgrp: monitor
  465. -
  466. name: pin-id-get
  467. doc: |
  468. Get id of a pin that matches given attributes
  469. attribute-set: pin
  470. flags: [ admin-perm ]
  471. do:
  472. pre: dpll-lock-doit
  473. post: dpll-unlock-doit
  474. request:
  475. attributes:
  476. - module-name
  477. - clock-id
  478. - board-label
  479. - panel-label
  480. - package-label
  481. - type
  482. reply:
  483. attributes:
  484. - id
  485. -
  486. name: pin-get
  487. doc: |
  488. Get list of pins and its attributes.
  489. - dump request without any attributes given - list all the pins in the
  490. system
  491. - dump request with target dpll - list all the pins registered with
  492. a given dpll device
  493. - do request with target dpll and target pin - single pin attributes
  494. attribute-set: pin
  495. flags: [ admin-perm ]
  496. do:
  497. pre: dpll-pin-pre-doit
  498. post: dpll-pin-post-doit
  499. request:
  500. attributes:
  501. - id
  502. reply: &pin-attrs
  503. attributes:
  504. - id
  505. - board-label
  506. - panel-label
  507. - package-label
  508. - type
  509. - frequency
  510. - frequency-supported
  511. - capabilities
  512. - parent-device
  513. - parent-pin
  514. - phase-adjust-min
  515. - phase-adjust-max
  516. - phase-adjust
  517. - fractional-frequency-offset
  518. - esync-frequency
  519. - esync-frequency-supported
  520. - esync-pulse
  521. dump:
  522. request:
  523. attributes:
  524. - id
  525. reply: *pin-attrs
  526. -
  527. name: pin-set
  528. doc: Set attributes of a target pin
  529. attribute-set: pin
  530. flags: [ admin-perm ]
  531. do:
  532. pre: dpll-pin-pre-doit
  533. post: dpll-pin-post-doit
  534. request:
  535. attributes:
  536. - id
  537. - frequency
  538. - direction
  539. - prio
  540. - state
  541. - parent-device
  542. - parent-pin
  543. - phase-adjust
  544. - esync-frequency
  545. -
  546. name: pin-create-ntf
  547. doc: Notification about pin appearing
  548. notify: pin-get
  549. mcgrp: monitor
  550. -
  551. name: pin-delete-ntf
  552. doc: Notification about pin disappearing
  553. notify: pin-get
  554. mcgrp: monitor
  555. -
  556. name: pin-change-ntf
  557. doc: Notification about pin configuration being changed
  558. notify: pin-get
  559. mcgrp: monitor
  560. mcast-groups:
  561. list:
  562. -
  563. name: monitor