blob: 1bb371b6ff63b855a6e7e36e70b13ea10630008d [file] [log] [blame]
Siddhartha Agrawalacdaf5b2013-01-22 18:14:53 -08001/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
Deepa Dinamanica5ad852012-05-07 18:19:47 -07002 *
3 * Redistribution and use in source and binary forms, with or without
Deepa Dinamani32bfad02012-11-02 12:15:05 -07004 * modification, are permitted provided that the following conditions are
5 * 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
9 * copyright notice, this list of conditions and the following
10 * disclaimer in the documentation and/or other materials provided
11 * with the 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.
Deepa Dinamanica5ad852012-05-07 18:19:47 -070015 *
Deepa Dinamani32bfad02012-11-02 12:15:05 -070016 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Deepa Dinamanica5ad852012-05-07 18:19:47 -070027 */
28
Amol Jadi29f95032012-06-22 12:52:54 -070029#ifndef __COPPER_CLOCK_H
30#define __COPPER_CLOCK_H
31
32#include <clock.h>
33#include <clock_lib2.h>
34
Neeti Desaiac011272012-08-29 18:24:54 -070035#define UART_DM_CLK_RX_TX_BIT_RATE 0xCC
Amol Jadi29f95032012-06-22 12:52:54 -070036
Siddhartha Agrawalacdaf5b2013-01-22 18:14:53 -080037#define REG_MM(off) (MSM_MMSS_CLK_CTL_BASE + (off))
38
39#define MDP_GDSCR REG_MM(0x2304)
40#define GDSC_POWER_ON_BIT BIT(31)
41#define GDSC_POWER_ON_STATUS_BIT BIT(29)
42
43#define MDP_CMD_RCGR REG_MM(0x2040)
44#define MDP_CFG_RCGR REG_MM(0x2044)
45#define MDP_CBCR REG_MM(0x231C)
46#define MDP_LUT_CBCR REG_MM(0x2320)
47#define MDP_AHB_CBCR REG_MM(0x2308)
48
49#define MDP_AXI_CMD_RCGR REG_MM(0x5040)
50#define MDP_AXI_CFG_RCGR REG_MM(0x5044)
51
52#define MDP_AXI_CBCR REG_MM(0x2310)
53#define MMSS_S0_AXI_CBCR REG_MM(0x5064)
54#define MMSS_MMSSNOC_AXI_CBCR REG_MM(0x506C)
55
56#define DSI_BYTE0_CMD_RCGR REG_MM(0x2120)
57#define DSI_BYTE0_CFG_RCGR REG_MM(0x2124)
58#define DSI_BYTE0_CBCR REG_MM(0x233C)
59#define DSI_ESC0_CMD_RCGR REG_MM(0x2160)
60#define DSI_ESC0_CFG_RCGR REG_MM(0x2164)
61#define DSI_ESC0_CBCR REG_MM(0x2344)
62#define DSI_PIXEL0_CMD_RCGR REG_MM(0x2000)
63#define DSI_PIXEL0_CFG_RCGR REG_MM(0x2004)
64#define DSI_PIXEL0_CBCR REG_MM(0x2314)
65
Amol Jadi29f95032012-06-22 12:52:54 -070066void platform_clock_init(void);
Deepa Dinamani26e93262012-05-21 17:35:14 -070067
Deepa Dinamanica5ad852012-05-07 18:19:47 -070068void clock_init_mmc(uint32_t interface);
69void clock_config_mmc(uint32_t interface, uint32_t freq);
Deepa Dinamani26e93262012-05-21 17:35:14 -070070void clock_config_uart_dm(uint8_t id);
Amol Jadi29f95032012-06-22 12:52:54 -070071void hsusb_clock_init(void);
Deepa Dinamani32bfad02012-11-02 12:15:05 -070072void clock_config_ce(uint8_t instance);
Siddhartha Agrawalacdaf5b2013-01-22 18:14:53 -080073void mdp_clock_init(void);
74void mdp_gdsc_ctrl(uint8_t enable);
Amol Jadi29f95032012-06-22 12:52:54 -070075
76#endif