1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * SCMI Message Protocol driver header
5 * Copyright (C) 2018-2021 ARM Ltd.
8 #ifndef _LINUX_SCMI_PROTOCOL_H
9 #define _LINUX_SCMI_PROTOCOL_H
11 #include <linux/bitfield.h>
12 #include <linux/device.h>
13 #include <linux/notifier.h>
14 #include <linux/types.h>
16 #define SCMI_MAX_STR_SIZE 16
17 #define SCMI_MAX_NUM_RATES 16
20 * struct scmi_revision_info - version information structure
22 * @major_ver: Major ABI version. Change here implies risk of backward
23 * compatibility break.
24 * @minor_ver: Minor ABI version. Change here implies new feature addition,
25 * or compatible change in ABI.
26 * @num_protocols: Number of protocols that are implemented, excluding the
28 * @num_agents: Number of agents in the system.
29 * @impl_ver: A vendor-specific implementation version.
30 * @vendor_id: A vendor identifier(Null terminated ASCII string)
31 * @sub_vendor_id: A sub-vendor identifier(Null terminated ASCII string)
33 struct scmi_revision_info {
39 char vendor_id[SCMI_MAX_STR_SIZE];
40 char sub_vendor_id[SCMI_MAX_STR_SIZE];
43 struct scmi_clock_info {
44 char name[SCMI_MAX_STR_SIZE];
49 u64 rates[SCMI_MAX_NUM_RATES];
61 struct scmi_protocol_handle;
64 * struct scmi_clk_ops - represents the various operations provided
65 * by SCMI Clock Protocol
67 * @count_get: get the count of clocks provided by SCMI
68 * @info_get: get the information of the specified clock
69 * @rate_get: request the current clock rate of a clock
70 * @rate_set: set the clock rate of a clock
71 * @enable: enables the specified clock
72 * @disable: disables the specified clock
75 int (*count_get)(const struct scmi_handle *handle);
77 const struct scmi_clock_info *(*info_get)
78 (const struct scmi_handle *handle, u32 clk_id);
79 int (*rate_get)(const struct scmi_handle *handle, u32 clk_id,
81 int (*rate_set)(const struct scmi_handle *handle, u32 clk_id,
83 int (*enable)(const struct scmi_handle *handle, u32 clk_id);
84 int (*disable)(const struct scmi_handle *handle, u32 clk_id);
88 * struct scmi_perf_proto_ops - represents the various operations provided
89 * by SCMI Performance Protocol
91 * @limits_set: sets limits on the performance level of a domain
92 * @limits_get: gets limits on the performance level of a domain
93 * @level_set: sets the performance level of a domain
94 * @level_get: gets the performance level of a domain
95 * @device_domain_id: gets the scmi domain id for a given device
96 * @transition_latency_get: gets the DVFS transition latency for a given device
97 * @device_opps_add: adds all the OPPs for a given device
98 * @freq_set: sets the frequency for a given device using sustained frequency
99 * to sustained performance level mapping
100 * @freq_get: gets the frequency for a given device using sustained frequency
101 * to sustained performance level mapping
102 * @est_power_get: gets the estimated power cost for a given performance domain
103 * at a given frequency
105 struct scmi_perf_proto_ops {
106 int (*limits_set)(const struct scmi_protocol_handle *ph, u32 domain,
107 u32 max_perf, u32 min_perf);
108 int (*limits_get)(const struct scmi_protocol_handle *ph, u32 domain,
109 u32 *max_perf, u32 *min_perf);
110 int (*level_set)(const struct scmi_protocol_handle *ph, u32 domain,
111 u32 level, bool poll);
112 int (*level_get)(const struct scmi_protocol_handle *ph, u32 domain,
113 u32 *level, bool poll);
114 int (*device_domain_id)(struct device *dev);
115 int (*transition_latency_get)(const struct scmi_protocol_handle *ph,
117 int (*device_opps_add)(const struct scmi_protocol_handle *ph,
119 int (*freq_set)(const struct scmi_protocol_handle *ph, u32 domain,
120 unsigned long rate, bool poll);
121 int (*freq_get)(const struct scmi_protocol_handle *ph, u32 domain,
122 unsigned long *rate, bool poll);
123 int (*est_power_get)(const struct scmi_protocol_handle *ph, u32 domain,
124 unsigned long *rate, unsigned long *power);
125 bool (*fast_switch_possible)(const struct scmi_protocol_handle *ph,
127 bool (*power_scale_mw_get)(const struct scmi_protocol_handle *ph);
131 * struct scmi_power_proto_ops - represents the various operations provided
132 * by SCMI Power Protocol
134 * @num_domains_get: get the count of power domains provided by SCMI
135 * @name_get: gets the name of a power domain
136 * @state_set: sets the power state of a power domain
137 * @state_get: gets the power state of a power domain
139 struct scmi_power_proto_ops {
140 int (*num_domains_get)(const struct scmi_protocol_handle *ph);
141 char *(*name_get)(const struct scmi_protocol_handle *ph, u32 domain);
142 #define SCMI_POWER_STATE_TYPE_SHIFT 30
143 #define SCMI_POWER_STATE_ID_MASK (BIT(28) - 1)
144 #define SCMI_POWER_STATE_PARAM(type, id) \
145 ((((type) & BIT(0)) << SCMI_POWER_STATE_TYPE_SHIFT) | \
146 ((id) & SCMI_POWER_STATE_ID_MASK))
147 #define SCMI_POWER_STATE_GENERIC_ON SCMI_POWER_STATE_PARAM(0, 0)
148 #define SCMI_POWER_STATE_GENERIC_OFF SCMI_POWER_STATE_PARAM(1, 0)
149 int (*state_set)(const struct scmi_protocol_handle *ph, u32 domain,
151 int (*state_get)(const struct scmi_protocol_handle *ph, u32 domain,
155 struct scmi_power_ops {
156 int (*num_domains_get)(const struct scmi_handle *handle);
157 char *(*name_get)(const struct scmi_handle *handle, u32 domain);
158 int (*state_set)(const struct scmi_handle *handle, u32 domain,
160 int (*state_get)(const struct scmi_handle *handle, u32 domain,
165 * scmi_sensor_reading - represent a timestamped read
167 * Used by @reading_get_timestamped method.
169 * @value: The signed value sensor read.
170 * @timestamp: An unsigned timestamp for the sensor read, as provided by
171 * SCMI platform. Set to zero when not available.
173 struct scmi_sensor_reading {
175 unsigned long long timestamp;
179 * scmi_range_attrs - specifies a sensor or axis values' range
180 * @min_range: The minimum value which can be represented by the sensor/axis.
181 * @max_range: The maximum value which can be represented by the sensor/axis.
183 struct scmi_range_attrs {
189 * scmi_sensor_axis_info - describes one sensor axes
191 * @type: Axes type. Chosen amongst one of @enum scmi_sensor_class.
192 * @scale: Power-of-10 multiplier applied to the axis unit.
193 * @name: NULL-terminated string representing axes name as advertised by
195 * @extended_attrs: Flag to indicate the presence of additional extended
196 * attributes for this axes.
197 * @resolution: Extended attribute representing the resolution of the axes.
198 * Set to 0 if not reported by this axes.
199 * @exponent: Extended attribute representing the power-of-10 multiplier that
200 * is applied to the resolution field. Set to 0 if not reported by
202 * @attrs: Extended attributes representing minimum and maximum values
203 * measurable by this axes. Set to 0 if not reported by this sensor.
205 struct scmi_sensor_axis_info {
209 char name[SCMI_MAX_STR_SIZE];
211 unsigned int resolution;
213 struct scmi_range_attrs attrs;
217 * scmi_sensor_intervals_info - describes number and type of available update
219 * @segmented: Flag for segmented intervals' representation. When True there
220 * will be exactly 3 intervals in @desc, with each entry
221 * representing a member of a segment in this order:
222 * {lowest update interval, highest update interval, step size}
223 * @count: Number of intervals described in @desc.
224 * @desc: Array of @count interval descriptor bitmask represented as detailed in
225 * the SCMI specification: it can be accessed using the accompanying
227 * @prealloc_pool: A minimal preallocated pool of desc entries used to avoid
228 * lesser-than-64-bytes dynamic allocation for small @count
231 struct scmi_sensor_intervals_info {
234 #define SCMI_SENS_INTVL_SEGMENT_LOW 0
235 #define SCMI_SENS_INTVL_SEGMENT_HIGH 1
236 #define SCMI_SENS_INTVL_SEGMENT_STEP 2
238 #define SCMI_SENS_INTVL_GET_SECS(x) FIELD_GET(GENMASK(20, 5), (x))
239 #define SCMI_SENS_INTVL_GET_EXP(x) \
241 int __signed_exp = FIELD_GET(GENMASK(4, 0), (x)); \
243 if (__signed_exp & BIT(4)) \
244 __signed_exp |= GENMASK(31, 5); \
247 #define SCMI_MAX_PREALLOC_POOL 16
248 unsigned int prealloc_pool[SCMI_MAX_PREALLOC_POOL];
252 * struct scmi_sensor_info - represents information related to one of the
255 * @type: Sensor type. Chosen amongst one of @enum scmi_sensor_class.
256 * @scale: Power-of-10 multiplier applied to the sensor unit.
257 * @num_trip_points: Number of maximum configurable trip points.
258 * @async: Flag for asynchronous read support.
259 * @update: Flag for continuouos update notification support.
260 * @timestamped: Flag for timestamped read support.
261 * @tstamp_scale: Power-of-10 multiplier applied to the sensor timestamps to
262 * represent it in seconds.
263 * @num_axis: Number of supported axis if any. Reported as 0 for scalar sensors.
264 * @axis: Pointer to an array of @num_axis descriptors.
265 * @intervals: Descriptor of available update intervals.
266 * @sensor_config: A bitmask reporting the current sensor configuration as
267 * detailed in the SCMI specification: it can accessed and
268 * modified through the accompanying macros.
269 * @name: NULL-terminated string representing sensor name as advertised by
271 * @extended_scalar_attrs: Flag to indicate the presence of additional extended
272 * attributes for this sensor.
273 * @sensor_power: Extended attribute representing the average power
274 * consumed by the sensor in microwatts (uW) when it is active.
275 * Reported here only for scalar sensors.
276 * Set to 0 if not reported by this sensor.
277 * @resolution: Extended attribute representing the resolution of the sensor.
278 * Reported here only for scalar sensors.
279 * Set to 0 if not reported by this sensor.
280 * @exponent: Extended attribute representing the power-of-10 multiplier that is
281 * applied to the resolution field.
282 * Reported here only for scalar sensors.
283 * Set to 0 if not reported by this sensor.
284 * @scalar_attrs: Extended attributes representing minimum and maximum
285 * measurable values by this sensor.
286 * Reported here only for scalar sensors.
287 * Set to 0 if not reported by this sensor.
289 struct scmi_sensor_info {
293 unsigned int num_trip_points;
298 unsigned int num_axis;
299 struct scmi_sensor_axis_info *axis;
300 struct scmi_sensor_intervals_info intervals;
301 unsigned int sensor_config;
302 #define SCMI_SENS_CFG_UPDATE_SECS_MASK GENMASK(31, 16)
303 #define SCMI_SENS_CFG_GET_UPDATE_SECS(x) \
304 FIELD_GET(SCMI_SENS_CFG_UPDATE_SECS_MASK, (x))
306 #define SCMI_SENS_CFG_UPDATE_EXP_MASK GENMASK(15, 11)
307 #define SCMI_SENS_CFG_GET_UPDATE_EXP(x) \
310 FIELD_GET(SCMI_SENS_CFG_UPDATE_EXP_MASK, (x)); \
312 if (__signed_exp & BIT(4)) \
313 __signed_exp |= GENMASK(31, 5); \
317 #define SCMI_SENS_CFG_ROUND_MASK GENMASK(10, 9)
318 #define SCMI_SENS_CFG_ROUND_AUTO 2
319 #define SCMI_SENS_CFG_ROUND_UP 1
320 #define SCMI_SENS_CFG_ROUND_DOWN 0
322 #define SCMI_SENS_CFG_TSTAMP_ENABLED_MASK BIT(1)
323 #define SCMI_SENS_CFG_TSTAMP_ENABLE 1
324 #define SCMI_SENS_CFG_TSTAMP_DISABLE 0
325 #define SCMI_SENS_CFG_IS_TSTAMP_ENABLED(x) \
326 FIELD_GET(SCMI_SENS_CFG_TSTAMP_ENABLED_MASK, (x))
328 #define SCMI_SENS_CFG_SENSOR_ENABLED_MASK BIT(0)
329 #define SCMI_SENS_CFG_SENSOR_ENABLE 1
330 #define SCMI_SENS_CFG_SENSOR_DISABLE 0
331 char name[SCMI_MAX_STR_SIZE];
332 #define SCMI_SENS_CFG_IS_ENABLED(x) FIELD_GET(BIT(0), (x))
333 bool extended_scalar_attrs;
334 unsigned int sensor_power;
335 unsigned int resolution;
337 struct scmi_range_attrs scalar_attrs;
341 * Partial list from Distributed Management Task Force (DMTF) specification:
342 * DSP0249 (Platform Level Data Model specification)
344 enum scmi_sensor_class {
414 NEWTON_METERS = 0x45,
425 CORRECTED_ERRS = 0x50,
426 UNCORRECTABLE_ERRS = 0x51,
434 METERS_SEC_SQUARED = 0x59,
436 CUBIC_METERS_SEC = 0x5B,
438 RADIANS_SEC_SQUARED = 0x5D,
443 * struct scmi_sensor_ops - represents the various operations provided
444 * by SCMI Sensor Protocol
446 * @count_get: get the count of sensors provided by SCMI
447 * @info_get: get the information of the specified sensor
448 * @trip_point_config: selects and configures a trip-point of interest
449 * @reading_get: gets the current value of the sensor
450 * @reading_get_timestamped: gets the current value and timestamp, when
451 * available, of the sensor. (as of v3.0 spec)
452 * Supports multi-axis sensors for sensors which
453 * supports it and if the @reading array size of
454 * @count entry equals the sensor num_axis
455 * @config_get: Get sensor current configuration
456 * @config_set: Set sensor current configuration
458 struct scmi_sensor_ops {
459 int (*count_get)(const struct scmi_handle *handle);
460 const struct scmi_sensor_info *(*info_get)
461 (const struct scmi_handle *handle, u32 sensor_id);
462 int (*trip_point_config)(const struct scmi_handle *handle,
463 u32 sensor_id, u8 trip_id, u64 trip_value);
464 int (*reading_get)(const struct scmi_handle *handle, u32 sensor_id,
466 int (*reading_get_timestamped)(const struct scmi_handle *handle,
467 u32 sensor_id, u8 count,
468 struct scmi_sensor_reading *readings);
469 int (*config_get)(const struct scmi_handle *handle,
470 u32 sensor_id, u32 *sensor_config);
471 int (*config_set)(const struct scmi_handle *handle,
472 u32 sensor_id, u32 sensor_config);
476 * struct scmi_reset_ops - represents the various operations provided
477 * by SCMI Reset Protocol
479 * @num_domains_get: get the count of reset domains provided by SCMI
480 * @name_get: gets the name of a reset domain
481 * @latency_get: gets the reset latency for the specified reset domain
482 * @reset: resets the specified reset domain
483 * @assert: explicitly assert reset signal of the specified reset domain
484 * @deassert: explicitly deassert reset signal of the specified reset domain
486 struct scmi_reset_ops {
487 int (*num_domains_get)(const struct scmi_handle *handle);
488 char *(*name_get)(const struct scmi_handle *handle, u32 domain);
489 int (*latency_get)(const struct scmi_handle *handle, u32 domain);
490 int (*reset)(const struct scmi_handle *handle, u32 domain);
491 int (*assert)(const struct scmi_handle *handle, u32 domain);
492 int (*deassert)(const struct scmi_handle *handle, u32 domain);
496 * struct scmi_voltage_info - describe one available SCMI Voltage Domain
498 * @id: the domain ID as advertised by the platform
499 * @segmented: defines the layout of the entries of array @levels_uv.
500 * - when True the entries are to be interpreted as triplets,
501 * each defining a segment representing a range of equally
502 * space voltages: <lowest_volts>, <highest_volt>, <step_uV>
503 * - when False the entries simply represent a single discrete
504 * supported voltage level
505 * @negative_volts_allowed: True if any of the entries of @levels_uv represent
506 * a negative voltage.
507 * @attributes: represents Voltage Domain advertised attributes
508 * @name: name assigned to the Voltage Domain by platform
509 * @num_levels: number of total entries in @levels_uv.
510 * @levels_uv: array of entries describing the available voltage levels for
513 struct scmi_voltage_info {
516 bool negative_volts_allowed;
517 unsigned int attributes;
518 char name[SCMI_MAX_STR_SIZE];
519 unsigned int num_levels;
520 #define SCMI_VOLTAGE_SEGMENT_LOW 0
521 #define SCMI_VOLTAGE_SEGMENT_HIGH 1
522 #define SCMI_VOLTAGE_SEGMENT_STEP 2
527 * struct scmi_voltage_ops - represents the various operations provided
528 * by SCMI Voltage Protocol
530 * @num_domains_get: get the count of voltage domains provided by SCMI
531 * @info_get: get the information of the specified domain
532 * @config_set: set the config for the specified domain
533 * @config_get: get the config of the specified domain
534 * @level_set: set the voltage level for the specified domain
535 * @level_get: get the voltage level of the specified domain
537 struct scmi_voltage_ops {
538 int (*num_domains_get)(const struct scmi_handle *handle);
539 const struct scmi_voltage_info __must_check *(*info_get)
540 (const struct scmi_handle *handle, u32 domain_id);
541 int (*config_set)(const struct scmi_handle *handle, u32 domain_id,
543 #define SCMI_VOLTAGE_ARCH_STATE_OFF 0x0
544 #define SCMI_VOLTAGE_ARCH_STATE_ON 0x7
545 int (*config_get)(const struct scmi_handle *handle, u32 domain_id,
547 int (*level_set)(const struct scmi_handle *handle, u32 domain_id,
548 u32 flags, s32 volt_uV);
549 int (*level_get)(const struct scmi_handle *handle, u32 domain_id,
554 * struct scmi_notify_ops - represents notifications' operations provided by
556 * @devm_event_notifier_register: Managed registration of a notifier_block for
557 * the requested event
558 * @devm_event_notifier_unregister: Managed unregistration of a notifier_block
559 * for the requested event
560 * @register_event_notifier: Register a notifier_block for the requested event
561 * @unregister_event_notifier: Unregister a notifier_block for the requested
564 * A user can register/unregister its own notifier_block against the wanted
565 * platform instance regarding the desired event identified by the
566 * tuple: (proto_id, evt_id, src_id) using the provided register/unregister
569 * @sdev: The scmi_device to use when calling the devres managed ops devm_
570 * @handle: The handle identifying the platform instance to use, when not
571 * calling the managed ops devm_
572 * @proto_id: The protocol ID as in SCMI Specification
573 * @evt_id: The message ID of the desired event as in SCMI Specification
574 * @src_id: A pointer to the desired source ID if different sources are
575 * possible for the protocol (like domain_id, sensor_id...etc)
577 * @src_id can be provided as NULL if it simply does NOT make sense for
578 * the protocol at hand, OR if the user is explicitly interested in
579 * receiving notifications from ANY existent source associated to the
580 * specified proto_id / evt_id.
582 * Received notifications are finally delivered to the registered users,
583 * invoking the callback provided with the notifier_block *nb as follows:
585 * int user_cb(nb, evt_id, report)
589 * @nb: The notifier block provided by the user
590 * @evt_id: The message ID of the delivered event
591 * @report: A custom struct describing the specific event delivered
593 struct scmi_notify_ops {
594 int (*devm_event_notifier_register)(struct scmi_device *sdev,
595 u8 proto_id, u8 evt_id,
597 struct notifier_block *nb);
598 int (*devm_event_notifier_unregister)(struct scmi_device *sdev,
599 u8 proto_id, u8 evt_id,
601 struct notifier_block *nb);
602 int (*register_event_notifier)(const struct scmi_handle *handle,
603 u8 proto_id, u8 evt_id,
605 struct notifier_block *nb);
606 int (*unregister_event_notifier)(const struct scmi_handle *handle,
607 u8 proto_id, u8 evt_id,
609 struct notifier_block *nb);
613 * struct scmi_handle - Handle returned to ARM SCMI clients for usage.
615 * @dev: pointer to the SCMI device
616 * @version: pointer to the structure containing SCMI version information
617 * @power_ops: pointer to set of power protocol operations
618 * @clk_ops: pointer to set of clock protocol operations
619 * @sensor_ops: pointer to set of sensor protocol operations
620 * @reset_ops: pointer to set of reset protocol operations
621 * @voltage_ops: pointer to set of voltage protocol operations
622 * @devm_protocol_get: devres managed method to acquire a protocol and get specific
623 * operations and a dedicated protocol handler
624 * @devm_protocol_put: devres managed method to release a protocol
625 * @notify_ops: pointer to set of notifications related operations
626 * @clk_priv: pointer to private data structure specific to clock
627 * protocol(for internal use only)
628 * @sensor_priv: pointer to private data structure specific to sensors
629 * protocol(for internal use only)
630 * @reset_priv: pointer to private data structure specific to reset
631 * protocol(for internal use only)
632 * @voltage_priv: pointer to private data structure specific to voltage
633 * protocol(for internal use only)
634 * @notify_priv: pointer to private data structure specific to notifications
635 * (for internal use only)
639 struct scmi_revision_info *version;
640 const struct scmi_clk_ops *clk_ops;
641 const struct scmi_power_ops *power_ops;
642 const struct scmi_sensor_ops *sensor_ops;
643 const struct scmi_reset_ops *reset_ops;
644 const struct scmi_voltage_ops *voltage_ops;
646 const void __must_check *
647 (*devm_protocol_get)(struct scmi_device *sdev, u8 proto,
648 struct scmi_protocol_handle **ph);
649 void (*devm_protocol_put)(struct scmi_device *sdev, u8 proto);
651 const struct scmi_notify_ops *notify_ops;
652 /* for protocol internal use */
661 enum scmi_std_protocol {
662 SCMI_PROTOCOL_BASE = 0x10,
663 SCMI_PROTOCOL_POWER = 0x11,
664 SCMI_PROTOCOL_SYSTEM = 0x12,
665 SCMI_PROTOCOL_PERF = 0x13,
666 SCMI_PROTOCOL_CLOCK = 0x14,
667 SCMI_PROTOCOL_SENSOR = 0x15,
668 SCMI_PROTOCOL_RESET = 0x16,
669 SCMI_PROTOCOL_VOLTAGE = 0x17,
672 enum scmi_system_events {
673 SCMI_SYSTEM_SHUTDOWN,
674 SCMI_SYSTEM_COLDRESET,
675 SCMI_SYSTEM_WARMRESET,
686 struct scmi_handle *handle;
689 #define to_scmi_dev(d) container_of(d, struct scmi_device, dev)
692 scmi_device_create(struct device_node *np, struct device *parent, int protocol,
694 void scmi_device_destroy(struct scmi_device *scmi_dev);
696 struct scmi_device_id {
703 int (*probe)(struct scmi_device *sdev);
704 void (*remove)(struct scmi_device *sdev);
705 const struct scmi_device_id *id_table;
707 struct device_driver driver;
710 #define to_scmi_driver(d) container_of(d, struct scmi_driver, driver)
712 #if IS_REACHABLE(CONFIG_ARM_SCMI_PROTOCOL)
713 int scmi_driver_register(struct scmi_driver *driver,
714 struct module *owner, const char *mod_name);
715 void scmi_driver_unregister(struct scmi_driver *driver);
718 scmi_driver_register(struct scmi_driver *driver, struct module *owner,
719 const char *mod_name)
724 static inline void scmi_driver_unregister(struct scmi_driver *driver) {}
725 #endif /* CONFIG_ARM_SCMI_PROTOCOL */
727 #define scmi_register(driver) \
728 scmi_driver_register(driver, THIS_MODULE, KBUILD_MODNAME)
729 #define scmi_unregister(driver) \
730 scmi_driver_unregister(driver)
733 * module_scmi_driver() - Helper macro for registering a scmi driver
734 * @__scmi_driver: scmi_driver structure
736 * Helper macro for scmi drivers to set up proper module init / exit
737 * functions. Replaces module_init() and module_exit() and keeps people from
738 * printing pointless things to the kernel log when their driver is loaded.
740 #define module_scmi_driver(__scmi_driver) \
741 module_driver(__scmi_driver, scmi_register, scmi_unregister)
743 struct scmi_protocol;
744 int scmi_protocol_register(const struct scmi_protocol *proto);
745 void scmi_protocol_unregister(const struct scmi_protocol *proto);
747 /* SCMI Notification API - Custom Event Reports */
748 enum scmi_notification_events {
749 SCMI_EVENT_POWER_STATE_CHANGED = 0x0,
750 SCMI_EVENT_PERFORMANCE_LIMITS_CHANGED = 0x0,
751 SCMI_EVENT_PERFORMANCE_LEVEL_CHANGED = 0x1,
752 SCMI_EVENT_SENSOR_TRIP_POINT_EVENT = 0x0,
753 SCMI_EVENT_SENSOR_UPDATE = 0x1,
754 SCMI_EVENT_RESET_ISSUED = 0x0,
755 SCMI_EVENT_BASE_ERROR_EVENT = 0x0,
756 SCMI_EVENT_SYSTEM_POWER_STATE_NOTIFIER = 0x0,
759 struct scmi_power_state_changed_report {
761 unsigned int agent_id;
762 unsigned int domain_id;
763 unsigned int power_state;
766 struct scmi_system_power_state_notifier_report {
768 unsigned int agent_id;
770 unsigned int system_state;
773 struct scmi_perf_limits_report {
775 unsigned int agent_id;
776 unsigned int domain_id;
777 unsigned int range_max;
778 unsigned int range_min;
781 struct scmi_perf_level_report {
783 unsigned int agent_id;
784 unsigned int domain_id;
785 unsigned int performance_level;
788 struct scmi_sensor_trip_point_report {
790 unsigned int agent_id;
791 unsigned int sensor_id;
792 unsigned int trip_point_desc;
795 struct scmi_sensor_update_report {
797 unsigned int agent_id;
798 unsigned int sensor_id;
799 unsigned int readings_count;
800 struct scmi_sensor_reading readings[];
803 struct scmi_reset_issued_report {
805 unsigned int agent_id;
806 unsigned int domain_id;
807 unsigned int reset_state;
810 struct scmi_base_error_report {
812 unsigned int agent_id;
814 unsigned int cmd_count;
815 unsigned long long reports[];
818 #endif /* _LINUX_SCMI_PROTOCOL_H */