.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (c) 2016 Linaro Limited. |
---|
3 | 4 | * Copyright (c) 2014-2016 Hisilicon Limited. |
---|
4 | | - * |
---|
5 | | - * This program is free software; you can redistribute it and/or modify |
---|
6 | | - * it under the terms of the GNU General Public License version 2 as |
---|
7 | | - * published by the Free Software Foundation. |
---|
8 | | - * |
---|
9 | 5 | */ |
---|
10 | 6 | |
---|
11 | 7 | #ifndef __DW_DSI_REG_H__ |
---|
12 | 8 | #define __DW_DSI_REG_H__ |
---|
13 | 9 | |
---|
14 | 10 | #define MASK(x) (BIT(x) - 1) |
---|
15 | | - |
---|
| 11 | +#define DEFAULT_MAX_TX_ESC_CLK (10 * 1000000UL) //for hikey960 |
---|
16 | 12 | /* |
---|
17 | 13 | * regs |
---|
18 | 14 | */ |
---|
.. | .. |
---|
56 | 52 | #define VID_VACTIVE_LINES 0x60 /* Vertical resolution */ |
---|
57 | 53 | #define VID_PKT_SIZE 0x3C /* Video packet size */ |
---|
58 | 54 | #define VID_MODE_CFG 0x38 /* Video mode configuration */ |
---|
| 55 | +/***************************for hikey960***********************************/ |
---|
| 56 | +#define GEN_HDR 0x6c |
---|
| 57 | +#define GEN_HDATA(data) (((data) & 0xffff) << 8) |
---|
| 58 | +#define GEN_HDATA_MASK (0xffff << 8) |
---|
| 59 | +#define GEN_HTYPE(type) (((type) & 0xff) << 0) |
---|
| 60 | +#define GEN_HTYPE_MASK 0xff |
---|
| 61 | +#define GEN_PLD_DATA 0x70 |
---|
| 62 | +#define CMD_PKT_STATUS 0x74 |
---|
| 63 | +#define GEN_CMD_EMPTY BIT(0) |
---|
| 64 | +#define GEN_CMD_FULL BIT(1) |
---|
| 65 | +#define GEN_PLD_W_EMPTY BIT(2) |
---|
| 66 | +#define GEN_PLD_W_FULL BIT(3) |
---|
| 67 | +#define GEN_PLD_R_EMPTY BIT(4) |
---|
| 68 | +#define GEN_PLD_R_FULL BIT(5) |
---|
| 69 | +#define GEN_RD_CMD_BUSY BIT(6) |
---|
| 70 | +#define CMD_MODE_CFG 0x68 |
---|
| 71 | +#define MAX_RD_PKT_SIZE_LP BIT(24) |
---|
| 72 | +#define DCS_LW_TX_LP BIT(19) |
---|
| 73 | +#define DCS_SR_0P_TX_LP BIT(18) |
---|
| 74 | +#define DCS_SW_1P_TX_LP BIT(17) |
---|
| 75 | +#define DCS_SW_0P_TX_LP BIT(16) |
---|
| 76 | +#define GEN_LW_TX_LP BIT(14) |
---|
| 77 | +#define GEN_SR_2P_TX_LP BIT(13) |
---|
| 78 | +#define GEN_SR_1P_TX_LP BIT(12) |
---|
| 79 | +#define GEN_SR_0P_TX_LP BIT(11) |
---|
| 80 | +#define GEN_SW_2P_TX_LP BIT(10) |
---|
| 81 | +#define GEN_SW_1P_TX_LP BIT(9) |
---|
| 82 | +#define GEN_SW_0P_TX_LP BIT(8) |
---|
| 83 | +#define EN_ACK_RQST BIT(1) |
---|
| 84 | +#define EN_TEAR_FX BIT(0) |
---|
| 85 | +#define CMD_PKT_STATUS_TIMEOUT_US 20000 |
---|
| 86 | +#define CMD_MODE_ALL_LP (MAX_RD_PKT_SIZE_LP | \ |
---|
| 87 | + DCS_LW_TX_LP | \ |
---|
| 88 | + DCS_SR_0P_TX_LP | \ |
---|
| 89 | + DCS_SW_1P_TX_LP | \ |
---|
| 90 | + DCS_SW_0P_TX_LP | \ |
---|
| 91 | + GEN_LW_TX_LP | \ |
---|
| 92 | + GEN_SR_2P_TX_LP | \ |
---|
| 93 | + GEN_SR_1P_TX_LP | \ |
---|
| 94 | + GEN_SR_0P_TX_LP | \ |
---|
| 95 | + GEN_SW_2P_TX_LP | \ |
---|
| 96 | + GEN_SW_1P_TX_LP | \ |
---|
| 97 | + GEN_SW_0P_TX_LP) |
---|
| 98 | +/***************************for hikey960***********************************/ |
---|
59 | 99 | #define PHY_TMR_CFG 0x9C /* Data lanes timing configuration */ |
---|
60 | 100 | #define BTA_TO_CNT 0x8C /* Response timeout definition */ |
---|
61 | 101 | #define PHY_TMR_LPCLK_CFG 0x98 /* clock lane timing configuration */ |
---|