blob: 259abd6d3ccc0b5c3dee00ae8f4e7dafbf08c86f [file] [log] [blame]
Arpita Banerjeeda0c39a2013-05-24 16:12:45 -07001/* Copyright (c) 2013, The Linux Foundation. All rights reserved.
2 *
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
46#define BITS_24 24
47#define BITS_18 18
48#define BITS_16 16
49
50/*---------------------------------------------------------------------------*/
51/* Structure definition */
52/*---------------------------------------------------------------------------*/
53
54uint32_t calculate_clock_config(struct msm_panel_info *pinfo);
55
56#endif /*_GCDB_AUTOPLL_H_ */