Hello everyone,
I’d like to test UARTs at maximum possible baud rate.
Default device tree (imx7-colibri.dtsi) provides this configuration for UART1:
&uart1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart1 &pinctrl_uart1_ctrl1 &pinctrl_uart1_ctrl2>;
assigned-clocks = <&clks IMX7D_UART1_ROOT_SRC>;
assigned-clock-parents = <&clks IMX7D_OSC_24M_CLK>;
uart-has-rtscts;
fsl,dte-mode;
};
With IMX7D_OSC_24M_CLK I can run the UART at maximum 1.5Mbps. (24MHz/16 = 1.5Mbps)
I would like to setup the reference clock at SYS_PLL (480MHz) with a div x6 to reach 80MHz (maximum accepted for UART).
In my custom device tree I tried this without success:
&uart1 {
assigned-clocks = <&clks IMX7D_UART1_ROOT_SRC>;
assigned-clock-parents = <&clks IMX7D_PLL_SYS_MAIN_CLK>;
assigned-clock-rates = <80000000>;
};
I got this error
~# dmesg | grep uart
[ 1.271156] imx-uart 30860000.serial: clk_set_rate() failed
[ 1.278506] imx-uart: probe of 30860000.serial failed with error -16
How can I set CCM (source clock, pre_div, post_div, ecc) in the correct way?
Thank you in advance,
Luca