Siddhartha Agrawal | acdaf5b | 2013-01-22 18:14:53 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. |
Deepa Dinamani | ca5ad85 | 2012-05-07 18:19:47 -0700 | [diff] [blame] | 2 | * |
| 3 | * Redistribution and use in source and binary forms, with or without |
Deepa Dinamani | 32bfad0 | 2012-11-02 12:15:05 -0700 | [diff] [blame] | 4 | * 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 Dinamani | ca5ad85 | 2012-05-07 18:19:47 -0700 | [diff] [blame] | 15 | * |
Deepa Dinamani | 32bfad0 | 2012-11-02 12:15:05 -0700 | [diff] [blame] | 16 | * 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 Dinamani | ca5ad85 | 2012-05-07 18:19:47 -0700 | [diff] [blame] | 27 | */ |
| 28 | |
Amol Jadi | 29f9503 | 2012-06-22 12:52:54 -0700 | [diff] [blame] | 29 | #ifndef __COPPER_CLOCK_H |
| 30 | #define __COPPER_CLOCK_H |
| 31 | |
| 32 | #include <clock.h> |
| 33 | #include <clock_lib2.h> |
| 34 | |
Neeti Desai | ac01127 | 2012-08-29 18:24:54 -0700 | [diff] [blame] | 35 | #define UART_DM_CLK_RX_TX_BIT_RATE 0xCC |
Amol Jadi | 29f9503 | 2012-06-22 12:52:54 -0700 | [diff] [blame] | 36 | |
Siddhartha Agrawal | acdaf5b | 2013-01-22 18:14:53 -0800 | [diff] [blame] | 37 | #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 Jadi | 29f9503 | 2012-06-22 12:52:54 -0700 | [diff] [blame] | 66 | void platform_clock_init(void); |
Deepa Dinamani | 26e9326 | 2012-05-21 17:35:14 -0700 | [diff] [blame] | 67 | |
Deepa Dinamani | ca5ad85 | 2012-05-07 18:19:47 -0700 | [diff] [blame] | 68 | void clock_init_mmc(uint32_t interface); |
| 69 | void clock_config_mmc(uint32_t interface, uint32_t freq); |
Deepa Dinamani | 26e9326 | 2012-05-21 17:35:14 -0700 | [diff] [blame] | 70 | void clock_config_uart_dm(uint8_t id); |
Amol Jadi | 29f9503 | 2012-06-22 12:52:54 -0700 | [diff] [blame] | 71 | void hsusb_clock_init(void); |
Deepa Dinamani | 32bfad0 | 2012-11-02 12:15:05 -0700 | [diff] [blame] | 72 | void clock_config_ce(uint8_t instance); |
Siddhartha Agrawal | acdaf5b | 2013-01-22 18:14:53 -0800 | [diff] [blame] | 73 | void mdp_clock_init(void); |
| 74 | void mdp_gdsc_ctrl(uint8_t enable); |
sundarajan srinivasan | 6aaa50c | 2013-02-27 14:18:57 -0800 | [diff] [blame^] | 75 | void clock_ce_enable(uint8_t instance); |
| 76 | void clock_ce_disable(uint8_t instance); |
Amol Jadi | 29f9503 | 2012-06-22 12:52:54 -0700 | [diff] [blame] | 77 | |
| 78 | #endif |