diff options
Diffstat (limited to 'drivers/gpu/drm')
| -rw-r--r-- | drivers/gpu/drm/tegra/drm.c | 1 | ||||
| -rw-r--r-- | drivers/gpu/drm/tegra/sor.c | 110 |
2 files changed, 111 insertions, 0 deletions
diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c index 0ed6fa8ac446..0ee924e3d0a1 100644 --- a/drivers/gpu/drm/tegra/drm.c +++ b/drivers/gpu/drm/tegra/drm.c | |||
| @@ -1257,6 +1257,7 @@ static const struct of_device_id host1x_drm_subdevs[] = { | |||
| 1257 | { .compatible = "nvidia,tegra186-vic", }, | 1257 | { .compatible = "nvidia,tegra186-vic", }, |
| 1258 | { .compatible = "nvidia,tegra194-display", }, | 1258 | { .compatible = "nvidia,tegra194-display", }, |
| 1259 | { .compatible = "nvidia,tegra194-dc", }, | 1259 | { .compatible = "nvidia,tegra194-dc", }, |
| 1260 | { .compatible = "nvidia,tegra194-sor", }, | ||
| 1260 | { /* sentinel */ } | 1261 | { /* sentinel */ } |
| 1261 | }; | 1262 | }; |
| 1262 | 1263 | ||
diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c index d7fe9f15def1..b129da2e5afd 100644 --- a/drivers/gpu/drm/tegra/sor.c +++ b/drivers/gpu/drm/tegra/sor.c | |||
| @@ -282,6 +282,85 @@ static const struct tegra_sor_hdmi_settings tegra186_sor_hdmi_defaults[] = { | |||
| 282 | } | 282 | } |
| 283 | }; | 283 | }; |
| 284 | 284 | ||
| 285 | static const struct tegra_sor_hdmi_settings tegra194_sor_hdmi_defaults[] = { | ||
| 286 | { | ||
| 287 | .frequency = 54000000, | ||
| 288 | .vcocap = 0, | ||
| 289 | .filter = 5, | ||
| 290 | .ichpmp = 5, | ||
| 291 | .loadadj = 3, | ||
| 292 | .tmds_termadj = 0xf, | ||
| 293 | .tx_pu_value = 0, | ||
| 294 | .bg_temp_coef = 3, | ||
| 295 | .bg_vref_level = 8, | ||
| 296 | .avdd10_level = 4, | ||
| 297 | .avdd14_level = 4, | ||
| 298 | .sparepll = 0x54, | ||
| 299 | .drive_current = { 0x3a, 0x3a, 0x3a, 0x33 }, | ||
| 300 | .preemphasis = { 0x00, 0x00, 0x00, 0x00 }, | ||
| 301 | }, { | ||
| 302 | .frequency = 75000000, | ||
| 303 | .vcocap = 1, | ||
| 304 | .filter = 5, | ||
| 305 | .ichpmp = 5, | ||
| 306 | .loadadj = 3, | ||
| 307 | .tmds_termadj = 0xf, | ||
| 308 | .tx_pu_value = 0, | ||
| 309 | .bg_temp_coef = 3, | ||
| 310 | .bg_vref_level = 8, | ||
| 311 | .avdd10_level = 4, | ||
| 312 | .avdd14_level = 4, | ||
| 313 | .sparepll = 0x44, | ||
| 314 | .drive_current = { 0x3a, 0x3a, 0x3a, 0x33 }, | ||
| 315 | .preemphasis = { 0x00, 0x00, 0x00, 0x00 }, | ||
| 316 | }, { | ||
| 317 | .frequency = 150000000, | ||
| 318 | .vcocap = 3, | ||
| 319 | .filter = 5, | ||
| 320 | .ichpmp = 5, | ||
| 321 | .loadadj = 3, | ||
| 322 | .tmds_termadj = 15, | ||
| 323 | .tx_pu_value = 0x66 /* 0 */, | ||
| 324 | .bg_temp_coef = 3, | ||
| 325 | .bg_vref_level = 8, | ||
| 326 | .avdd10_level = 4, | ||
| 327 | .avdd14_level = 4, | ||
| 328 | .sparepll = 0x00, /* 0x34 */ | ||
| 329 | .drive_current = { 0x3a, 0x3a, 0x3a, 0x37 }, | ||
| 330 | .preemphasis = { 0x00, 0x00, 0x00, 0x00 }, | ||
| 331 | }, { | ||
| 332 | .frequency = 300000000, | ||
| 333 | .vcocap = 3, | ||
| 334 | .filter = 5, | ||
| 335 | .ichpmp = 5, | ||
| 336 | .loadadj = 3, | ||
| 337 | .tmds_termadj = 15, | ||
| 338 | .tx_pu_value = 64, | ||
| 339 | .bg_temp_coef = 3, | ||
| 340 | .bg_vref_level = 8, | ||
| 341 | .avdd10_level = 4, | ||
| 342 | .avdd14_level = 4, | ||
| 343 | .sparepll = 0x34, | ||
| 344 | .drive_current = { 0x3d, 0x3d, 0x3d, 0x33 }, | ||
| 345 | .preemphasis = { 0x00, 0x00, 0x00, 0x00 }, | ||
| 346 | }, { | ||
| 347 | .frequency = 600000000, | ||
| 348 | .vcocap = 3, | ||
| 349 | .filter = 5, | ||
| 350 | .ichpmp = 5, | ||
| 351 | .loadadj = 3, | ||
| 352 | .tmds_termadj = 12, | ||
| 353 | .tx_pu_value = 96, | ||
| 354 | .bg_temp_coef = 3, | ||
| 355 | .bg_vref_level = 8, | ||
| 356 | .avdd10_level = 4, | ||
| 357 | .avdd14_level = 4, | ||
| 358 | .sparepll = 0x34, | ||
| 359 | .drive_current = { 0x3d, 0x3d, 0x3d, 0x33 }, | ||
| 360 | .preemphasis = { 0x00, 0x00, 0x00, 0x00 }, | ||
| 361 | } | ||
| 362 | }; | ||
| 363 | |||
| 285 | struct tegra_sor_regs { | 364 | struct tegra_sor_regs { |
| 286 | unsigned int head_state0; | 365 | unsigned int head_state0; |
| 287 | unsigned int head_state1; | 366 | unsigned int head_state1; |
| @@ -2894,7 +2973,38 @@ static const struct tegra_sor_soc tegra186_sor1 = { | |||
| 2894 | .xbar_cfg = tegra124_sor_xbar_cfg, | 2973 | .xbar_cfg = tegra124_sor_xbar_cfg, |
| 2895 | }; | 2974 | }; |
| 2896 | 2975 | ||
| 2976 | static const struct tegra_sor_regs tegra194_sor_regs = { | ||
| 2977 | .head_state0 = 0x151, | ||
| 2978 | .head_state1 = 0x155, | ||
| 2979 | .head_state2 = 0x159, | ||
| 2980 | .head_state3 = 0x15d, | ||
| 2981 | .head_state4 = 0x161, | ||
| 2982 | .head_state5 = 0x165, | ||
| 2983 | .pll0 = 0x169, | ||
| 2984 | .pll1 = 0x16a, | ||
| 2985 | .pll2 = 0x16b, | ||
| 2986 | .pll3 = 0x16c, | ||
| 2987 | .dp_padctl0 = 0x16e, | ||
| 2988 | .dp_padctl2 = 0x16f, | ||
| 2989 | }; | ||
| 2990 | |||
| 2991 | static const struct tegra_sor_soc tegra194_sor = { | ||
| 2992 | .supports_edp = true, | ||
| 2993 | .supports_lvds = false, | ||
| 2994 | .supports_hdmi = true, | ||
| 2995 | .supports_dp = true, | ||
| 2996 | |||
| 2997 | .regs = &tegra194_sor_regs, | ||
| 2998 | .has_nvdisplay = true, | ||
| 2999 | |||
| 3000 | .num_settings = ARRAY_SIZE(tegra194_sor_hdmi_defaults), | ||
| 3001 | .settings = tegra194_sor_hdmi_defaults, | ||
| 3002 | |||
| 3003 | .xbar_cfg = tegra210_sor_xbar_cfg, | ||
| 3004 | }; | ||
| 3005 | |||
| 2897 | static const struct of_device_id tegra_sor_of_match[] = { | 3006 | static const struct of_device_id tegra_sor_of_match[] = { |
| 3007 | { .compatible = "nvidia,tegra194-sor", .data = &tegra194_sor }, | ||
| 2898 | { .compatible = "nvidia,tegra186-sor1", .data = &tegra186_sor1 }, | 3008 | { .compatible = "nvidia,tegra186-sor1", .data = &tegra186_sor1 }, |
| 2899 | { .compatible = "nvidia,tegra186-sor", .data = &tegra186_sor }, | 3009 | { .compatible = "nvidia,tegra186-sor", .data = &tegra186_sor }, |
| 2900 | { .compatible = "nvidia,tegra210-sor1", .data = &tegra210_sor1 }, | 3010 | { .compatible = "nvidia,tegra210-sor1", .data = &tegra210_sor1 }, |
