.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (c) 2015, 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. |
---|
12 | 4 | */ |
---|
13 | 5 | |
---|
14 | 6 | #include "dsi_cfg.h" |
---|
.. | .. |
---|
74 | 66 | .num_dsi = 1, |
---|
75 | 67 | }; |
---|
76 | 68 | |
---|
| 69 | +static const char * const dsi_8976_bus_clk_names[] = { |
---|
| 70 | + "mdp_core", "iface", "bus", |
---|
| 71 | +}; |
---|
| 72 | + |
---|
| 73 | +static const struct msm_dsi_config msm8976_dsi_cfg = { |
---|
| 74 | + .io_offset = DSI_6G_REG_SHIFT, |
---|
| 75 | + .reg_cfg = { |
---|
| 76 | + .num = 3, |
---|
| 77 | + .regs = { |
---|
| 78 | + {"gdsc", -1, -1}, |
---|
| 79 | + {"vdda", 100000, 100}, /* 1.2 V */ |
---|
| 80 | + {"vddio", 100000, 100}, /* 1.8 V */ |
---|
| 81 | + }, |
---|
| 82 | + }, |
---|
| 83 | + .bus_clk_names = dsi_8976_bus_clk_names, |
---|
| 84 | + .num_bus_clks = ARRAY_SIZE(dsi_8976_bus_clk_names), |
---|
| 85 | + .io_start = { 0x1a94000, 0x1a96000 }, |
---|
| 86 | + .num_dsi = 2, |
---|
| 87 | +}; |
---|
| 88 | + |
---|
77 | 89 | static const struct msm_dsi_config msm8994_dsi_cfg = { |
---|
78 | 90 | .io_offset = DSI_6G_REG_SHIFT, |
---|
79 | 91 | .reg_cfg = { |
---|
.. | .. |
---|
105 | 117 | static const struct msm_dsi_config msm8996_dsi_cfg = { |
---|
106 | 118 | .io_offset = DSI_6G_REG_SHIFT, |
---|
107 | 119 | .reg_cfg = { |
---|
108 | | - .num = 2, |
---|
| 120 | + .num = 3, |
---|
109 | 121 | .regs = { |
---|
110 | 122 | {"vdda", 18160, 1 }, /* 1.25 V */ |
---|
111 | 123 | {"vcca", 17000, 32 }, /* 0.925 V */ |
---|
.. | .. |
---|
118 | 130 | .num_dsi = 2, |
---|
119 | 131 | }; |
---|
120 | 132 | |
---|
| 133 | +static const char * const dsi_msm8998_bus_clk_names[] = { |
---|
| 134 | + "iface", "bus", "core", |
---|
| 135 | +}; |
---|
| 136 | + |
---|
| 137 | +static const struct msm_dsi_config msm8998_dsi_cfg = { |
---|
| 138 | + .io_offset = DSI_6G_REG_SHIFT, |
---|
| 139 | + .reg_cfg = { |
---|
| 140 | + .num = 2, |
---|
| 141 | + .regs = { |
---|
| 142 | + {"vdd", 367000, 16 }, /* 0.9 V */ |
---|
| 143 | + {"vdda", 62800, 2 }, /* 1.2 V */ |
---|
| 144 | + }, |
---|
| 145 | + }, |
---|
| 146 | + .bus_clk_names = dsi_msm8998_bus_clk_names, |
---|
| 147 | + .num_bus_clks = ARRAY_SIZE(dsi_msm8998_bus_clk_names), |
---|
| 148 | + .io_start = { 0xc994000, 0xc996000 }, |
---|
| 149 | + .num_dsi = 2, |
---|
| 150 | +}; |
---|
| 151 | + |
---|
| 152 | +static const char * const dsi_sdm660_bus_clk_names[] = { |
---|
| 153 | + "iface", "bus", "core", "core_mmss", |
---|
| 154 | +}; |
---|
| 155 | + |
---|
| 156 | +static const struct msm_dsi_config sdm660_dsi_cfg = { |
---|
| 157 | + .io_offset = DSI_6G_REG_SHIFT, |
---|
| 158 | + .reg_cfg = { |
---|
| 159 | + .num = 1, |
---|
| 160 | + .regs = { |
---|
| 161 | + {"vdda", 12560, 4 }, /* 1.2 V */ |
---|
| 162 | + }, |
---|
| 163 | + }, |
---|
| 164 | + .bus_clk_names = dsi_sdm660_bus_clk_names, |
---|
| 165 | + .num_bus_clks = ARRAY_SIZE(dsi_sdm660_bus_clk_names), |
---|
| 166 | + .io_start = { 0xc994000, 0xc996000 }, |
---|
| 167 | + .num_dsi = 2, |
---|
| 168 | +}; |
---|
| 169 | + |
---|
121 | 170 | static const char * const dsi_sdm845_bus_clk_names[] = { |
---|
| 171 | + "iface", "bus", |
---|
| 172 | +}; |
---|
| 173 | + |
---|
| 174 | +static const char * const dsi_sc7180_bus_clk_names[] = { |
---|
122 | 175 | "iface", "bus", |
---|
123 | 176 | }; |
---|
124 | 177 | |
---|
.. | .. |
---|
136 | 189 | .num_dsi = 2, |
---|
137 | 190 | }; |
---|
138 | 191 | |
---|
139 | | -const static struct msm_dsi_host_cfg_ops msm_dsi_v2_host_ops = { |
---|
| 192 | +static const struct msm_dsi_config sc7180_dsi_cfg = { |
---|
| 193 | + .io_offset = DSI_6G_REG_SHIFT, |
---|
| 194 | + .reg_cfg = { |
---|
| 195 | + .num = 1, |
---|
| 196 | + .regs = { |
---|
| 197 | + {"vdda", 21800, 4 }, /* 1.2 V */ |
---|
| 198 | + }, |
---|
| 199 | + }, |
---|
| 200 | + .bus_clk_names = dsi_sc7180_bus_clk_names, |
---|
| 201 | + .num_bus_clks = ARRAY_SIZE(dsi_sc7180_bus_clk_names), |
---|
| 202 | + .io_start = { 0xae94000 }, |
---|
| 203 | + .num_dsi = 1, |
---|
| 204 | +}; |
---|
| 205 | + |
---|
| 206 | +static const struct msm_dsi_host_cfg_ops msm_dsi_v2_host_ops = { |
---|
| 207 | + .link_clk_set_rate = dsi_link_clk_set_rate_v2, |
---|
140 | 208 | .link_clk_enable = dsi_link_clk_enable_v2, |
---|
141 | 209 | .link_clk_disable = dsi_link_clk_disable_v2, |
---|
142 | 210 | .clk_init_ver = dsi_clk_init_v2, |
---|
.. | .. |
---|
147 | 215 | .calc_clk_rate = dsi_calc_clk_rate_v2, |
---|
148 | 216 | }; |
---|
149 | 217 | |
---|
150 | | -const static struct msm_dsi_host_cfg_ops msm_dsi_6g_host_ops = { |
---|
| 218 | +static const struct msm_dsi_host_cfg_ops msm_dsi_6g_host_ops = { |
---|
| 219 | + .link_clk_set_rate = dsi_link_clk_set_rate_6g, |
---|
151 | 220 | .link_clk_enable = dsi_link_clk_enable_6g, |
---|
152 | 221 | .link_clk_disable = dsi_link_clk_disable_6g, |
---|
153 | 222 | .clk_init_ver = NULL, |
---|
.. | .. |
---|
158 | 227 | .calc_clk_rate = dsi_calc_clk_rate_6g, |
---|
159 | 228 | }; |
---|
160 | 229 | |
---|
161 | | -const static struct msm_dsi_host_cfg_ops msm_dsi_6g_v2_host_ops = { |
---|
| 230 | +static const struct msm_dsi_host_cfg_ops msm_dsi_6g_v2_host_ops = { |
---|
| 231 | + .link_clk_set_rate = dsi_link_clk_set_rate_6g, |
---|
162 | 232 | .link_clk_enable = dsi_link_clk_enable_6g, |
---|
163 | 233 | .link_clk_disable = dsi_link_clk_disable_6g, |
---|
164 | 234 | .clk_init_ver = dsi_clk_init_6g_v2, |
---|
.. | .. |
---|
186 | 256 | &msm8916_dsi_cfg, &msm_dsi_6g_host_ops}, |
---|
187 | 257 | {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V1_4_1, |
---|
188 | 258 | &msm8996_dsi_cfg, &msm_dsi_6g_host_ops}, |
---|
| 259 | + {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V1_4_2, |
---|
| 260 | + &msm8976_dsi_cfg, &msm_dsi_6g_host_ops}, |
---|
| 261 | + {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_1_0, |
---|
| 262 | + &sdm660_dsi_cfg, &msm_dsi_6g_v2_host_ops}, |
---|
| 263 | + {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_2_0, |
---|
| 264 | + &msm8998_dsi_cfg, &msm_dsi_6g_v2_host_ops}, |
---|
189 | 265 | {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_2_1, |
---|
190 | 266 | &sdm845_dsi_cfg, &msm_dsi_6g_v2_host_ops}, |
---|
| 267 | + {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_3_0, |
---|
| 268 | + &sdm845_dsi_cfg, &msm_dsi_6g_v2_host_ops}, |
---|
| 269 | + {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_4_0, |
---|
| 270 | + &sdm845_dsi_cfg, &msm_dsi_6g_v2_host_ops}, |
---|
| 271 | + {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_4_1, |
---|
| 272 | + &sc7180_dsi_cfg, &msm_dsi_6g_v2_host_ops}, |
---|
191 | 273 | }; |
---|
192 | 274 | |
---|
193 | 275 | const struct msm_dsi_cfg_handler *msm_dsi_cfg_get(u32 major, u32 minor) |
---|