Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d8841552 authored by Saurabh Sahu's avatar Saurabh Sahu Committed by Chetan C R
Browse files

clk: qcom: cpu-sdm: Add cpu clock driver for SDM



Add support for CPU clock driver for scaling of cpu
clocks on qm215/sdm targets.

Change-Id: I9ab83b02052ab9b3e4342bc72380df799fb86976
Signed-off-by: default avatarSaurabh Sahu <sausah@codeaurora.org>
Signed-off-by: default avatarChetan C R <cchinnad@codeaurora.org>
parent 9d5ec5ad
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -600,3 +600,11 @@ config SDM_DEBUGCC_429W
	  Support for the debug clock controller on Qualcomm Technologies, Inc
	  SDM429W/QM215 devices.
	  Say Y if you want to support the clock measurement functionality.

config CLOCK_CPU_SDM
	bool "CPU SDM Clock Controller"
	depends on COMMON_CLK_QCOM
	help
	 Support for the cpu clock controller on SDM based devices(e.g. QM215/SDM429).
	 Say Y if you want to support CPU clock scaling using
	 CPUfreq drivers for dynamic power management.
+1 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ clk-qcom-$(CONFIG_QCOM_GDSC) += gdsc.o
obj-$(CONFIG_APQ_GCC_8084) += gcc-apq8084.o
obj-$(CONFIG_APQ_MMCC_8084) += mmcc-apq8084.o
obj-$(CONFIG_CLOCK_CPU_OSM_660) += clk-cpu-osm-660.o
obj-$(CONFIG_CLOCK_CPU_SDM) += clk-cpu-sdm.o
obj-$(CONFIG_IPQ_GCC_4019) += gcc-ipq4019.o
obj-$(CONFIG_IPQ_GCC_806X) += gcc-ipq806x.o
obj-$(CONFIG_IPQ_GCC_8074) += gcc-ipq8074.o
+1009 −0

File added.

Preview size limit exceeded, changes collapsed.

+27 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
 */

#ifndef __DRIVERS_CLK_QCOM_VDD_LEVEL_CPU_H
#define __DRIVERS_CLK_QCOM_VDD_LEVEL_CPU_H

#include <linux/regulator/rpm-smd-regulator.h>
#include <linux/regulator/consumer.h>

enum vdd_hf_pll_levels {
	VDD_HF_PLL_OFF,
	VDD_HF_PLL_SVS,
	VDD_HF_PLL_NOM,
	VDD_HF_PLL_TUR,
	VDD_HF_PLL_NUM,
};

static int vdd_hf_levels[] = {
	0,	 RPM_REGULATOR_LEVEL_NONE,	/* VDD_HF_PLL_OFF */
	1800000, RPM_REGULATOR_LEVEL_SVS,	/* VDD_HF_PLL_SVS */
	1800000, RPM_REGULATOR_LEVEL_NOM,	/* VDD_HF_PLL_NOM */
	1800000, RPM_REGULATOR_LEVEL_TURBO,	/* VDD_HF_PLL_TUR */
};

#endif