blob: 3f54d3627778ca9c3e833139adf30c9370f0a477 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Tom Warrenb7ea6d12014-01-24 12:46:13 -07002/*
3 * (C) Copyright 2010-2013
4 * NVIDIA Corporation <www.nvidia.com>
Tom Warrenb7ea6d12014-01-24 12:46:13 -07005 */
6
7/* Tegra124 clock control definitions */
8
9#ifndef _TEGRA124_CLOCK_H_
10#define _TEGRA124_CLOCK_H_
11
12#include <asm/arch-tegra/clock.h>
13
14/* CLK_RST_CONTROLLER_OSC_CTRL_0 */
15#define OSC_FREQ_SHIFT 28
16#define OSC_FREQ_MASK (0xF << OSC_FREQ_SHIFT)
17
Thierry Redinga1dfa9a2015-09-08 11:38:03 +020018/* CLK_RST_CONTROLLER_PLLC_MISC_0 */
19#define PLLC_IDDQ (1 << 26)
20
Simon Glass93a19952015-04-14 21:03:34 -060021/* CLK_RST_CONTROLLER_CLK_SOURCE_SOR0_0 */
22#define SOR0_CLK_SEL0 (1 << 14)
23#define SOR0_CLK_SEL1 (1 << 15)
24
Thierry Reding4bf98692014-12-09 22:25:06 -070025int tegra_plle_enable(void);
26
Simon Glass93a19952015-04-14 21:03:34 -060027void clock_sor_enable_edp_clock(void);
28
29/**
30 * clock_set_display_rate() - Set the display clock rate
31 *
32 * @frequency: the requested PLLD frequency
33 *
34 * Return the PLLD frequenc (which may not quite what was requested), or 0
35 * on failure
36 */
37u32 clock_set_display_rate(u32 frequency);
38
39/**
40 * clock_set_up_plldp() - Set up the EDP clock ready for use
41 */
42void clock_set_up_plldp(void);
43
Tom Warrenb7ea6d12014-01-24 12:46:13 -070044#endif /* _TEGRA124_CLOCK_H_ */