Files
linux-nv-oot/sound/soc/tegra/tegra_asoc_utils.h
Sheetal 125740cada 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
2022-09-29 15:57:12 +05:30

54 lines
1.5 KiB
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* tegra_asoc_utils.h - Definitions for Tegra DAS driver
*
* Author: Stephen Warren <swarren@nvidia.com>
* Copyright (c) 2010,2012-2022, NVIDIA CORPORATION. All rights reserved.
*/
#ifndef __TEGRA_ASOC_UTILS_H__
#define __TEGRA_ASOC_UTILS_H__
struct clk;
struct device;
enum tegra_asoc_utils_soc {
TEGRA_ASOC_UTILS_SOC_TEGRA20,
TEGRA_ASOC_UTILS_SOC_TEGRA30,
TEGRA_ASOC_UTILS_SOC_TEGRA114,
TEGRA_ASOC_UTILS_SOC_TEGRA124,
TEGRA_ASOC_UTILS_SOC_TEGRA210,
TEGRA_ASOC_UTILS_SOC_TEGRA186,
TEGRA_ASOC_UTILS_SOC_TEGRA194,
TEGRA_ASOC_UTILS_SOC_TEGRA234,
TEGRA_ASOC_UTILS_SOC_TEGRA239,
};
struct tegra_asoc_utils_data {
struct device *dev;
enum tegra_asoc_utils_soc soc;
struct clk *clk_pll_a;
struct clk *clk_pll_a_out0;
struct clk *clk_cdev1;
int set_baseclock;
int set_mclk;
unsigned int set_pll_out;
unsigned int *pll_base_rate;
unsigned int mclk_fs;
bool fixed_pll;
};
int tegra_asoc_utils_set_rate(struct tegra_asoc_utils_data *data, int srate,
int mclk);
int tegra_asoc_utils_set_ac97_rate(struct tegra_asoc_utils_data *data);
int tegra_asoc_utils_set_tegra210_rate(struct tegra_asoc_utils_data *data,
unsigned int sample_rate,
unsigned int channels,
unsigned int sample_size);
int tegra_asoc_utils_clk_enable(struct tegra_asoc_utils_data *data);
void tegra_asoc_utils_clk_disable(struct tegra_asoc_utils_data *data);
int tegra_asoc_utils_init(struct tegra_asoc_utils_data *data,
struct device *dev);
#endif