blob: ee0070d9b3fc4e15e0370e2455f04f943ca0e0d7 [file] [log] [blame]
Dhaval Pateld19fcf12014-08-12 13:16:05 -07001/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
Arpita Banerjeeda0c39a2013-05-24 16:12:45 -07002 *
3 * Redistribution and use in source and binary forms, with or without
4 * modification, are permitted provided that the following conditions
5 * are met:
6 * * Redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer.
8 * * Redistributions in binary form must reproduce the above copyright
9 * notice, this list of conditions and the following disclaimer in
10 * the documentation and/or other materials provided with the
11 * distribution.
12 * * Neither the name of The Linux Foundation nor the names of its
13 * contributors may be used to endorse or promote products derived
14 * from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
19 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
20 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
22 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
23 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
24 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
26 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#ifndef _GCDB_AUTOPLL_H_
31#define _GCDB_AUTOPLL_H_
32
33/*---------------------------------------------------------------------------*/
34/* HEADER files */
35/*---------------------------------------------------------------------------*/
36#include <debug.h>
37
38#define VCO_MIN_CLOCK 350000000
39#define VCO_MAX_CLOCK 750000000
40
41#define HALFBIT_CLOCK1 175000000 /* VCO min clock div by 2 */
42#define HALFBIT_CLOCK2 88000000 /* VCO min clock div by 4 */
43#define HALFBIT_CLOCK3 44000000 /* VCO min clock div by 8 */
44#define HALFBIT_CLOCK4 40000000 /* VCO min clock div by 9 */
45
Dhaval Pateld19fcf12014-08-12 13:16:05 -070046#define VCO_MIN_CLOCK_20NM 1000000000
47#define VCO_MAX_CLOCK_20NM 2000000000
48
49#define HALF_VCO_MIN_CLOCK_20NM (VCO_MIN_CLOCK_20NM >> 1)
50
51#define HALFBIT_CLOCK1_20NM 500000000 /* VCO min clock div by 2 */
52#define HALFBIT_CLOCK2_20NM 250000000 /* VCO min clock div by 4 */
53#define HALFBIT_CLOCK3_20NM 125000000 /* VCO min clock div by 8 */
54#define HALFBIT_CLOCK4_20NM 120000000 /* VCO min clock div by 9 */
55
Arpita Banerjeeda0c39a2013-05-24 16:12:45 -070056#define BITS_24 24
57#define BITS_18 18
58#define BITS_16 16
59
60/*---------------------------------------------------------------------------*/
61/* Structure definition */
62/*---------------------------------------------------------------------------*/
63
64uint32_t calculate_clock_config(struct msm_panel_info *pinfo);
65
66#endif /*_GCDB_AUTOPLL_H_ */