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

Commit 32a46be4 authored by Odelu Kukatla's avatar Odelu Kukatla Committed by Gerrit - the friendly Code Review server
Browse files

clk: qcom: Add GCC clock driver for TRINKET



Add support for peripheral and camera clocks controlled by
global clock controller.

Change-Id: Ie496cd111352ea287149b1b5498b30ef2754b285
Signed-off-by: default avatarOdelu Kukatla <okukatla@codeaurora.org>
parent fbf8d2be
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ Required properties :
			"qcom,gcc-sm6150"
			"qcom,gcc-sdmmagpie"
			"qcom,gcc-sdxprairie"
			"qcom,gcc-trinket"

- reg : shall contain base register location and length
- #clock-cells : shall contain 1
+10 −0
Original line number Diff line number Diff line
@@ -502,3 +502,13 @@ config CLOCK_CPU_SDXPRAIRIE
	  based devices.
	  Say Y if you want to support CPU clock scaling using
	  CPUfreq drivers for dynamic power management.

config SM_GCC_TRINKET
	tristate "TRINKET Global Clock Controller"
	depends on COMMON_CLK_QCOM
	select QCOM_GDSC
	help
	  Support for the global clock controller on Qualcomm Technologies, Inc
	  TRINKET devices.
	  Say Y if you want to use peripheral devices such as UART, SPI, I2C,
	  USB, UFS, SD/eMMC, PCIe, etc.
+1 −0
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@ obj-$(CONFIG_MSM_VIDEOCC_SM6150) += videocc-sm6150.o
obj-$(CONFIG_MSM_VIDEOCC_SM8150) += videocc-sm8150.o
obj-$(CONFIG_QCOM_CLK_RPM) += clk-rpm.o
obj-$(CONFIG_QCOM_CLK_SMD_RPM) += clk-smd-rpm.o
obj-$(CONFIG_SM_GCC_TRINKET) += gcc-trinket.o
obj-$(CONFIG_SPMI_PMIC_CLKDIV) += clk-spmi-pmic-div.o

obj-y += mdss/
+4527 −0

File added.

Preview size limit exceeded, changes collapsed.

+66 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#ifndef __DRIVERS_CLK_QCOM_VDD_LEVEL_TRINKET_H
#define __DRIVERS_CLK_QCOM_VDD_LEVEL_TRINKET_H

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

enum vdd_mx_levels {
	VDD_MX_NONE,
	VDD_MX_MIN,		/* MIN SVS */
	VDD_MX_LOWER,		/* SVS2 */
	VDD_MX_LOW,		/* SVS */
	VDD_MX_LOW_L1,		/* SVSL1 */
	VDD_MX_NOMINAL,		/* NOM */
	VDD_MX_HIGH,		/* TURBO */
	VDD_MX_NUM,
};

static int vdd_mx_corner[] = {
	RPM_REGULATOR_LEVEL_NONE,		/* VDD_NONE */
	RPM_REGULATOR_LEVEL_MIN_SVS,		/* VDD_MIN */
	RPM_REGULATOR_LEVEL_LOW_SVS,		/* VDD_LOWER */
	RPM_REGULATOR_LEVEL_SVS,		/* VDD_LOW */
	RPM_REGULATOR_LEVEL_SVS_PLUS,		/* VDD_LOW_L1 */
	RPM_REGULATOR_LEVEL_NOM,		/* VDD_NOMINAL */
	RPM_REGULATOR_LEVEL_TURBO,		/* VDD_HIGH */
	RPM_REGULATOR_LEVEL_MAX
};

enum vdd_dig_levels {
	VDD_NONE,
	VDD_MIN,		/* MIN SVS */
	VDD_LOWER,		/* SVS2 */
	VDD_LOW,		/* SVS */
	VDD_LOW_L1,		/* SVSL1 */
	VDD_NOMINAL,		/* NOM */
	VDD_NOMINAL_L1,		/* NOM */
	VDD_HIGH,		/* TURBO */
	VDD_NUM,
};

static int vdd_corner[] = {
	RPM_REGULATOR_LEVEL_NONE,		/* VDD_NONE */
	RPM_REGULATOR_LEVEL_MIN_SVS,		/* VDD_MIN */
	RPM_REGULATOR_LEVEL_LOW_SVS,		/* VDD_LOWER */
	RPM_REGULATOR_LEVEL_SVS,		/* VDD_LOW */
	RPM_REGULATOR_LEVEL_SVS_PLUS,		/* VDD_LOW_L1 */
	RPM_REGULATOR_LEVEL_NOM,		/* VDD_NOMINAL */
	RPM_REGULATOR_LEVEL_NOM_PLUS,		/* VDD_NOMINAL */
	RPM_REGULATOR_LEVEL_TURBO,		/* VDD_HIGH */
	RPM_REGULATOR_LEVEL_MAX
};

#endif
Loading