1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Texas Instruments K3 Device Platform Data
5 * Copyright (C) 2020 Texas Instruments Incorporated - http://www.ti.com/
11 #include <linux/types.h>
14 #define LPSC_MODULE_EXISTS BIT(0)
15 #define LPSC_NO_CLOCK_GATING BIT(1)
16 #define LPSC_DEPENDS BIT(2)
17 #define LPSC_HAS_RESET_ISO BIT(3)
18 #define LPSC_HAS_LOCAL_RESET BIT(4)
19 #define LPSC_NO_MODULE_RESET BIT(5)
21 #define PSC_PD_EXISTS BIT(0)
22 #define PSC_PD_ALWAYSON BIT(1)
23 #define PSC_PD_DEPENDS BIT(2)
25 #define MDSTAT_STATE_MASK 0x3f
26 #define MDSTAT_BUSY_MASK 0x30
27 #define MDSTAT_STATE_SWRSTDISABLE 0x0
28 #define MDSTAT_STATE_ENABLE 0x3
51 struct ti_lpsc *depend;
60 * struct ti_k3_pd_platdata - pm domain controller information structure
62 struct ti_k3_pd_platdata {
73 #define PSC(_id, _base) { .id = _id, .base = (void *)_base, }
74 #define PSC_PD(_id, _psc, _depend) { .id = _id, .psc = _psc, .depend = _depend }
75 #define PSC_LPSC(_id, _psc, _pd, _depend) { .id = _id, .psc = _psc, .pd = _pd, .depend = _depend }
76 #define PSC_DEV(_id, _lpsc) { .id = _id, .lpsc = _lpsc }
78 extern const struct ti_k3_pd_platdata j721e_pd_platdata;
79 extern const struct ti_k3_pd_platdata j7200_pd_platdata;
80 extern const struct ti_k3_pd_platdata j721s2_pd_platdata;
82 u8 ti_pd_state(struct ti_pd *pd);
83 u8 lpsc_get_state(struct ti_lpsc *lpsc);
84 int ti_lpsc_transition(struct ti_lpsc *lpsc, u8 state);