Commit 2519b6cd920f6d315bc463ba292aa89177c52fe7
1 parent
e4ab28d1b2
Exists in
smarc_8mm-imx_v2018.03_4.14.98_2.0.0_ga
and in
4 other branches
MLK-20971 imx8mq: Not disable DCSS for 8MQLite new part
The iMX8MQLite new part will not disable DCSS in fuse. So change the codes to check the DCSS fuse before disable relevant FDT nodes and u-boot HDMI splash screen. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 9e6ab0397b8d94de8b904250884726e58633066b)
Showing 3 changed files with 25 additions and 5 deletions Side-by-side Diff
arch/arm/include/asm/arch-imx8m/sys_proto.h
1 | 1 | /* |
2 | - * Copyright (C) 2017 NXP | |
2 | + * Copyright (C) 2017-2019 NXP | |
3 | 3 | * |
4 | 4 | * SPDX-License-Identifier: GPL-2.0+ |
5 | 5 | */ |
... | ... | @@ -16,5 +16,8 @@ |
16 | 16 | extern unsigned long rom_pointer[]; |
17 | 17 | enum boot_device get_boot_device(void); |
18 | 18 | bool is_usb_boot(void); |
19 | +#ifdef CONFIG_IMX8MQ | |
20 | +bool check_dcss_fused(void); | |
21 | +#endif | |
19 | 22 | #endif |
arch/arm/mach-imx/imx8m/soc.c
... | ... | @@ -398,6 +398,20 @@ |
398 | 398 | } |
399 | 399 | |
400 | 400 | #ifdef CONFIG_IMX8MQ |
401 | +bool check_dcss_fused(void) | |
402 | +{ | |
403 | + struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR; | |
404 | + struct fuse_bank *bank = &ocotp->bank[1]; | |
405 | + struct fuse_bank1_regs *fuse = | |
406 | + (struct fuse_bank1_regs *)bank->fuse_regs; | |
407 | + | |
408 | + u32 value = readl(&fuse->tester4); | |
409 | + if (value & 0x4000000) | |
410 | + return true; | |
411 | + | |
412 | + return false; | |
413 | +} | |
414 | + | |
401 | 415 | static int disable_mipi_dsi_nodes(void *blob) |
402 | 416 | { |
403 | 417 | const char *nodes_path[] = { |
... | ... | @@ -596,8 +610,11 @@ |
596 | 610 | |
597 | 611 | if (is_imx8mql()) { |
598 | 612 | disable_vpu_nodes(blob); |
599 | - disable_dcss_nodes(blob); | |
600 | - check_mipi_dsi_nodes(blob); | |
613 | + if (check_dcss_fused()) { | |
614 | + printf("DCSS is fused\n"); | |
615 | + disable_dcss_nodes(blob); | |
616 | + check_mipi_dsi_nodes(blob); | |
617 | + } | |
601 | 618 | } |
602 | 619 | |
603 | 620 | if (is_imx8md()) |
arch/arm/mach-imx/imx8m/video_common.c
1 | 1 | /* |
2 | - * Copyright 2018 NXP | |
2 | + * Copyright 2018-2019 NXP | |
3 | 3 | * |
4 | 4 | * SPDX-License-Identifier: GPL-2.0+ |
5 | 5 | */ |
... | ... | @@ -709,7 +709,7 @@ |
709 | 709 | { |
710 | 710 | debug("entering %s()\n", __func__); |
711 | 711 | |
712 | - if (is_imx8mql()) { | |
712 | + if (is_imx8mql() && check_dcss_fused()) { | |
713 | 713 | printf("dcss is diabled on i.MX8MQL\n"); |
714 | 714 | return -EPERM; |
715 | 715 | } |