xref: /linux/drivers/firmware/arm_scmi/vendors/imx/imx95.rst (revision b8979c6b4d0d1b36e94f5bc483fd86e38107e554)
1.. SPDX-License-Identifier: GPL-2.0
2.. include:: <isonum.txt>
3
4===============================================================================
5i.MX95 System Control and Management Interface(SCMI) Vendor Protocols Extension
6===============================================================================
7
8:Copyright: |copy| 2024 NXP
9
10:Author: Peng Fan <peng.fan@nxp.com>
11
12The System Manager (SM) is a low-level system function which runs on a System
13Control Processor (SCP) to support isolation and management of power domains,
14clocks, resets, sensors, pins, etc. on complex application processors. It often
15runs on a Cortex-M processor and provides an abstraction to many of the
16underlying features of the hardware. The primary purpose of the SM is to allow
17isolation between software running on different cores in the SoC. It does this
18by having exclusive access to critical resources such as those controlling
19power, clocks, reset, PMIC, etc. and then providing an RPC interface to those
20clients. This allows the SM to provide access control, arbitration, and
21aggregation policies for those shared critical resources.
22
23SM introduces a concept Logic Machine(LM) which is analogous to VM and each has
24its own instance of SCMI. All normal SCMI calls only apply to that LM. That
25includes boot, shutdown, reset, suspend, wake, etc. Each LM (e.g. A55 and M7)
26are completely isolated from the others and each LM has its own communication
27channels talking to the same SCMI server.
28
29This document covers all the information necessary to understand, maintain,
30port, and deploy the SM on supported processors.
31
32The SM implements an interface compliant with the Arm SCMI Specification
33with additional vendor specific extensions.
34
35SCMI_BBM: System Control and Management BBM Vendor Protocol
36==============================================================
37
38This protocol is intended provide access to the battery-backed module. This
39contains persistent storage (GPR), an RTC, and the ON/OFF button. The protocol
40can also provide access to similar functions implemented via external board
41components. The BBM protocol provides functions to:
42
43- Describe the protocol version.
44- Discover implementation attributes.
45- Read/write GPR
46- Discover the RTCs available in the system.
47- Read/write the RTC time in seconds and ticks
48- Set an alarm (per LM) in seconds
49- Get notifications on RTC update, alarm, or rollover.
50- Get notification on ON/OFF button activity.
51
52For most SoC, there is one on-chip RTC (e.g. in BBNSM) and this is RTC ID 0.
53Board code can add additional GPR and RTC.
54
55GPR are not aggregated. The RTC time is also not aggregated. Setting these
56sets for all so normally exclusive access would be granted to one agent for
57each. However, RTC alarms are maintained for each LM and the hardware is
58programmed with the next nearest alarm time. So only one agent in an LM should
59be given access rights to set an RTC alarm.
60
61Commands:
62_________
63
64PROTOCOL_VERSION
65~~~~~~~~~~~~~~~~
66
67message_id: 0x0
68protocol_id: 0x81
69
70+---------------+--------------------------------------------------------------+
71|Return values                                                                 |
72+---------------+--------------------------------------------------------------+
73|Name           |Description                                                   |
74+---------------+--------------------------------------------------------------+
75|int32 status   | See ARM SCMI Specification for status code definitions.      |
76+---------------+--------------------------------------------------------------+
77|uint32 version | For this revision of the specification, this value must be   |
78|               | 0x10000.                                                     |
79+---------------+--------------------------------------------------------------+
80
81PROTOCOL_ATTRIBUTES
82~~~~~~~~~~~~~~~~~~~
83
84message_id: 0x1
85protocol_id: 0x81
86
87+---------------+--------------------------------------------------------------+
88|Return values                                                                 |
89+------------------+-----------------------------------------------------------+
90|Name              |Description                                                |
91+------------------+-----------------------------------------------------------+
92|int32 status      | See ARM SCMI Specification for status code definitions.   |
93+------------------+-----------------------------------------------------------+
94|uint32 attributes | Bits[31:8] Number of RTCs.                                |
95|                  | Bits[15:0] Number of persistent storage (GPR) words.      |
96+------------------+-----------------------------------------------------------+
97
98PROTOCOL_MESSAGE_ATTRIBUTES
99~~~~~~~~~~~~~~~~~~~~~~~~~~~
100
101message_id: 0x2
102protocol_id: 0x81
103
104+---------------+--------------------------------------------------------------+
105|Return values                                                                 |
106+------------------+-----------------------------------------------------------+
107|Name              |Description                                                |
108+------------------+-----------------------------------------------------------+
109|int32 status      |SUCCESS: in case the message is implemented and available  |
110|                  |to use.                                                    |
111|                  |NOT_FOUND: if the message identified by message_id is      |
112|                  |invalid or not implemented                                 |
113+------------------+-----------------------------------------------------------+
114|uint32 attributes |Flags that are associated with a specific function in the  |
115|                  |protocol. For all functions in this protocol, this         |
116|                  |parameter has a value of 0                                 |
117+------------------+-----------------------------------------------------------+
118
119BBM_GPR_SET
120~~~~~~~~~~~
121
122message_id: 0x3
123protocol_id: 0x81
124
125+------------------+-----------------------------------------------------------+
126|Parameters                                                                    |
127+------------------+-----------------------------------------------------------+
128|Name              |Description                                                |
129+------------------+-----------------------------------------------------------+
130|uint32 index      |Index of GPR to write                                      |
131+------------------+-----------------------------------------------------------+
132|uint32 value      |32-bit value to write to the GPR                           |
133+------------------+-----------------------------------------------------------+
134|Return values                                                                 |
135+------------------+-----------------------------------------------------------+
136|Name              |Description                                                |
137+------------------+-----------------------------------------------------------+
138|int32 status      |SUCCESS: if the GPR was successfully written.              |
139|                  |NOT_FOUND: if the index is not valid.                      |
140|                  |DENIED: if the agent does not have permission to write     |
141|                  |the specified GPR                                          |
142+------------------+-----------------------------------------------------------+
143
144BBM_GPR_GET
145~~~~~~~~~~~
146
147message_id: 0x4
148protocol_id: 0x81
149
150+------------------+-----------------------------------------------------------+
151|Parameters                                                                    |
152+------------------+-----------------------------------------------------------+
153|Name              |Description                                                |
154+------------------+-----------------------------------------------------------+
155|uint32 index      |Index of GPR to read                                       |
156+------------------+-----------------------------------------------------------+
157|Return values                                                                 |
158+------------------+-----------------------------------------------------------+
159|Name              |Description                                                |
160+------------------+-----------------------------------------------------------+
161|int32 status      |SUCCESS: if the GPR was successfully read.                 |
162|                  |NOT_FOUND: if the index is not valid.                      |
163|                  |DENIED: if the agent does not have permission to read      |
164|                  |the specified GPR.                                         |
165+------------------+-----------------------------------------------------------+
166|uint32 value      |32-bit value read from the GPR                             |
167+------------------+-----------------------------------------------------------+
168
169BBM_RTC_ATTRIBUTES
170~~~~~~~~~~~~~~~~~~
171
172message_id: 0x5
173protocol_id: 0x81
174
175+------------------+-----------------------------------------------------------+
176|Parameters                                                                    |
177+------------------+-----------------------------------------------------------+
178|Name              |Description                                                |
179+------------------+-----------------------------------------------------------+
180|uint32 index      |Index of RTC                                               |
181+------------------+-----------------------------------------------------------+
182|Return values                                                                 |
183+------------------+-----------------------------------------------------------+
184|Name              |Description                                                |
185+------------------+-----------------------------------------------------------+
186|int32 status      |SUCCESS: returned the attributes.                          |
187|                  |NOT_FOUND: Index is invalid.                               |
188+------------------+-----------------------------------------------------------+
189|uint32 attributes |Bit[31:24] Bit width of RTC seconds.                       |
190|                  |Bit[23:16] Bit width of RTC ticks.                         |
191|                  |Bits[15:0] RTC ticks per second                            |
192+------------------+-----------------------------------------------------------+
193|uint8 name[16]    |Null-terminated ASCII string of up to 16 bytes in length   |
194|                  |describing the RTC name                                    |
195+------------------+-----------------------------------------------------------+
196
197BBM_RTC_TIME_SET
198~~~~~~~~~~~~~~~~
199
200message_id: 0x6
201protocol_id: 0x81
202
203+------------------+-----------------------------------------------------------+
204|Parameters                                                                    |
205+------------------+-----------------------------------------------------------+
206|Name              |Description                                                |
207+------------------+-----------------------------------------------------------+
208|uint32 index      |Index of RTC                                               |
209+------------------+-----------------------------------------------------------+
210|uint32 flags      |Bits[31:1] Reserved, must be zero.                         |
211|                  |Bit[0] RTC time format:                                    |
212|                  |Set to 1 if the time is in ticks.                          |
213|                  |Set to 0 if the time is in seconds                         |
214+------------------+-----------------------------------------------------------+
215|uint32 time[2]    |Lower word: Lower 32 bits of the time in seconds/ticks.    |
216|                  |Upper word: Upper 32 bits of the time in seconds/ticks.    |
217+------------------+-----------------------------------------------------------+
218|Return values                                                                 |
219+------------------+-----------------------------------------------------------+
220|Name              |Description                                                |
221+------------------+-----------------------------------------------------------+
222|int32 status      |SUCCESS: RTC time was successfully set.                    |
223|                  |NOT_FOUND: rtcId pertains to a non-existent RTC.           |
224|                  |INVALID_PARAMETERS: time is not valid                      |
225|                  |(beyond the range of the RTC).                             |
226|                  |DENIED: the agent does not have permission to set the RTC. |
227+------------------+-----------------------------------------------------------+
228
229BBM_RTC_TIME_GET
230~~~~~~~~~~~~~~~~
231
232message_id: 0x7
233protocol_id: 0x81
234
235+------------------+-----------------------------------------------------------+
236|Parameters                                                                    |
237+------------------+-----------------------------------------------------------+
238|Name              |Description                                                |
239+------------------+-----------------------------------------------------------+
240|uint32 index      |Index of RTC                                               |
241+------------------+-----------------------------------------------------------+
242|uint32 flags      |Bits[31:1] Reserved, must be zero.                         |
243|                  |Bit[0] RTC time format:                                    |
244|                  |Set to 1 if the time is in ticks.                          |
245|                  |Set to 0 if the time is in seconds                         |
246+------------------+-----------------------------------------------------------+
247|Return values                                                                 |
248+------------------+-----------------------------------------------------------+
249|Name              |Description                                                |
250+------------------+-----------------------------------------------------------+
251|int32 status      |SUCCESS: RTC time was successfully get.                    |
252|                  |NOT_FOUND: rtcId pertains to a non-existent RTC.           |
253+------------------+-----------------------------------------------------------+
254|uint32 time[2]    |Lower word: Lower 32 bits of the time in seconds/ticks.    |
255|                  |Upper word: Upper 32 bits of the time in seconds/ticks.    |
256+------------------+-----------------------------------------------------------+
257
258BBM_RTC_ALARM_SET
259~~~~~~~~~~~~~~~~~
260
261message_id: 0x8
262protocol_id: 0x81
263
264+------------------+-----------------------------------------------------------+
265|Parameters                                                                    |
266+------------------+-----------------------------------------------------------+
267|Name              |Description                                                |
268+------------------+-----------------------------------------------------------+
269|uint32 index      |Index of RTC                                               |
270+------------------+-----------------------------------------------------------+
271|uint32 flags      |Bits[31:1] Reserved, must be zero.                         |
272|                  |Bit[0] RTC enable flag:                                    |
273|                  |Set to 1 if the RTC alarm should be enabled.               |
274|                  |Set to 0 if the RTC alarm should be disabled               |
275+------------------+-----------------------------------------------------------+
276|uint32 time[2]    |Lower word: Lower 32 bits of the time in seconds.          |
277|                  |Upper word: Upper 32 bits of the time in seconds.          |
278+------------------+-----------------------------------------------------------+
279|Return values                                                                 |
280+------------------+-----------------------------------------------------------+
281|Name              |Description                                                |
282+------------------+-----------------------------------------------------------+
283|int32 status      |SUCCESS: RTC time was successfully set.                    |
284|                  |NOT_FOUND: rtcId pertains to a non-existent RTC.           |
285|                  |INVALID_PARAMETERS: time is not valid                      |
286|                  |(beyond the range of the RTC).                             |
287|                  |DENIED: the agent does not have permission to set the RTC  |
288|                  |alarm                                                      |
289+------------------+-----------------------------------------------------------+
290
291BBM_BUTTON_GET
292~~~~~~~~~~~~~~
293
294message_id: 0x9
295protocol_id: 0x81
296
297+------------------+-----------------------------------------------------------+
298|Return values                                                                 |
299+------------------+-----------------------------------------------------------+
300|Name              |Description                                                |
301+------------------+-----------------------------------------------------------+
302|int32 status      |SUCCESS: if the button status was read.                    |
303|                  |Other value: ARM SCMI Specification status code definitions|
304+------------------+-----------------------------------------------------------+
305|uint32 state      |State of the ON/OFF button. 1: ON, 0: OFF                  |
306+------------------+-----------------------------------------------------------+
307
308BBM_RTC_NOTIFY
309~~~~~~~~~~~~~~
310
311message_id: 0xA
312protocol_id: 0x81
313
314+------------------+-----------------------------------------------------------+
315|Parameters                                                                    |
316+------------------+-----------------------------------------------------------+
317|Name              |Description                                                |
318+------------------+-----------------------------------------------------------+
319|uint32 index      |Index of RTC                                               |
320+------------------+-----------------------------------------------------------+
321|uint32 flags      |Notification flags                                         |
322|                  |Bits[31:3] Reserved, must be zero.                         |
323|                  |Bit[2] Update enable:                                      |
324|                  |Set to 1 to send notification.                             |
325|                  |Set to 0 if no notification.                               |
326|                  |Bit[1] Rollover enable:                                    |
327|                  |Set to 1 to send notification.                             |
328|                  |Set to 0 if no notification.                               |
329|                  |Bit[0] Alarm enable:                                       |
330|                  |Set to 1 to send notification.                             |
331|                  |Set to 0 if no notification                                |
332+------------------+-----------------------------------------------------------+
333|Return values                                                                 |
334+------------------+-----------------------------------------------------------+
335|Name              |Description                                                |
336+------------------+-----------------------------------------------------------+
337|int32 status      |SUCCESS: notification configuration was successfully       |
338|                  |updated.                                                   |
339|                  |NOT_FOUND: rtcId pertains to a non-existent RTC.           |
340|                  |DENIED: the agent does not have permission to request RTC  |
341|                  |notifications.                                             |
342+------------------+-----------------------------------------------------------+
343
344BBM_BUTTON_NOTIFY
345~~~~~~~~~~~~~~~~~
346
347message_id: 0xB
348protocol_id: 0x81
349
350+------------------+-----------------------------------------------------------+
351|Parameters                                                                    |
352+------------------+-----------------------------------------------------------+
353|Name              |Description                                                |
354+------------------+-----------------------------------------------------------+
355|uint32 flags      |Notification flags                                         |
356|                  |Bits[31:1] Reserved, must be zero.                         |
357|                  |Bit[0] Enable button:                                      |
358|                  |Set to 1 to send notification.                             |
359|                  |Set to 0 if no notification                                |
360+------------------+-----------------------------------------------------------+
361|Return values                                                                 |
362+------------------+-----------------------------------------------------------+
363|Name              |Description                                                |
364+------------------+-----------------------------------------------------------+
365|int32 status      |SUCCESS: notification configuration was successfully       |
366|                  |updated.                                                   |
367|                  |DENIED: the agent does not have permission to request      |
368|                  |button notifications.                                      |
369+------------------+-----------------------------------------------------------+
370
371NEGOTIATE_PROTOCOL_VERSION
372~~~~~~~~~~~~~~~~~~~~~~~~~~
373
374message_id: 0x10
375protocol_id: 0x81
376
377+--------------------+---------------------------------------------------------+
378|Parameters                                                                    |
379+--------------------+---------------------------------------------------------+
380|Name                |Description                                              |
381+--------------------+---------------------------------------------------------+
382|uint32 version      |The negotiated protocol version the agent intends to use |
383+--------------------+---------------------------------------------------------+
384|Return values                                                                 |
385+--------------------+---------------------------------------------------------+
386|Name                |Description                                              |
387+--------------------+---------------------------------------------------------+
388|int32 status        |SUCCESS: if the negotiated protocol version is supported |
389|                    |by the platform. All commands, responses, and            |
390|                    |notifications post successful return of this command must|
391|                    |comply with the negotiated version.                      |
392|                    |NOT_SUPPORTED: if the protocol version is not supported. |
393+--------------------+---------------------------------------------------------+
394
395Notifications
396_____________
397
398BBM_RTC_EVENT
399~~~~~~~~~~~~~
400
401message_id: 0x0
402protocol_id: 0x81
403
404+------------------+-----------------------------------------------------------+
405|Parameters                                                                    |
406+------------------+-----------------------------------------------------------+
407|Name              |Description                                                |
408+------------------+-----------------------------------------------------------+
409|uint32 flags      |RTC events:                                                |
410|                  |Bits[31:2] Reserved, must be zero.                         |
411|                  |Bit[1] RTC rollover notification:                          |
412|                  |1 RTC rollover detected.                                   |
413|                  |0 no RTC rollover detected.                                |
414|                  |Bit[0] RTC alarm notification:                             |
415|                  |1 RTC alarm generated.                                     |
416|                  |0 no RTC alarm generated.                                  |
417+------------------+-----------------------------------------------------------+
418
419BBM_BUTTON_EVENT
420~~~~~~~~~~~~~~~~
421
422message_id: 0x1
423protocol_id: 0x81
424
425+------------------+-----------------------------------------------------------+
426|Parameters                                                                    |
427+------------------+-----------------------------------------------------------+
428|Name              |Description                                                |
429+------------------+-----------------------------------------------------------+
430|uint32 flags      |RTC events:                                                |
431+------------------+-----------------------------------------------------------+
432|                  |Button events:                                             |
433|                  |Bits[31:1] Reserved, must be zero.                         |
434|                  |Bit[0] Button notification:                                |
435|                  |1 button change detected.                                  |
436|                  |0 no button change detected.                               |
437+------------------+-----------------------------------------------------------+
438
439SCMI_MISC: System Control and Management MISC Vendor Protocol
440================================================================
441
442Provides miscellaneous functions. This includes controls that are miscellaneous
443settings/actions that must be exposed from the SM to agents. They are device
444specific and are usually define to access bit fields in various mix block
445control modules, IOMUX_GPR, and other GPR/CSR owned by the SM. This protocol
446supports the following functions:
447
448- Describe the protocol version.
449- Discover implementation attributes.
450- Set/Get a control.
451- Initiate an action on a control.
452- Obtain platform (i.e. SM) build information.
453- Obtain ROM passover data.
454- Read boot/shutdown/reset information for the LM or the system.
455
456Commands:
457_________
458
459PROTOCOL_VERSION
460~~~~~~~~~~~~~~~~
461
462message_id: 0x0
463protocol_id: 0x84
464
465+---------------+--------------------------------------------------------------+
466|Return values                                                                 |
467+---------------+--------------------------------------------------------------+
468|Name           |Description                                                   |
469+---------------+--------------------------------------------------------------+
470|int32 status   | See ARM SCMI Specification for status code definitions.      |
471+---------------+--------------------------------------------------------------+
472|uint32 version | For this revision of the specification, this value must be   |
473|               | 0x10000.                                                     |
474+---------------+--------------------------------------------------------------+
475
476PROTOCOL_ATTRIBUTES
477~~~~~~~~~~~~~~~~~~~
478
479message_id: 0x1
480protocol_id: 0x84
481
482+------------------+-----------------------------------------------------------+
483|Return values                                                                 |
484+------------------+-----------------------------------------------------------+
485|Name              |Description                                                |
486+------------------+-----------------------------------------------------------+
487|int32 status      | See ARM SCMI Specification for status code definitions.   |
488+------------------+-----------------------------------------------------------+
489|uint32 attributes |Protocol attributes:                                       |
490|                  |Bits[31:24] Reserved, must be zero.                        |
491|                  |Bits[23:16] Number of reset reasons.                       |
492|                  |Bits[15:0] Number of controls                              |
493+------------------+-----------------------------------------------------------+
494
495PROTOCOL_MESSAGE_ATTRIBUTES
496~~~~~~~~~~~~~~~~~~~~~~~~~~~
497
498message_id: 0x2
499protocol_id: 0x84
500
501+------------------+-----------------------------------------------------------+
502|Return values                                                                 |
503+------------------+-----------------------------------------------------------+
504|Name              |Description                                                |
505+------------------+-----------------------------------------------------------+
506|int32 status      |SUCCESS: in case the message is implemented and available  |
507|                  |to use.                                                    |
508|                  |NOT_FOUND: if the message identified by message_id is      |
509|                  |invalid or not implemented                                 |
510+------------------+-----------------------------------------------------------+
511|uint32 attributes |Flags that are associated with a specific function in the  |
512|                  |protocol. For all functions in this protocol, this         |
513|                  |parameter has a value of 0                                 |
514+------------------+-----------------------------------------------------------+
515
516MISC_CONTROL_SET
517~~~~~~~~~~~~~~~~
518
519message_id: 0x3
520protocol_id: 0x84
521
522+------------------+-----------------------------------------------------------+
523|Parameters                                                                    |
524+------------------+-----------------------------------------------------------+
525|Name              |Description                                                |
526+------------------+-----------------------------------------------------------+
527|uint32 index      |Index of the control                                       |
528+------------------+-----------------------------------------------------------+
529|uint32 num        |Size of the value data in words                            |
530+------------------+-----------------------------------------------------------+
531|uint32 val[8]     |value data array                                           |
532+------------------+-----------------------------------------------------------+
533|Return values                                                                 |
534+------------------+-----------------------------------------------------------+
535|Name              |Description                                                |
536+------------------+-----------------------------------------------------------+
537|int32 status      |SUCCESS: if the control was set successfully.              |
538|                  |NOT_FOUND: if the index is not valid.                      |
539|                  |DENIED: if the agent does not have permission to set the   |
540|                  |control                                                    |
541+------------------+-----------------------------------------------------------+
542
543MISC_CONTROL_GET
544~~~~~~~~~~~~~~~~
545
546message_id: 0x4
547protocol_id: 0x84
548
549+------------------+-----------------------------------------------------------+
550|Parameters                                                                    |
551+------------------+-----------------------------------------------------------+
552|Name              |Description                                                |
553+------------------+-----------------------------------------------------------+
554|uint32 index      |Index of the control                                       |
555+------------------+-----------------------------------------------------------+
556|Return values                                                                 |
557+------------------+-----------------------------------------------------------+
558|Name              |Description                                                |
559+------------------+-----------------------------------------------------------+
560|int32 status      |SUCCESS: if the control was get successfully.              |
561|                  |NOT_FOUND: if the index is not valid.                      |
562|                  |DENIED: if the agent does not have permission to get the   |
563|                  |control                                                    |
564+------------------+-----------------------------------------------------------+
565|uint32 num        |Size of the return data in words, max 8                    |
566+------------------+-----------------------------------------------------------+
567|uint32            |                                                           |
568|val[0, num - 1]   |value data array                                           |
569+------------------+-----------------------------------------------------------+
570
571MISC_CONTROL_ACTION
572~~~~~~~~~~~~~~~~~~~
573
574message_id: 0x5
575protocol_id: 0x84
576
577+------------------+-----------------------------------------------------------+
578|Parameters                                                                    |
579+------------------+-----------------------------------------------------------+
580|Name              |Description                                                |
581+------------------+-----------------------------------------------------------+
582|uint32 index      |Index of the control                                       |
583+------------------+-----------------------------------------------------------+
584|uint32 action	   |Action for the control                                     |
585+------------------+-----------------------------------------------------------+
586|uint32 numarg	   |Size of the argument data, max 8                           |
587+------------------+-----------------------------------------------------------+
588|uint32            |                                                           |
589|arg[0, numarg -1] |Argument data array                                        |
590+------------------+-----------------------------------------------------------+
591|Return values                                                                 |
592+------------------+-----------------------------------------------------------+
593|Name              |Description                                                |
594+------------------+-----------------------------------------------------------+
595|int32 status      |SUCCESS: if the action was set successfully.               |
596|                  |NOT_FOUND: if the index is not valid.                      |
597|                  |DENIED: if the agent does not have permission to get the   |
598|                  |control                                                    |
599+------------------+-----------------------------------------------------------+
600|uint32 num        |Size of the return data in words, max 8                    |
601+------------------+-----------------------------------------------------------+
602|uint32            |                                                           |
603|val[0, num - 1]   |value data array                                           |
604+------------------+-----------------------------------------------------------+
605
606MISC_DISCOVER_BUILD_INFO
607~~~~~~~~~~~~~~~~~~~~~~~~
608
609This function is used to obtain the build commit, data, time, number.
610
611message_id: 0x6
612protocol_id: 0x84
613
614+------------------+-----------------------------------------------------------+
615|Return values                                                                 |
616+------------------+-----------------------------------------------------------+
617|Name              |Description                                                |
618+------------------+-----------------------------------------------------------+
619|int32 status      |SUCCESS: if the build info was got successfully.           |
620|                  |NOT_SUPPORTED: if the data is not available.               |
621+------------------+-----------------------------------------------------------+
622|uint32 buildnum   |Build number                                               |
623+------------------+-----------------------------------------------------------+
624|uint32 buildcommit|Most significant 32 bits of the git commit hash            |
625+------------------+-----------------------------------------------------------+
626|uint8 date[16]    |Date of build. Null terminated ASCII string of up to 16    |
627|                  |bytes in length                                            |
628+------------------+-----------------------------------------------------------+
629|uint8 time[16]    |Time of build. Null terminated ASCII string of up to 16    |
630|                  |bytes in length                                            |
631+------------------+-----------------------------------------------------------+
632
633MISC_ROM_PASSOVER_GET
634~~~~~~~~~~~~~~~~~~~~~
635
636ROM passover data is information exported by ROM and could be used by others.
637It includes boot device, instance, type, mode and etc. This function is used
638to obtain the ROM passover data. The returned block of words is structured as
639defined in the ROM passover section in the SoC RM.
640
641message_id: 0x7
642protocol_id: 0x84
643
644+------------------+-----------------------------------------------------------+
645|Return values                                                                 |
646+------------------+-----------------------------------------------------------+
647|Name              |Description                                                |
648+------------------+-----------------------------------------------------------+
649|int32 status      |SUCCESS: if the data was got successfully.                 |
650|                  |NOT_SUPPORTED: if the data is not available.               |
651+------------------+-----------------------------------------------------------+
652|uint32 num        |Size of the passover data in words, max 13                 |
653+------------------+-----------------------------------------------------------+
654|uint32            |                                                           |
655|data[0, num - 1]  |Passover data array                                        |
656+------------------+-----------------------------------------------------------+
657
658MISC_CONTROL_NOTIFY
659~~~~~~~~~~~~~~~~~~~
660
661message_id: 0x8
662protocol_id: 0x84
663
664+------------------+-----------------------------------------------------------+
665|Parameters                                                                    |
666+------------------+-----------------------------------------------------------+
667|Name              |Description                                                |
668+------------------+-----------------------------------------------------------+
669|uint32 index      |Index of control                                           |
670+------------------+-----------------------------------------------------------+
671|uint32 flags      |Notification flags, varies by control                      |
672+------------------+-----------------------------------------------------------+
673|Return values                                                                 |
674+------------------+-----------------------------------------------------------+
675|Name              |Description                                                |
676+------------------+-----------------------------------------------------------+
677|int32 status      |SUCCESS: notification configuration was successfully       |
678|                  |updated.                                                   |
679|                  |NOT_FOUND: control id not exists.                          |
680|                  |INVALID_PARAMETERS: if the input attributes flag specifies |
681|                  |unsupported or invalid configurations..                    |
682|                  |DENIED: if the calling agent is not permitted to request   |
683|                  |the notification.                                          |
684+------------------+-----------------------------------------------------------+
685
686MISC_RESET_REASON_ATTRIBUTES
687~~~~~~~~~~~~~~~~~~~~~~~~~~~~
688
689message_id: 0x9
690protocol_id: 0x84
691
692+------------------+-----------------------------------------------------------+
693|Parameters                                                                    |
694+------------------+-----------------------------------------------------------+
695|Name              |Description                                                |
696+------------------+-----------------------------------------------------------+
697|uint32 reasonid   |Identifier for the reason                                  |
698+------------------+-----------------------------------------------------------+
699|Return values                                                                 |
700+------------------+-----------------------------------------------------------+
701|Name              |Description                                                |
702+------------------+-----------------------------------------------------------+
703|int32 status      |SUCCESS: if valid reason attributes are returned           |
704|                  |NOT_FOUND: if reasonId pertains to a non-existent reason.  |
705+------------------+-----------------------------------------------------------+
706|uint32 attributes |Reason attributes. This parameter has the following        |
707|                  |format: Bits[31:0] Reserved, must be zero                  |
708|                  |Bits[15:0] Number of persistent storage (GPR) words.       |
709+------------------+-----------------------------------------------------------+
710|uint8 name[16]    |Null-terminated ASCII string of up to 16 bytes in length   |
711|                  |describing the reason                                      |
712+------------------+-----------------------------------------------------------+
713
714MISC_RESET_REASON_GET
715~~~~~~~~~~~~~~~~~~~~~
716
717message_id: 0xA
718protocol_id: 0x84
719
720+--------------------+---------------------------------------------------------+
721|Parameters                                                                    |
722+--------------------+---------------------------------------------------------+
723|Name                |Description                                              |
724+--------------------+---------------------------------------------------------+
725|uint32 flags        |Reason flags. This parameter has the following format:   |
726|                    |Bits[31:1] Reserved, must be zero.                       |
727|                    |Bit[0] System:                                           |
728|                    |Set to 1 to return the system reason.                    |
729|                    |Set to 0 to return the LM reason                         |
730+--------------------+---------------------------------------------------------+
731|Return values                                                                 |
732+--------------------+---------------------------------------------------------+
733|Name                |Description                                              |
734+--------------------+---------------------------------------------------------+
735|int32 status        |SUCCESS: reset reason return                             |
736+--------------------+---------------------------------------------------------+
737|uint32 bootflags    |Boot reason flags. This parameter has the format:        |
738|                    |Bits[31] Valid.                                          |
739|                    |Set to 1 if the entire reason is valid.                  |
740|                    |Set to 0 if the entire reason is not valid.              |
741|                    |Bits[30:29] Reserved, must be zero.                      |
742|                    |Bit[28] Valid origin:                                    |
743|                    |Set to 1 if the origin field is valid.                   |
744|                    |Set to 0 if the origin field is not valid.               |
745|                    |Bits[27:24] Origin.                                      |
746|                    |Bit[23] Valid err ID:                                    |
747|                    |Set to 1 if the error ID field is valid.                 |
748|                    |Set to 0 if the error ID field is not valid.             |
749|                    |Bits[22:8] Error ID.                                     |
750|                    |Bit[7:0] Reason                                          |
751+--------------------+---------------------------------------------------------+
752|uint32 shutdownflags|Shutdown reason flags. This parameter has the format:    |
753|                    |Bits[31] Valid.                                          |
754|                    |Set to 1 if the entire reason is valid.                  |
755|                    |Set to 0 if the entire reason is not valid.              |
756|                    |Bits[30:29] Number of valid extended info words.         |
757|                    |Bit[28] Valid origin:                                    |
758|                    |Set to 1 if the origin field is valid.                   |
759|                    |Set to 0 if the origin field is not valid.               |
760|                    |Bits[27:24] Origin.                                      |
761|                    |Bit[23] Valid err ID:                                    |
762|                    |Set to 1 if the error ID field is valid.                 |
763|                    |Set to 0 if the error ID field is not valid.             |
764|                    |Bits[22:8] Error ID.                                     |
765|                    |Bit[7:0] Reason                                          |
766+--------------------+---------------------------------------------------------+
767|uint32 extinfo[8]   |Array of extended info words                             |
768+--------------------+---------------------------------------------------------+
769
770MISC_SI_INFO_GET
771~~~~~~~~~~~~~~~~
772
773message_id: 0xB
774protocol_id: 0x84
775
776+--------------------+---------------------------------------------------------+
777|Return values                                                                 |
778+--------------------+---------------------------------------------------------+
779|Name                |Description                                              |
780+--------------------+---------------------------------------------------------+
781|int32 status        |SUCCESS: silicon info return                             |
782+--------------------+---------------------------------------------------------+
783|uint32 deviceid     |Silicon specific device ID                               |
784+--------------------+---------------------------------------------------------+
785|uint32 sirev        |Silicon specific revision                                |
786+--------------------+---------------------------------------------------------+
787|uint32 partnum      |Silicon specific part number                             |
788+--------------------+---------------------------------------------------------+
789|uint8 siname[16]    |Silicon name/revision. Null terminated ASCII string of up|
790|                    |to 16 bytes in length                                    |
791+--------------------+---------------------------------------------------------+
792
793MISC_CFG_INFO_GET
794~~~~~~~~~~~~~~~~~
795
796message_id: 0xC
797protocol_id: 0x84
798
799+--------------------+---------------------------------------------------------+
800|Return values                                                                 |
801+--------------------+---------------------------------------------------------+
802|Name                |Description                                              |
803+--------------------+---------------------------------------------------------+
804|int32 status        |SUCCESS: config name return                              |
805|                    |NOT_SUPPORTED: name not available                        |
806+--------------------+---------------------------------------------------------+
807|uint32 msel         |Mode selector value                                      |
808+--------------------+---------------------------------------------------------+
809|uint8 cfgname[16]   |config file basename. Null terminated ASCII string of up |
810|                    |to 16 bytes in length                                    |
811+--------------------+---------------------------------------------------------+
812
813MISC_SYSLOG_GET
814~~~~~~~~~~~~~~~
815
816message_id: 0xD
817protocol_id: 0x84
818
819+--------------------+---------------------------------------------------------+
820|Parameters                                                                    |
821+--------------------+---------------------------------------------------------+
822|Name                |Description                                              |
823+--------------------+---------------------------------------------------------+
824|uint32 flags        |Device specific flags that might impact the data returned|
825|                    |or clearing of the data                                  |
826+--------------------+---------------------------------------------------------+
827|uint32 logindex     |Index to the first log word. Will be the first element in|
828|                    |the return array                                         |
829+--------------------+---------------------------------------------------------+
830|Return values                                                                 |
831+--------------------+---------------------------------------------------------+
832|Name                |Description                                              |
833+--------------------+---------------------------------------------------------+
834|int32 status        |SUCCESS: system log return                               |
835+--------------------+---------------------------------------------------------+
836|uint32 numLogflags  |Descriptor for the log data returned by this call.       |
837|                    |Bits[31:20] Number of remaining log words.               |
838|                    |Bits[15:12] Reserved, must be zero.                      |
839|                    |Bits[11:0] Number of log words that are returned by this |
840|                    |call                                                     |
841+--------------------+---------------------------------------------------------+
842|uint32 syslog[N]    |Log data array, N is defined in bits[11:0] of numLogflags|
843+--------------------+---------------------------------------------------------+
844
845NEGOTIATE_PROTOCOL_VERSION
846~~~~~~~~~~~~~~~~~~~~~~~~~~
847
848message_id: 0x10
849protocol_id: 0x84
850
851+--------------------+---------------------------------------------------------+
852|Parameters                                                                    |
853+--------------------+---------------------------------------------------------+
854|Name                |Description                                              |
855+--------------------+---------------------------------------------------------+
856|uint32 version      |The negotiated protocol version the agent intends to use |
857+--------------------+---------------------------------------------------------+
858|Return values                                                                 |
859+--------------------+---------------------------------------------------------+
860|Name                |Description                                              |
861+--------------------+---------------------------------------------------------+
862|int32 status        |SUCCESS: if the negotiated protocol version is supported |
863|                    |by the platform. All commands, responses, and            |
864|                    |notifications post successful return of this command must|
865|                    |comply with the negotiated version.                      |
866|                    |NOT_SUPPORTED: if the protocol version is not supported. |
867+--------------------+---------------------------------------------------------+
868
869Notifications
870_____________
871
872MISC_CONTROL_EVENT
873~~~~~~~~~~~~~~~~~~
874
875message_id: 0x0
876protocol_id: 0x81
877
878+------------------+-----------------------------------------------------------+
879|Parameters                                                                    |
880+------------------+-----------------------------------------------------------+
881|Name              |Description                                                |
882+------------------+-----------------------------------------------------------+
883|uint32 ctrlid     |Identifier for the control that caused the event.          |
884+------------------+-----------------------------------------------------------+
885|uint32 flags      |Event flags, varies by control.                            |
886+------------------+-----------------------------------------------------------+
887