summaryrefslogtreecommitdiffstats
path: root/drivers/clk/rockchip/clk.h
diff options
context:
space:
mode:
authorElaine Zhang <zhangqing@rock-chips.com>2022-10-18 17:14:04 +0200
committerHeiko Stuebner <heiko@sntech.de>2022-11-14 15:34:18 +0100
commit2004b7b1803719eaaaee5fa6b089b1699a65d31d (patch)
tree9d6648192a45632849fca5cadb6ffcf23ffcef01 /drivers/clk/rockchip/clk.h
parentclk: rockchip: add pll type for RK3588 (diff)
downloadlinux-2004b7b1803719eaaaee5fa6b089b1699a65d31d.tar.xz
linux-2004b7b1803719eaaaee5fa6b089b1699a65d31d.zip
clk: rockchip: allow additional mux options for cpu-clock frequency changes
In order to improve the main frequency of CPU, the clock path of CPU is simplified as follows: |--\ | \ |--\ --apll--|\ | \ | \ | |--apll_core--| \ | \ --24M---|/ |mux1 |--[gate]--|mux2|---clk_core | / | / --gpll--|\ | / |------| / | |--gpll_core--| / | |--/ --24M---|/ |--/ | | -------apll_directly--------------| When the CPU requests high frequency, we want to use MUX2 select the "apll_directly". At low frequencies use MUX1 to select “apll_core" and then MUX2 to select "apll_core_gate". However, in this way, the CPU frequency conversion needs to be in the following order: 1. MUX2 select to "apll_core_gate", MUX1 select "gpll_core" 2. Apll sets slow_mode, sets APLL parameters, locks APLL, and then APLL sets normal_mode 3. MUX1 select "apll_core", MUX2 select "apll_directly" So add pre_mux and post_mux options to cover this special requirements. Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com> [rebase] Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Link: https://lore.kernel.org/r/20221018151407.63395-7-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Diffstat (limited to 'drivers/clk/rockchip/clk.h')
-rw-r--r--drivers/clk/rockchip/clk.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/clk/rockchip/clk.h b/drivers/clk/rockchip/clk.h
index 6eb31d36c4cd..24d3e56d3f71 100644
--- a/drivers/clk/rockchip/clk.h
+++ b/drivers/clk/rockchip/clk.h
@@ -399,6 +399,8 @@ struct rockchip_cpuclk_clksel {
struct rockchip_cpuclk_rate_table {
unsigned long prate;
struct rockchip_cpuclk_clksel divs[ROCKCHIP_CPUCLK_NUM_DIVIDERS];
+ struct rockchip_cpuclk_clksel pre_muxs[ROCKCHIP_CPUCLK_NUM_DIVIDERS];
+ struct rockchip_cpuclk_clksel post_muxs[ROCKCHIP_CPUCLK_NUM_DIVIDERS];
};
/**