mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
ASoC: tegra: Add support for 1.2GHz pll base rate
- For upcoming chips the PLLA base rates are different. Added entry to support 1.2GHz base rate. - Base rate reference: Bug 3157662, Comment #77. Bug 200741253 Bug 3506754 Signed-off-by: Sheetal <sheetal@nvidia.com> Change-Id: Ib8554b3b6b2f1d0e35e328898f343b1f92870bda Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2704346 (cherry picked from commit 77ec9d06a5dc63d6687be0dfa60136af5e2f98ed) Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2591781 Tested-by: Mohan Kumar D <mkumard@nvidia.com> Reviewed-by: Mohan Kumar D <mkumard@nvidia.com> Reviewed-by: Sameer Pujar <spujar@nvidia.com> Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com> Reviewed-by: Sharad Gupta <sharadg@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
* tegra_asoc_utils.c - Harmony machine ASoC driver
|
* tegra_asoc_utils.c - Harmony machine ASoC driver
|
||||||
*
|
*
|
||||||
* Author: Stephen Warren <swarren@nvidia.com>
|
* Author: Stephen Warren <swarren@nvidia.com>
|
||||||
* Copyright (c) 2010-2021 NVIDIA CORPORATION. All rights reserved.
|
* Copyright (c) 2010-2022 NVIDIA CORPORATION. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
@@ -28,6 +28,7 @@ enum rate_type {
|
|||||||
};
|
};
|
||||||
unsigned int tegra210_pll_base_rate[NUM_RATE_TYPE] = {338688000, 368640000};
|
unsigned int tegra210_pll_base_rate[NUM_RATE_TYPE] = {338688000, 368640000};
|
||||||
unsigned int tegra186_pll_stereo_base_rate[NUM_RATE_TYPE] = {270950400, 294912000};
|
unsigned int tegra186_pll_stereo_base_rate[NUM_RATE_TYPE] = {270950400, 294912000};
|
||||||
|
unsigned int tegra239_pll_base_rate[NUM_RATE_TYPE] = {1264435200, 1277952000};
|
||||||
unsigned int default_pll_out_stereo_rate[NUM_RATE_TYPE] = {45158400, 49152000};
|
unsigned int default_pll_out_stereo_rate[NUM_RATE_TYPE] = {45158400, 49152000};
|
||||||
|
|
||||||
int tegra_asoc_utils_set_rate(struct tegra_asoc_utils_data *data, int srate,
|
int tegra_asoc_utils_set_rate(struct tegra_asoc_utils_data *data, int srate,
|
||||||
@@ -350,6 +351,8 @@ int tegra_asoc_utils_init(struct tegra_asoc_utils_data *data,
|
|||||||
data->soc = TEGRA_ASOC_UTILS_SOC_TEGRA194;
|
data->soc = TEGRA_ASOC_UTILS_SOC_TEGRA194;
|
||||||
else if (of_machine_is_compatible("nvidia,tegra234"))
|
else if (of_machine_is_compatible("nvidia,tegra234"))
|
||||||
data->soc = TEGRA_ASOC_UTILS_SOC_TEGRA234;
|
data->soc = TEGRA_ASOC_UTILS_SOC_TEGRA234;
|
||||||
|
else if (of_machine_is_compatible("nvidia,tegra239"))
|
||||||
|
data->soc = TEGRA_ASOC_UTILS_SOC_TEGRA239;
|
||||||
else {
|
else {
|
||||||
dev_err(data->dev, "SoC unknown to Tegra ASoC utils\n");
|
dev_err(data->dev, "SoC unknown to Tegra ASoC utils\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@@ -382,8 +385,11 @@ int tegra_asoc_utils_init(struct tegra_asoc_utils_data *data,
|
|||||||
|
|
||||||
if (data->soc < TEGRA_ASOC_UTILS_SOC_TEGRA186)
|
if (data->soc < TEGRA_ASOC_UTILS_SOC_TEGRA186)
|
||||||
data->pll_base_rate = tegra210_pll_base_rate;
|
data->pll_base_rate = tegra210_pll_base_rate;
|
||||||
else
|
else if (data->soc < TEGRA_ASOC_UTILS_SOC_TEGRA239)
|
||||||
data->pll_base_rate = tegra186_pll_stereo_base_rate;
|
data->pll_base_rate = tegra186_pll_stereo_base_rate;
|
||||||
|
else
|
||||||
|
data->pll_base_rate = tegra239_pll_base_rate;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If clock parents are not set in DT, configure here to use clk_out_1
|
* If clock parents are not set in DT, configure here to use clk_out_1
|
||||||
* as mclk and extern1 as parent for Tegra30 and higher.
|
* as mclk and extern1 as parent for Tegra30 and higher.
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* tegra_asoc_utils.h - Definitions for Tegra DAS driver
|
* tegra_asoc_utils.h - Definitions for Tegra DAS driver
|
||||||
*
|
*
|
||||||
* Author: Stephen Warren <swarren@nvidia.com>
|
* Author: Stephen Warren <swarren@nvidia.com>
|
||||||
* Copyright (c) 2010,2012-2021, NVIDIA CORPORATION. All rights reserved.
|
* Copyright (c) 2010,2012-2022, NVIDIA CORPORATION. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __TEGRA_ASOC_UTILS_H__
|
#ifndef __TEGRA_ASOC_UTILS_H__
|
||||||
@@ -21,6 +21,7 @@ enum tegra_asoc_utils_soc {
|
|||||||
TEGRA_ASOC_UTILS_SOC_TEGRA186,
|
TEGRA_ASOC_UTILS_SOC_TEGRA186,
|
||||||
TEGRA_ASOC_UTILS_SOC_TEGRA194,
|
TEGRA_ASOC_UTILS_SOC_TEGRA194,
|
||||||
TEGRA_ASOC_UTILS_SOC_TEGRA234,
|
TEGRA_ASOC_UTILS_SOC_TEGRA234,
|
||||||
|
TEGRA_ASOC_UTILS_SOC_TEGRA239,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct tegra_asoc_utils_data {
|
struct tegra_asoc_utils_data {
|
||||||
|
|||||||
Reference in New Issue
Block a user