Merge drm/drm-next into drm-intel-next-queued
[linux-2.6-microblaze.git] / include / linux / firmware / imx / svc / misc.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (C) 2016 Freescale Semiconductor, Inc.
4  * Copyright 2017~2018 NXP
5  *
6  * Header file containing the public API for the System Controller (SC)
7  * Miscellaneous (MISC) function.
8  *
9  * MISC_SVC (SVC) Miscellaneous Service
10  *
11  * Module for the Miscellaneous (MISC) service.
12  */
13
14 #ifndef _SC_MISC_API_H
15 #define _SC_MISC_API_H
16
17 #include <linux/firmware/imx/sci.h>
18
19 /*
20  * This type is used to indicate RPC MISC function calls.
21  */
22 enum imx_misc_func {
23         IMX_SC_MISC_FUNC_UNKNOWN = 0,
24         IMX_SC_MISC_FUNC_SET_CONTROL = 1,
25         IMX_SC_MISC_FUNC_GET_CONTROL = 2,
26         IMX_SC_MISC_FUNC_SET_MAX_DMA_GROUP = 4,
27         IMX_SC_MISC_FUNC_SET_DMA_GROUP = 5,
28         IMX_SC_MISC_FUNC_SECO_IMAGE_LOAD = 8,
29         IMX_SC_MISC_FUNC_SECO_AUTHENTICATE = 9,
30         IMX_SC_MISC_FUNC_DEBUG_OUT = 10,
31         IMX_SC_MISC_FUNC_WAVEFORM_CAPTURE = 6,
32         IMX_SC_MISC_FUNC_BUILD_INFO = 15,
33         IMX_SC_MISC_FUNC_UNIQUE_ID = 19,
34         IMX_SC_MISC_FUNC_SET_ARI = 3,
35         IMX_SC_MISC_FUNC_BOOT_STATUS = 7,
36         IMX_SC_MISC_FUNC_BOOT_DONE = 14,
37         IMX_SC_MISC_FUNC_OTP_FUSE_READ = 11,
38         IMX_SC_MISC_FUNC_OTP_FUSE_WRITE = 17,
39         IMX_SC_MISC_FUNC_SET_TEMP = 12,
40         IMX_SC_MISC_FUNC_GET_TEMP = 13,
41         IMX_SC_MISC_FUNC_GET_BOOT_DEV = 16,
42         IMX_SC_MISC_FUNC_GET_BUTTON_STATUS = 18,
43 };
44
45 /*
46  * Control Functions
47  */
48
49 int imx_sc_misc_set_control(struct imx_sc_ipc *ipc, u32 resource,
50                             u8 ctrl, u32 val);
51
52 int imx_sc_misc_get_control(struct imx_sc_ipc *ipc, u32 resource,
53                             u8 ctrl, u32 *val);
54
55 int imx_sc_pm_cpu_start(struct imx_sc_ipc *ipc, u32 resource,
56                         bool enable, u64 phys_addr);
57
58 #endif /* _SC_MISC_API_H */