Hi,
I am trying to enable 24Mhz clock output from i.MX8mp by following the ov5640 sensor in source and dts files.
I need a 24Mhz clock as a source for MIPI to CSI-2 bridge driver from Toshiba.
After making all changes I am not able to capture the clock signals in the test point of the CLKOUT1.
Currently, I do not have the bridge driver IC attached to the processor but wanted to check all the interface signals are working fine, Like clock, reset, and power pins.
My dts,
tc9591x: tc9591x_mipi@1c {
compatible = "toshiba,tc9591x";
reg = <0x1c>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_csi_rst>;
clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO1>;
clock-names = "xclk";
assigned-clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO1>;
assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
assigned-clock-rates = <24000000>;
csi_id = <0>;
reset-gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
mclk = <24000000>;
mclk_source = <0>;
mipi_csi;
status = "okay";
port {
tc9591_mipi_1_ep: endpoint {
remote-endpoint = <&mipi_csi1_ep>;
link-frequencies = /bits/ 64 <500000000>;
data-lanes = <1 2 3 4>;
clock-lanes = <0>;
};
};
};
pinctrl_csi_rst: csi_rst_grp {
fsl,pins = <
MX8MP_IOMUXC_GPIO1_IO00__GPIO1_IO00 0x106
>;
};
&mipi_csi_1 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
port@1 {
reg = <1>;
mipi_csi1_ep: endpoint {
remote-endpoint = <&tc9591_mipi_1_ep>;
link-frequencies = /bits/ 64 <750000000>;
data-lanes = <4>;
clock-lanes = <0>;
csis-hs-settle = <13>;
csis-clk-settle = <2>;
csis-wclk;
};
};
};
Also made changes in clk-imx8mp.c as suggested by the forum.
diff --git a/drivers/clk/imx/clk-imx8mp.c b/drivers/clk/imx/clk-imx8mp.c
index aa80334196ff..6e6e9b871f54 100644
--- a/drivers/clk/imx/clk-imx8mp.c
+++ b/drivers/clk/imx/clk-imx8mp.c
@@ -1018,12 +1018,19 @@ static int imx8mp_clocks_probe(struct platform_device *pdev)
hws[IMX8MP_ARM_PLL_OUT]->clk,
hws[IMX8MP_CLK_A53_DIV]->clk);
+ clk_set_parent(hws[IMX8MP_CLK_A53_SRC]->clk, hws[IMX8MP_SYS_PLL1_800M]->clk);
+ clk_set_parent(hws[IMX8MP_CLK_A53_CORE]->clk, hws[IMX8MP_ARM_PLL_OUT]->clk);
+
imx_check_clk_hws(hws, IMX8MP_CLK_END);
of_clk_add_hw_provider(np, of_clk_hw_onecell_get, clk_hw_data);
imx_clk_init_on(np, hws);
-
+
+ //enable clkout1 to 24Mhz
+ clk_set_parent(hws[IMX8MP_CLK_IPP_DO_CLKO1]->clk, hws[IMX8MP_CLK_24M]->clk);
+ clk_prepare_enable(hws[IMX8MP_CLK_IPP_DO_CLKO1]->clk);
+
imx_register_uart_clocks(4);
return 0;
After doing all the changes still i am not getting the clock signals from the clkout1 pin.
Please guide me to know what I am missing here.
Some assumptions,
1. If the Bridge driver is not present then the kernel driver will fail on probing and this lead to stopping the clock. In this case, the clock should be present at the initial stage of the power cycle before the driver finds the driver IC is missing. ?.
2. is there a way to enable the clock alone for testing by changing the dts file and source code?
3. Can the clock signals be captured by an oscilloscope from the CLKOUT1 pin without any load?
Correct me if my understanding is wrong.
Thank you very much.