summaryrefslogtreecommitdiff
path: root/include/k3-dev.h
diff options
context:
space:
mode:
authorTero Kristo <t-kristo@ti.com>2021-06-11 11:45:16 +0300
committerLokesh Vutla <lokeshvutla@ti.com>2021-06-11 14:04:52 +0300
commitf79753c3defb15c037e4e8be6235b2a37a8b56d4 (patch)
treed1cbb5967d5ad1990755a3f6c1a7bff6a582c8f0 /include/k3-dev.h
parent144464bd2c67a1f11e8dd4fb4a18b45b666dc1c4 (diff)
downloadu-boot-f79753c3defb15c037e4e8be6235b2a37a8b56d4.tar.xz
cmd: ti: pd: Add debug command for K3 power domains
Add support command for debugging K3 power domains. This is useful with the HSM rearch setup, where power domains are directly controlled by SPL instead of going through the TI SCI layer. The debugging support is only available in the u-boot codebase though, so the raw register access power domain layer must be enabled on u-boot side for this to work. By default, u-boot side uses the TI SCI layer, and R5 SPL only uses the direct access methods. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Tero Kristo <kristo@kernel.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'include/k3-dev.h')
-rw-r--r--include/k3-dev.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/k3-dev.h b/include/k3-dev.h
index de3a8bdf9e..55c5057db3 100644
--- a/include/k3-dev.h
+++ b/include/k3-dev.h
@@ -22,6 +22,11 @@
#define PSC_PD_ALWAYSON BIT(1)
#define PSC_PD_DEPENDS BIT(2)
+#define MDSTAT_STATE_MASK 0x3f
+#define MDSTAT_BUSY_MASK 0x30
+#define MDSTAT_STATE_SWRSTDISABLE 0x0
+#define MDSTAT_STATE_ENABLE 0x3
+
struct ti_psc {
int id;
void __iomem *base;
@@ -73,4 +78,8 @@ struct ti_k3_pd_platdata {
extern const struct ti_k3_pd_platdata j721e_pd_platdata;
extern const struct ti_k3_pd_platdata j7200_pd_platdata;
+u8 ti_pd_state(struct ti_pd *pd);
+u8 lpsc_get_state(struct ti_lpsc *lpsc);
+int ti_lpsc_transition(struct ti_lpsc *lpsc, u8 state);
+
#endif