xref: /rk3399_ARM-atf/include/drivers/renesas/rza/cpg/cpg.h (revision 66a0bb47058db8a4f74ccc1543a146094829e110)
1 /*
2  * Copyright (c) 2020-2026, Renesas Electronics Corporation. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef __CPG_H__
8 #define __CPG_H__
9 
10 #include <lib/mmio.h>
11 
12 enum xspi_clock {
13 	XSPI_CLOCK_SPIM,
14 	XSPI_CLOCK_OCTA,
15 };
16 
17 enum clock_id {
18 	CPG_CLOCK_SPIM = 20,
19 	CPG_CLOCK_OCTA = 61,
20 };
21 
22 void cpg_early_setup(void);
23 void cpg_setup(void);
24 void cpg_active_ddr(void (*disable_phy)(void));
25 void cpg_reset_ddr_mc(void);
26 int cpg_set_xspi_clock(enum xspi_clock spi, int frequency_hz);
27 int cpg_get_xspi_clock(enum xspi_clock spi);
28 void cpg_clock_on(enum clock_id clkid);
29 void cpg_clock_off(enum clock_id clkid);
30 void cpg_reset_on(enum clock_id clkid);
31 void cpg_reset_off(enum clock_id clkid);
32 
33 #endif /* __CPG_H__ */
34