forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c
....@@ -1,15 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (c) 2016, The Linux Foundation. All rights reserved.
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License version 2 and
6
- * only version 2 as published by the Free Software Foundation.
7
- *
8
- * This program is distributed in the hope that it will be useful,
9
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
- * GNU General Public License for more details.
124 */
5
+
6
+#include <linux/delay.h>
137
148 #include "dsi_phy.h"
159 #include "dsi.xml.h"
....@@ -64,7 +58,7 @@
6458 void __iomem *lane_base = phy->lane_base;
6559
6660 if (msm_dsi_dphy_timing_calc_v2(timing, clk_req)) {
67
- dev_err(&phy->pdev->dev,
61
+ DRM_DEV_ERROR(&phy->pdev->dev,
6862 "%s: D-PHY timing calculation failed\n", __func__);
6963 return -EINVAL;
7064 }
....@@ -115,7 +109,7 @@
115109
116110 ret = msm_dsi_pll_set_usecase(phy->pll, phy->usecase);
117111 if (ret) {
118
- dev_err(&phy->pdev->dev, "%s: set pll usecase failed, %d\n",
112
+ DRM_DEV_ERROR(&phy->pdev->dev, "%s: set pll usecase failed, %d\n",
119113 __func__, ret);
120114 return ret;
121115 }
....@@ -142,7 +136,7 @@
142136 phy->lane_base = msm_ioremap(pdev, "dsi_phy_lane",
143137 "DSI_PHY_LANE");
144138 if (IS_ERR(phy->lane_base)) {
145
- dev_err(&pdev->dev, "%s: failed to map phy lane base\n",
139
+ DRM_DEV_ERROR(&pdev->dev, "%s: failed to map phy lane base\n",
146140 __func__);
147141 return -ENOMEM;
148142 }
....@@ -167,3 +161,21 @@
167161 .io_start = { 0x994400, 0x996400 },
168162 .num_dsi_phy = 2,
169163 };
164
+
165
+const struct msm_dsi_phy_cfg dsi_phy_14nm_660_cfgs = {
166
+ .type = MSM_DSI_PHY_14NM,
167
+ .src_pll_truthtable = { {false, false}, {true, false} },
168
+ .reg_cfg = {
169
+ .num = 1,
170
+ .regs = {
171
+ {"vcca", 73400, 32},
172
+ },
173
+ },
174
+ .ops = {
175
+ .enable = dsi_14nm_phy_enable,
176
+ .disable = dsi_14nm_phy_disable,
177
+ .init = dsi_14nm_phy_init,
178
+ },
179
+ .io_start = { 0xc994400, 0xc996000 },
180
+ .num_dsi_phy = 2,
181
+};