Hi,
I am attempting to get MIPI DSI signals out from my imx8m - however I don't think I have my device tree configured quite right and I need some help.
I am including these from imx8mm.dtsi:
aips4: bus@32c00000 {
compatible = "fsl,aips-bus", "simple-bus";
reg = <0x32c00000 0x400000>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x32c00000 0x32c00000 0x400000>;
lcdif: lcdif@32e00000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,imx8mm-lcdif";
reg = <0x32e00000 0x10000>;
clocks = <&clk IMX8MM_CLK_LCDIF_PIXEL>,
<&clk IMX8MM_CLK_DISP_AXI_ROOT>,
<&clk IMX8MM_CLK_DISP_APB_ROOT>;
clock-names = "pix", "disp-axi", "disp-apb";
assigned-clocks = <&clk IMX8MM_CLK_LCDIF_PIXEL>,
<&clk IMX8MM_CLK_DISP_AXI>,
<&clk IMX8MM_CLK_DISP_APB>;
assigned-clock-parents = <&clk IMX8MM_VIDEO_PLL1_OUT>,
<&clk IMX8MM_SYS_PLL2_1000M>,
<&clk IMX8MM_SYS_PLL1_800M>;
assigned-clock-rate = <594000000>, <500000000>, <200000000>;
interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
lcdif-gpr = <&dispmix_gpr>;
resets = <&lcdif_resets>;
power-domains = <&dispmix_pd>;
status = "disabled";
lcdif_disp0: port@0 {
reg = <0>;
lcdif_to_dsim: endpoint {
remote-endpoint = <&dsim_from_lcdif>;
};
};
};
mipi_dsi: mipi_dsi@32e10000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,imx8mm-mipi-dsim";
reg = <0x32e10000 0x400>;
clocks = <&clk IMX8MM_CLK_DSI_CORE>,
<&clk IMX8MM_CLK_DSI_PHY_REF>;
clock-names = "cfg", "pll-ref";
assigned-clocks = <&clk IMX8MM_CLK_DSI_CORE>,
<&clk IMX8MM_CLK_DSI_PHY_REF>;
assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_266M>,
<&clk IMX8MM_CLK_24M>;
assigned-clock-rates = <266000000>, <12000000>;
interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
dsi-gpr = <&dispmix_gpr>;
resets = <&mipi_dsi_resets>;
power-domains = <&mipi_pd>;
status = "disabled";
port@0 {
dsim_from_lcdif: endpoint {
remote-endpoint = <&lcdif_to_dsim>;
};
};
};
In my device tree I have edited the properties as follows:
&i2c4 {
#address-cells = <1>;
#size-cells = <0>;
clock-frequency = <100000>; /* 100kHz */
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c4>;
status = "okay";
lt_bridge: lt9211@2d {
compatible = "lontium,lt9211";
reg=<0x2d>;
pinctrl-0 = <&pinctrl_lt9211>;
reset-gpios = <&gpio5 10 GPIO_ACTIVE_LOW>;
/*vccio-supply = <&??>;*/
status = "okay";
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 { /*primary input*/
reg = <0>;
lt9211_mipi_in: endpoint {
remote-endpoint = <&host_mipi_out>;
};
};
/*port@2 { /
reg = <2>;
lt9211_mipi_out: endpoint {
remote-endpoint = <&dsim_from_lcdif>;
};
};*/
};
};
};
&lcdif {
status = "okay";
};
&mipi_dsi {
status = "okay";
port@1 {
host_mipi_out: endpoint {
remote-endpoint = <<9211_mipi_in>;
/*attach-bridge; not needed ??? */
};
};
};
I have verified that the i2c bus works. I am able to use "gpioset 4 10=1" to activate my lt9211 and it responds to commands send over the i2cset and i2cget.
I am a bit confused regarding
https://www.kernel.org/doc/Documentation/devicetree/bindings/display/bridge/lontium%2Clt9211.yaml
which lists both port0 and port2 as required properties. Is port2 supposed to be lcdif_to_dsim or something else? Do I add a new data line to the mipi_dsi node?
The current tree outputs error:
[ 2.216086] [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/bus@32c00000/mipi_dsi@32e10000 to encoder DSI-34: -19
[ 2.235960] imx_sec_dsim_drv 32e10000.mipi_dsi: failed to bind sec dsim bridge: -19
Hello,
It looks like the pincontrol is not dong it jobs cause it have use a gpio in another part of the device tree. But besides that you need module to have the MIPI-DSI running.
Regards