From 4020142a5e0d4b2fa05289bba247a8d592b56fbf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lothar=20Wa=C3=9Fmann?= Date: Fri, 23 Dec 2016 12:56:32 +0100 Subject: [PATCH] karo: tx6: support MIPI variant in board name The TX6Q-1230 is physically the same as TX6Q-1030 with the distinction, that the MIPI interface is used rather than the LCD interface. This is only a cosmetic change to adjust the displayed board name. --- board/karo/tx6/tx6qdl.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/board/karo/tx6/tx6qdl.c b/board/karo/tx6/tx6qdl.c index 1a1e155379..9a72321dd1 100644 --- a/board/karo/tx6/tx6qdl.c +++ b/board/karo/tx6/tx6qdl.c @@ -534,6 +534,17 @@ static int tx6_pmic_probe(void) return -EINVAL; } +static int tx6_mipi(void) +{ + struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR; + struct fuse_bank5_regs *fuse = (void *)ocotp->bank[5].fuse_regs; + u32 pad_settings = readl(&fuse->pad_settings); + + debug("Fuse pad_settings @ %p = %02x\n", + &fuse->pad_settings, pad_settings); + return !(pad_settings & 1); +} + int board_init(void) { int ret; @@ -548,7 +559,7 @@ int board_init(void) printf("Board: Ka-Ro TX6%s-%d%d%d%c\n", tx6_mod_suffix, is_cpu_type(MXC_CPU_MX6Q) ? 1 : 8, - is_lvds(), tx6_get_mod_rev(pmic_id), + tx6_mipi() ? 2 : is_lvds(), tx6_get_mod_rev(pmic_id), tx6_mem_suffix()); get_hab_status(); -- 2.39.2