Hi community!
I'm trying to use the I2C0 via the LVDS0 block to configure a serializer. I don't understand why the i2c0_lvds0 node is not defined in the file imx8qm-ss-lvds.dtsi.
Only i2c1_lvds0 is there:
i2c1_lvds0: i2c@56247000 {
compatible = "fsl,imx8qm-lpi2c", "fsl,imx7ulp-lpi2c";
reg = <0x56247000 0x4000>;
interrupts = <9>;
interrupt-parent = <&irqsteer_lvds0>;
clocks = <&lvds0_i2c0_lpcg 0>,
<&lvds0_i2c0_lpcg 1>;
clock-names = "per", "ipg";
assigned-clocks = <&clk IMX_SC_R_LVDS_0_I2C_0 IMX_SC_PM_CLK_PER>;
assigned-clock-rates = <24000000>;
power-domains = <&pd IMX_SC_R_LVDS_0_I2C_0>;
status = "disabled";
};
So in my custom dts I added the node for the i2c0_lvds0:
&lvds1_subsys {
i2c0_lvds0: i2c@56246000 {
compatible = "fsl,imx8qm-lpi2c", "fsl,imx7ulp-lpi2c";
reg = <0x56246000 0x4000>;
interrupts = <8>;
interrupt-parent = <&irqsteer_lvds0>;
clocks = <&lvds0_i2c0_lpcg 0>,
<&lvds0_i2c0_lpcg 1>;
clock-names = "per", "ipg";
assigned-clocks = <&clk IMX_SC_R_LVDS_0_I2C_0 IMX_SC_PM_CLK_PER>;
assigned-clock-rates = <24000000>;
power-domains = <&pd IMX_SC_R_LVDS_0_I2C_0>;
status = "okay";
};
};
&i2c0_lvds0 {
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lvds0_lpi2c0>;
clock-frequency = <400000>;
status = "okay";
lvds-panel@1a {
compatible = "ti,ds90ub947";
reg = <0x1a>;
#address-cells = <0x1>;
#size-cells = <0x0>;
#reset-cells = <0x1>;
dual-pixel-mode;
port {
ds90ub947_0_in: endpoint {
clock-lanes = <3>;
data-lanes = <0 1 2 4>;
remote-endpoint = <&lvds0_out>;
};
};
display-timings {
1920X1080P@1a {
clock-frequency = <72800000>;
hactive = <1920>;
vactive = <1080>;
hfront-porch = <0>;
hback-porch = <120>;
hsync-len = <0>;
vback-porch = <44>;
vfront-porch = <0>;
vsync-len = <0>;
hsync-active = <1>;
vsync-active = <0>;
};
};
};
};
pinctrl_lvds0_lpi2c0: lvds0lpi2c0grp {
fsl,pins = <
IMX8QM_LVDS0_I2C0_SCL_LVDS0_I2C0_SCL 0xc600000c
IMX8QM_LVDS0_I2C0_SDA_LVDS0_I2C0_SDA 0xc600000c
>;
};
It's strange that I have to add the i2c0_lvds0 and pinctrl_lvds0_lpi2c0...
After flashing the new build it seems I can detect that i2c which is listed as i2c-4:
Unfortunately nothing is detected on that i2c
I posted a comment on this post as well where other people seem to have the same problem years ago but they didn't get a clear answer. https://community.nxp.com/t5/i-MX-Processors/IMX8QM-cross-connection-of-the-clock-signals-of-i2c-lvd...
So here are my questions:
1 - Why the i2c0_ldvs0 node is not defined in the file imx8qm-ss-lvds.dtsi?
2 - Will it have any negative consequences by adding that i2c0_ldvs0 node in my own dts?
3 - Do I need to add a configuration in the SCU firmware to get a proper i2c0_lvds0 configuration?
4 - How can I detect that i2c0 from u-boot?
5 - I'm using boot mode flex spi, I don't use M4 cores. Is there any changes to be made on the M4 cores?
Thank you in advance.
Best Regards,
Ingrid
解決済! 解決策の投稿を見る。
Hello,
1 > Do not know which kernel version are you using as reference, but in latest release it is actually there:
2 > same as above
3 > No, we use one of the pads (IMX8QM_LVDS0_I2C0_SDA_LSIO_GPIO1_IO07)for MIPI DSI:
So, please check that you don’t have this pad muxed to another peripheral.
4 > You may enable it in dts
5 > No it should be ok
Regarding your test, have you tried connecting an oscilloscope or a logic analyzer to check the signals?
Best regards,
Aldo.
Hello,
1 > Do not know which kernel version are you using as reference, but in latest release it is actually there:
2 > same as above
3 > No, we use one of the pads (IMX8QM_LVDS0_I2C0_SDA_LSIO_GPIO1_IO07)for MIPI DSI:
So, please check that you don’t have this pad muxed to another peripheral.
4 > You may enable it in dts
5 > No it should be ok
Regarding your test, have you tried connecting an oscilloscope or a logic analyzer to check the signals?
Best regards,
Aldo.
Hi Aldo,
Thank you for your answer!
I'm using kernel 5.4, in this version the i2c0_lvds1 is not there.
It's now working, the problem was I you said the I2C0_SCL pad was defined for the mipi!
So in my case I removed the following node:
pinctrl_mipi0_lpi2c0: mipi0_lpi2c0grp {
fsl,pins = <
IMX8QM_MIPI_DSI0_I2C0_SCL_MIPI_DSI0_I2C0_SCL 0xc6000020
IMX8QM_MIPI_DSI0_I2C0_SDA_MIPI_DSI0_I2C0_SDA 0xc6000020
IMX8QM_MIPI_DSI0_GPIO0_01_LSIO_GPIO1_IO19 0x00000020
>;
};
Best Regards,
Ingrid