Hi Igor,
Thanks for your reply.
I have used the Nitrogen board kernel and added the MIPI DSI support. Now my MIPI driver probe call is coming. During this call, I am getting a kernel crash when I traced the problem I found out, it is happening in the below line of linux-imx6/drivers/videofbdev/mxc/mipi_dsi.c MIPI driver.
mux = mipi_dsi->bus_mux->get_mux(dev_id, disp_id);
The reason is, below function is not implemented for IMX7.
static struct mipi_dsi_bus_mux imx6dl_mipi_dsi_mux[] = {
{
.reg = IOMUXC_GPR3,
.mask = IMX6Q_GPR3_MIPI_MUX_CTL_MASK,
.get_mux = imx6dl_mipi_dsi_get_mux,
},
};
The values are defined in include/linux/mfd/syscon folder in the file imx6q-iomuxc-gpr.h
#define IMX6Q_GPR3_MIPI_MUX_CTL_MASK (0x3 << 4)
But in imx7-iomuxc-gpr.h file, values for MIPI GPR3 are not defined.
Below is the content of imx7-iomuxc-gpr.h file.
/*
* Copyright (C) 2015 Freescale Semiconductor, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef __LINUX_IMX7_IOMUXC_GPR_H
#define __LINUX_IMX7_IOMUXC_GPR_H
#include <linux/bitops.h>
#define IOMUXC_GPR0 0x00
#define IOMUXC_GPR1 0x04
#define IOMUXC_GPR2 0x08
#define IOMUXC_GPR3 0x0c
#define IOMUXC_GPR4 0x10
#define IOMUXC_GPR5 0x14
#define IOMUXC_GPR6 0x18
#define IOMUXC_GPR7 0x1c
#define IOMUXC_GPR8 0x20
#define IOMUXC_GPR9 0x24
#define IOMUXC_GPR10 0x28
#define IOMUXC_GPR11 0x2c
#define IOMUXC_GPR12 0x30
#define IOMUXC_GPR13 0x34
#define IOMUXC_GPR14 0x38
#define IOMUXC_GPR15 0x3c
#define IOMUXC_GPR16 0x40
#define IOMUXC_GPR17 0x44
#define IOMUXC_GPR18 0x48
#define IOMUXC_GPR19 0x4c
#define IOMUXC_GPR20 0x50
#define IOMUXC_GPR21 0x54
#define IOMUXC_GPR22 0x58
/* For imx7d iomux gpr register field define */
#define IMX7D_GPR0_ENET_MDIO_OPEN_DRAIN_MASK (0x3 << 7)
#define IMX7D_GPR1_IRQ_MASK (0x1 << 12)
#define IMX7D_GPR1_ENET1_TX_CLK_SEL_MASK (0x1 << 13)
#define IMX7D_GPR1_ENET2_TX_CLK_SEL_MASK (0x1 << 14)
#define IMX7D_GPR1_ENET_TX_CLK_SEL_MASK (0x3 << 13)
#define IMX7D_GPR1_ENET1_CLK_DIR_MASK (0x1 << 17)
#define IMX7D_GPR1_ENET2_CLK_DIR_MASK (0x1 << 18)
#define IMX7D_GPR1_ENET_CLK_DIR_MASK (0x3 << 17)
#define IMX7D_GPR5_CSI_MUX_CONTROL_MIPI (0x1 << 4)
#endif /* __LINUX_IMX7_IOMUXC_GPR_H */
May I ask you, what is the purpose of below code block in MIPI DSI driver? Is this code block is needed for MIPI DSI?
mipi_dsi->regmap = syscon_regmap_lookup_by_phandle(np, "gpr");
if (IS_ERR(mipi_dsi->regmap)) {
dev_err(&pdev->dev, "failed to get parent regmap\n");
ret = PTR_ERR(mipi_dsi->regmap);
goto get_parent_regmap_fail;
}
mux = mipi_dsi->bus_mux->get_mux(dev_id, disp_id);
mipi_dsi->lcd_panel = kstrdup(lcd_panel, GFP_KERNEL);
if (!mipi_dsi->lcd_panel) {
dev_err(&pdev->dev, "failed to allocate lcd panel name\n");
ret = -ENOMEM;
goto kstrdup_fail;
}
And how can I define equivalent value for IMX6Q_GPR3_MIPI_MUX_CTL_MASK and IOMUXC_GPR3 in IMX7?
Please let me know your suggestions.