1 /*
2  * Copyright (c) 2016, Freescale Semiconductor, Inc.
3  * Copyright 2017-2020 NXP
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  *
7  * Redistribution and use in source and binary forms, with or without modification,
8  * are permitted provided that the following conditions are met:
9  *
10  * o Redistributions of source code must retain the above copyright notice, this list
11  *   of conditions and the following disclaimer.
12  *
13  * o Redistributions in binary form must reproduce the above copyright notice, this
14  *   list of conditions and the following disclaimer in the documentation and/or
15  *   other materials provided with the distribution.
16  *
17  * o Neither the name of the copyright holder nor the names of its
18  *   contributors may be used to endorse or promote products derived from this
19  *   software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
22  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
25  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
28  * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
33 /*!
34  * Header file containing the public API for the System Controller (SC)
35  * Pad Control (PAD) function.
36  *
37  * @addtogroup PAD_SVC PAD: Pad Service
38  *
39  * Module for the Pad Control (PAD) service.
40  *
41  * @details
42  *
43  * Pad configuration is managed by SC firmware. The pad configuration
44  * features supported by the SC firmware include:
45  *
46  * - Configuring the mux, input/output connection, and low-power isolation
47      mode.
48  * - Configuring the technology-specific pad setting such as drive strength,
49  *   pullup/pulldown, etc.
50  * - Configuring compensation for pad groups with dual voltage capability.
51  *
52  * Pad functions fall into one of three categories. Generic functions are
53  * common to all SoCs and all process technologies. SoC functions are raw
54  * low-level functions. Technology-specific functions are specific to the
55  * process technology.
56  *
57  * The list of pads is SoC specific.  Refer to the SoC [Pad List](@ref PADS)
58  * for valid pad values. Note that all pads exist on a die but may or
59  * may not be brought out by the specific package.  Mapping of pads to
60  * package pins/balls is documented in the associated Data Sheet. Some pads
61  * may not be brought out because the part (die+package) is defeatured and
62  * some pads may connect to the substrate in the package.
63  *
64  * Some pads (SC_P_COMP_*) that can be specified are not individual pads
65  * but are in fact pad groups. These groups have additional configuration
66  * that can be done using the sc_pad_set_gp_28fdsoi_comp() function. More
67  * info on these can be found in the associated Reference Manual.
68  *
69  * Pads are managed as a resource by the Resource Manager (RM).  They have
70  * assigned owners and only the owners can configure the pads. Some of the
71  * pads are reserved for use by the SCFW itself and this can be overridden
72  * with the implementation of board_config_sc(). Additionally, pads may
73  * be assigned to various other partitions via the implementation of
74  * board_system_config().
75  *
76  * Note muxing two input pads to the same IP functional signal will
77  * result in undefined behavior.
78  *
79  * @includedoc pad/details.dox
80  *
81  * @{
82  */
83 
84 #ifndef SC_PAD_API_H
85 #define SC_PAD_API_H
86 
87 /* Includes */
88 
89 #include "main/types.h"
90 #include "svc/rm/rm_api.h"
91 
92 /* Defines */
93 
94 /*!
95  * @name Defines for type widths
96  */
97 /*@{*/
98 #define SC_PAD_MUX_W            3U    /*!< Width of mux parameter */
99 /*@}*/
100 
101 /*!
102  * @name Defines for sc_pad_config_t
103  */
104 /*@{*/
105 #define SC_PAD_CONFIG_NORMAL    0U    /*!< Normal */
106 #define SC_PAD_CONFIG_OD        1U    /*!< Open Drain */
107 #define SC_PAD_CONFIG_OD_IN     2U    /*!< Open Drain and input */
108 #define SC_PAD_CONFIG_OUT_IN    3U    /*!< Output and input */
109 /*@}*/
110 
111 /*!
112  * @name Defines for sc_pad_iso_t
113  */
114 /*@{*/
115 #define SC_PAD_ISO_OFF          0U    /*!< ISO latch is transparent */
116 #define SC_PAD_ISO_EARLY        1U    /*!< Follow EARLY_ISO */
117 #define SC_PAD_ISO_LATE         2U    /*!< Follow LATE_ISO */
118 #define SC_PAD_ISO_ON           3U    /*!< ISO latched data is held */
119 /*@}*/
120 
121 /*!
122  * @name Defines for sc_pad_28fdsoi_dse_t
123  */
124 /*@{*/
125 #define SC_PAD_28FDSOI_DSE_18V_1MA   0U    /*!< Drive strength of 1mA for 1.8v */
126 #define SC_PAD_28FDSOI_DSE_18V_2MA   1U    /*!< Drive strength of 2mA for 1.8v */
127 #define SC_PAD_28FDSOI_DSE_18V_4MA   2U    /*!< Drive strength of 4mA for 1.8v */
128 #define SC_PAD_28FDSOI_DSE_18V_6MA   3U    /*!< Drive strength of 6mA for 1.8v */
129 #define SC_PAD_28FDSOI_DSE_18V_8MA   4U    /*!< Drive strength of 8mA for 1.8v */
130 #define SC_PAD_28FDSOI_DSE_18V_10MA  5U    /*!< Drive strength of 10mA for 1.8v */
131 #define SC_PAD_28FDSOI_DSE_18V_12MA  6U    /*!< Drive strength of 12mA for 1.8v */
132 #define SC_PAD_28FDSOI_DSE_18V_HS    7U    /*!< High-speed drive strength for 1.8v */
133 #define SC_PAD_28FDSOI_DSE_33V_2MA   0U    /*!< Drive strength of 2mA for 3.3v */
134 #define SC_PAD_28FDSOI_DSE_33V_4MA   1U    /*!< Drive strength of 4mA for 3.3v */
135 #define SC_PAD_28FDSOI_DSE_33V_8MA   2U    /*!< Drive strength of 8mA for 3.3v */
136 #define SC_PAD_28FDSOI_DSE_33V_12MA  3U    /*!< Drive strength of 12mA for 3.3v */
137 #define SC_PAD_28FDSOI_DSE_DV_HIGH   0U    /*!< High drive strength for dual volt */
138 #define SC_PAD_28FDSOI_DSE_DV_LOW    1U    /*!< Low drive strength for dual volt */
139 /*@}*/
140 
141 /*!
142  * @name Defines for sc_pad_28fdsoi_ps_t
143  */
144 /*@{*/
145 #define SC_PAD_28FDSOI_PS_KEEPER 0U    /*!< Bus-keeper (only valid for 1.8v) */
146 #define SC_PAD_28FDSOI_PS_PU     1U    /*!< Pull-up */
147 #define SC_PAD_28FDSOI_PS_PD     2U    /*!< Pull-down */
148 #define SC_PAD_28FDSOI_PS_NONE   3U    /*!< No pull (disabled) */
149 /*@}*/
150 
151 /*!
152  * @name Defines for sc_pad_28fdsoi_pus_t
153  */
154 /*@{*/
155 #define SC_PAD_28FDSOI_PUS_30K_PD  0U    /*!< 30K pull-down */
156 #define SC_PAD_28FDSOI_PUS_100K_PU 1U    /*!< 100K pull-up */
157 #define SC_PAD_28FDSOI_PUS_3K_PU   2U    /*!< 3K pull-up */
158 #define SC_PAD_28FDSOI_PUS_30K_PU  3U    /*!< 30K pull-up */
159 /*@}*/
160 
161 /*!
162  * @name Defines for sc_pad_wakeup_t
163  */
164 /*@{*/
165 #define SC_PAD_WAKEUP_OFF       0U    /*!< Off */
166 #define SC_PAD_WAKEUP_CLEAR     1U    /*!< Clears pending flag */
167 #define SC_PAD_WAKEUP_LOW_LVL   4U    /*!< Low level */
168 #define SC_PAD_WAKEUP_FALL_EDGE 5U    /*!< Falling edge */
169 #define SC_PAD_WAKEUP_RISE_EDGE 6U    /*!< Rising edge */
170 #define SC_PAD_WAKEUP_HIGH_LVL  7U    /*!< High-level */
171 /*@}*/
172 
173 /* Types */
174 
175 /*!
176  * This type is used to declare a pad config. It determines how the
177  * output data is driven, pull-up is controlled, and input signal is
178  * connected. Normal and OD are typical and only connect the input
179  * when the output is not driven.  The IN options are less common and
180  * force an input connection even when driving the output.
181  */
182 typedef uint8_t sc_pad_config_t;
183 
184 /*!
185  * This type is used to declare a pad low-power isolation config.
186  * ISO_LATE is the most common setting. ISO_EARLY is only used when
187  * an output pad is directly determined by another input pad. The
188  * other two are only used when SW wants to directly control isolation.
189  */
190 typedef uint8_t sc_pad_iso_t;
191 
192 /*!
193  * This type is used to declare a drive strength. Note it is specific
194  * to 28FDSOI. Also note that valid values depend on the pad type.
195  */
196 typedef uint8_t sc_pad_28fdsoi_dse_t;
197 
198 /*!
199  * This type is used to declare a pull select. Note it is specific
200  * to 28FDSOI.
201  */
202 typedef uint8_t sc_pad_28fdsoi_ps_t;
203 
204 /*!
205  * This type is used to declare a pull-up select. Note it is specific
206  * to 28FDSOI HSIC pads.
207  */
208 typedef uint8_t sc_pad_28fdsoi_pus_t;
209 
210 /*!
211  * This type is used to declare a wakeup mode of a pad.
212  */
213 typedef uint8_t sc_pad_wakeup_t;
214 
215 /* Functions */
216 
217 /*!
218  * @name Generic Functions
219  * @{
220  */
221 
222 /*!
223  * This function configures the mux settings for a pad. This includes
224  * the signal mux, pad config, and low-power isolation mode.
225  *
226  * @param[in]     ipc         IPC handle
227  * @param[in]     pad         pad to configure
228  * @param[in]     mux         mux setting
229  * @param[in]     config      pad config
230  * @param[in]     iso         low-power isolation mode
231  *
232  * @return Returns an error code (SC_ERR_NONE = success).
233  *
234  * Return errors:
235  * - SC_PARM if arguments out of range or invalid,
236  * - SC_ERR_NOACCESS if caller's partition is not the pad owner
237  *
238  * Note muxing two input pads to the same IP functional signal will
239  * result in undefined behavior.
240  *
241  * Refer to the SoC [Pad List](@ref PADS) for valid pad values.
242  */
243 sc_err_t sc_pad_set_mux(sc_ipc_t ipc, sc_pad_t pad,
244     uint8_t mux, sc_pad_config_t config, sc_pad_iso_t iso);
245 
246 /*!
247  * This function gets the mux settings for a pad. This includes
248  * the signal mux, pad config, and low-power isolation mode.
249  *
250  * @param[in]     ipc         IPC handle
251  * @param[in]     pad         pad to query
252  * @param[out]    mux         pointer to return mux setting
253  * @param[out]    config      pointer to return pad config
254  * @param[out]    iso         pointer to return low-power isolation mode
255  *
256  * @return Returns an error code (SC_ERR_NONE = success).
257  *
258  * Return errors:
259  * - SC_PARM if arguments out of range or invalid,
260  * - SC_ERR_NOACCESS if caller's partition is not the pad owner
261  *
262  * Refer to the SoC [Pad List](@ref PADS) for valid pad values.
263  */
264 sc_err_t sc_pad_get_mux(sc_ipc_t ipc, sc_pad_t pad,
265     uint8_t *mux, sc_pad_config_t *config, sc_pad_iso_t *iso);
266 
267 /*!
268  * This function configures the general purpose pad control. This
269  * is technology dependent and includes things like drive strength,
270  * slew rate, pull up/down, etc. Refer to the SoC Reference Manual
271  * for bit field details.
272  *
273  * @param[in]     ipc         IPC handle
274  * @param[in]     pad         pad to configure
275  * @param[in]     ctrl        control value to set
276  *
277  * @return Returns an error code (SC_ERR_NONE = success).
278  *
279  * Return errors:
280  * - SC_PARM if arguments out of range or invalid,
281  * - SC_ERR_NOACCESS if caller's partition is not the pad owner
282  *
283  * Refer to the SoC [Pad List](@ref PADS) for valid pad values.
284  */
285 sc_err_t sc_pad_set_gp(sc_ipc_t ipc, sc_pad_t pad, uint32_t ctrl);
286 
287 /*!
288  * This function gets the general purpose pad control. This
289  * is technology dependent and includes things like drive strength,
290  * slew rate, pull up/down, etc. Refer to the SoC Reference Manual
291  * for bit field details.
292  *
293  * @param[in]     ipc         IPC handle
294  * @param[in]     pad         pad to query
295  * @param[out]    ctrl        pointer to return control value
296  *
297  * @return Returns an error code (SC_ERR_NONE = success).
298  *
299  * Return errors:
300  * - SC_PARM if arguments out of range or invalid,
301  * - SC_ERR_NOACCESS if caller's partition is not the pad owner
302  *
303  * Refer to the SoC [Pad List](@ref PADS) for valid pad values.
304  */
305 sc_err_t sc_pad_get_gp(sc_ipc_t ipc, sc_pad_t pad, uint32_t *ctrl);
306 
307 /*!
308  * This function configures the wakeup mode of the pad.
309  *
310  * @param[in]     ipc         IPC handle
311  * @param[in]     pad         pad to configure
312  * @param[in]     wakeup      wakeup to set
313  *
314  * @return Returns an error code (SC_ERR_NONE = success).
315  *
316  * Return errors:
317  * - SC_PARM if arguments out of range or invalid,
318  * - SC_ERR_NOACCESS if caller's partition is not the pad owner
319  *
320  * Refer to the SoC [Pad List](@ref PADS) for valid pad values.
321  */
322 sc_err_t sc_pad_set_wakeup(sc_ipc_t ipc, sc_pad_t pad,
323     sc_pad_wakeup_t wakeup);
324 
325 /*!
326  * This function gets the wakeup mode of a pad.
327  *
328  * @param[in]     ipc         IPC handle
329  * @param[in]     pad         pad to query
330  * @param[out]    wakeup      pointer to return wakeup
331  *
332  * @return Returns an error code (SC_ERR_NONE = success).
333  *
334  * Return errors:
335  * - SC_PARM if arguments out of range or invalid,
336  * - SC_ERR_NOACCESS if caller's partition is not the pad owner
337  *
338  * Refer to the SoC [Pad List](@ref PADS) for valid pad values.
339  */
340 sc_err_t sc_pad_get_wakeup(sc_ipc_t ipc, sc_pad_t pad,
341     sc_pad_wakeup_t *wakeup);
342 
343 /*!
344  * This function configures a pad.
345  *
346  * @param[in]     ipc         IPC handle
347  * @param[in]     pad         pad to configure
348  * @param[in]     mux         mux setting
349  * @param[in]     config      pad config
350  * @param[in]     iso         low-power isolation mode
351  * @param[in]     ctrl        control value
352  * @param[in]     wakeup      wakeup to set
353  *
354  * @see sc_pad_set_mux().
355  * @see sc_pad_set_gp().
356  *
357  * Return errors:
358  * - SC_PARM if arguments out of range or invalid,
359  * - SC_ERR_NOACCESS if caller's partition is not the pad owner
360  *
361  * @return Returns an error code (SC_ERR_NONE = success).
362  *
363  * Note muxing two input pads to the same IP functional signal will
364  * result in undefined behavior.
365  *
366  * Refer to the SoC [Pad List](@ref PADS) for valid pad values.
367  */
368 sc_err_t sc_pad_set_all(sc_ipc_t ipc, sc_pad_t pad, uint8_t mux,
369     sc_pad_config_t config, sc_pad_iso_t iso, uint32_t ctrl,
370     sc_pad_wakeup_t wakeup);
371 
372 /*!
373  * This function gets a pad's config.
374  *
375  * @param[in]     ipc         IPC handle
376  * @param[in]     pad         pad to query
377  * @param[out]    mux         pointer to return mux setting
378  * @param[out]    config      pointer to return pad config
379  * @param[out]    iso         pointer to return low-power isolation mode
380  * @param[out]    ctrl        pointer to return control value
381  * @param[out]    wakeup      pointer to return wakeup to set
382  *
383  * @see sc_pad_set_mux().
384  * @see sc_pad_set_gp().
385  *
386  * Return errors:
387  * - SC_PARM if arguments out of range or invalid,
388  * - SC_ERR_NOACCESS if caller's partition is not the pad owner
389  *
390  * @return Returns an error code (SC_ERR_NONE = success).
391  *
392  * Refer to the SoC [Pad List](@ref PADS) for valid pad values.
393  */
394 sc_err_t sc_pad_get_all(sc_ipc_t ipc, sc_pad_t pad, uint8_t *mux,
395     sc_pad_config_t *config, sc_pad_iso_t *iso, uint32_t *ctrl,
396     sc_pad_wakeup_t *wakeup);
397 
398 /* @} */
399 
400 /*!
401  * @name SoC Specific Functions
402  * @{
403  */
404 
405 /*!
406  * This function configures the settings for a pad. This setting is SoC
407  * specific.
408  *
409  * @param[in]     ipc         IPC handle
410  * @param[in]     pad         pad to configure
411  * @param[in]     val         value to set
412  *
413  * @return Returns an error code (SC_ERR_NONE = success).
414  *
415  * Return errors:
416  * - SC_PARM if arguments out of range or invalid,
417  * - SC_ERR_NOACCESS if caller's partition is not the pad owner
418  *
419  * Refer to the SoC [Pad List](@ref PADS) for valid pad values.
420  */
421 sc_err_t sc_pad_set(sc_ipc_t ipc, sc_pad_t pad, uint32_t val);
422 
423 /*!
424  * This function gets the settings for a pad. This setting is SoC
425  * specific.
426  *
427  * @param[in]     ipc         IPC handle
428  * @param[in]     pad         pad to query
429  * @param[out]    val         pointer to return setting
430  *
431  * @return Returns an error code (SC_ERR_NONE = success).
432  *
433  * Return errors:
434  * - SC_PARM if arguments out of range or invalid,
435  * - SC_ERR_NOACCESS if caller's partition is not the pad owner
436  *
437  * Refer to the SoC [Pad List](@ref PADS) for valid pad values.
438  */
439 sc_err_t sc_pad_get(sc_ipc_t ipc, sc_pad_t pad, uint32_t *val);
440 
441 /*!
442  * This function writes a configuration register. This setting is SoC
443  * specific.
444  *
445  * @param[in]     ipc         IPC handle
446  * @param[in]     pad         pad to configure
447  * @param[in]     val         value to set
448  *
449  * Use to configure various HSIC and NAND congiruation settings.
450  *
451  * @return Returns an error code (SC_ERR_NONE = success).
452  *
453  * Return errors:
454  * - SC_PARM if arguments out of range or invalid,
455  * - SC_ERR_NOACCESS if caller's partition is not the pad owner
456  *
457  * Refer to the SoC [Pad List](@ref PADS) for valid pad values.
458  */
459 sc_err_t sc_pad_config(sc_ipc_t ipc, sc_pad_t pad, uint32_t val);
460 
461 /* @} */
462 
463 /*!
464  * @name Technology Specific Functions
465  * @{
466  */
467 
468 /*!
469  * This function configures the pad control specific to 28FDSOI.
470  *
471  * @param[in]     ipc         IPC handle
472  * @param[in]     pad         pad to configure
473  * @param[in]     dse         drive strength
474  * @param[in]     ps          pull select
475  *
476  * @return Returns an error code (SC_ERR_NONE = success).
477  *
478  * Return errors:
479  * - SC_PARM if arguments out of range or invalid,
480  * - SC_ERR_NOACCESS if caller's partition is not the pad owner,
481  * - SC_ERR_UNAVAILABLE if process not applicable
482  *
483  * Refer to the SoC [Pad List](@ref PADS) for valid pad values.
484  */
485 sc_err_t sc_pad_set_gp_28fdsoi(sc_ipc_t ipc, sc_pad_t pad,
486     sc_pad_28fdsoi_dse_t dse, sc_pad_28fdsoi_ps_t ps);
487 
488 /*!
489  * This function gets the pad control specific to 28FDSOI.
490  *
491  * @param[in]     ipc         IPC handle
492  * @param[in]     pad         pad to query
493  * @param[out]    dse         pointer to return drive strength
494  * @param[out]    ps          pointer to return pull select
495  *
496  * @return Returns an error code (SC_ERR_NONE = success).
497  *
498  * Return errors:
499  * - SC_PARM if arguments out of range or invalid,
500  * - SC_ERR_NOACCESS if caller's partition is not the pad owner,
501  * - SC_ERR_UNAVAILABLE if process not applicable
502  *
503  * Refer to the SoC [Pad List](@ref PADS) for valid pad values.
504  */
505 sc_err_t sc_pad_get_gp_28fdsoi(sc_ipc_t ipc, sc_pad_t pad,
506     sc_pad_28fdsoi_dse_t *dse, sc_pad_28fdsoi_ps_t *ps);
507 
508 /*!
509  * This function configures the pad control specific to 28FDSOI.
510  *
511  * @param[in]     ipc         IPC handle
512  * @param[in]     pad         pad to configure
513  * @param[in]     dse         drive strength
514  * @param[in]     hys         hysteresis
515  * @param[in]     pus         pull-up select
516  * @param[in]     pke         pull keeper enable
517  * @param[in]     pue         pull-up enable
518  *
519  * @return Returns an error code (SC_ERR_NONE = success).
520  *
521  * Return errors:
522  * - SC_PARM if arguments out of range or invalid,
523  * - SC_ERR_NOACCESS if caller's partition is not the pad owner,
524  * - SC_ERR_UNAVAILABLE if process not applicable
525  *
526  * Refer to the SoC [Pad List](@ref PADS) for valid pad values.
527  */
528 sc_err_t sc_pad_set_gp_28fdsoi_hsic(sc_ipc_t ipc, sc_pad_t pad,
529     sc_pad_28fdsoi_dse_t dse, sc_bool_t hys, sc_pad_28fdsoi_pus_t pus,
530     sc_bool_t pke, sc_bool_t pue);
531 
532 /*!
533  * This function gets the pad control specific to 28FDSOI.
534  *
535  * @param[in]     ipc         IPC handle
536  * @param[in]     pad         pad to query
537  * @param[out]    dse         pointer to return drive strength
538  * @param[out]    hys         pointer to return hysteresis
539  * @param[out]    pus         pointer to return pull-up select
540  * @param[out]    pke         pointer to return pull keeper enable
541  * @param[out]    pue         pointer to return pull-up enable
542  *
543  * @return Returns an error code (SC_ERR_NONE = success).
544  *
545  * Return errors:
546  * - SC_PARM if arguments out of range or invalid,
547  * - SC_ERR_NOACCESS if caller's partition is not the pad owner,
548  * - SC_ERR_UNAVAILABLE if process not applicable
549  *
550  * Refer to the SoC [Pad List](@ref PADS) for valid pad values.
551  */
552 sc_err_t sc_pad_get_gp_28fdsoi_hsic(sc_ipc_t ipc, sc_pad_t pad,
553     sc_pad_28fdsoi_dse_t *dse, sc_bool_t *hys, sc_pad_28fdsoi_pus_t *pus,
554     sc_bool_t *pke, sc_bool_t *pue);
555 
556 /*!
557  * This function configures the compensation control specific to 28FDSOI.
558  *
559  * @param[in]     ipc         IPC handle
560  * @param[in]     pad         pad to configure
561  * @param[in]     compen      compensation/freeze mode
562  * @param[in]     fastfrz     fast freeze
563  * @param[in]     rasrcp      compensation code for PMOS
564  * @param[in]     rasrcn      compensation code for NMOS
565  * @param[in]     nasrc_sel   NASRC read select
566  * @param[in]     psw_ovr     2.5v override
567  *
568  * @return Returns an error code (SC_ERR_NONE = success).
569  *
570  * Return errors:
571  * - SC_PARM if arguments out of range or invalid,
572  * - SC_ERR_NOACCESS if caller's partition is not the pad owner,
573  * - SC_ERR_UNAVAILABLE if process not applicable
574  *
575  * Refer to the SoC [Pad List](@ref PADS) for valid pad values.
576  *
577  * Note \a psw_ovr is only applicable to pads supporting 2.5 volt
578  * operation (e.g. some Ethernet pads).
579  */
580 sc_err_t sc_pad_set_gp_28fdsoi_comp(sc_ipc_t ipc, sc_pad_t pad,
581     uint8_t compen, sc_bool_t fastfrz, uint8_t rasrcp, uint8_t rasrcn,
582     sc_bool_t nasrc_sel, sc_bool_t psw_ovr);
583 
584 /*!
585  * This function gets the compensation control specific to 28FDSOI.
586  *
587  * @param[in]     ipc         IPC handle
588  * @param[in]     pad         pad to query
589  * @param[out]    compen      pointer to return compensation/freeze mode
590  * @param[out]    fastfrz     pointer to return fast freeze
591  * @param[out]    rasrcp      pointer to return compensation code for PMOS
592  * @param[out]    rasrcn      pointer to return compensation code for NMOS
593  * @param[out]    nasrc_sel   pointer to return NASRC read select
594  * @param[out]    compok      pointer to return compensation status
595  * @param[out]    nasrc       pointer to return NASRCP/NASRCN
596  * @param[out]    psw_ovr     pointer to return the 2.5v override
597  *
598  * @return Returns an error code (SC_ERR_NONE = success).
599  *
600  * Return errors:
601  * - SC_PARM if arguments out of range or invalid,
602  * - SC_ERR_NOACCESS if caller's partition is not the pad owner,
603  * - SC_ERR_UNAVAILABLE if process not applicable
604  *
605  * Refer to the SoC [Pad List](@ref PADS) for valid pad values.
606  */
607 sc_err_t sc_pad_get_gp_28fdsoi_comp(sc_ipc_t ipc, sc_pad_t pad,
608     uint8_t *compen, sc_bool_t *fastfrz, uint8_t *rasrcp, uint8_t *rasrcn,
609     sc_bool_t *nasrc_sel, sc_bool_t *compok, uint8_t *nasrc, sc_bool_t *psw_ovr);
610 
611 /* @} */
612 
613 #endif /* SC_PAD_API_H */
614 
615 /**@}*/
616 
617