• Frank Li's avatar
    arm64: dts: imx8qm-ss-dma: fix can lpcg indices · 00b43618
    Frank Li authored
    can1_lpcg: clock-controller@5ace0000 {
    	...						    Col1   Col2
    	clocks = <&clk IMX_SC_R_CAN_1 IMX_SC_PM_CLK_PER>,//  0       0
    		 <&dma_ipg_clk>,			 //  1       4
    		 <&dma_ipg_clk>;			 //  2       5
    	clock-indices = <IMX_LPCG_CLK_0>,
    			<IMX_LPCG_CLK_4>,
    			<IMX_LPCG_CLK_5>;
    };
    
    Col1: index, which existing dts try to get.
    Col2: actual index in lpcg driver
    
    &flexcan2 {
    	clocks = <&can1_lpcg 1>, <&can1_lpcg 0>;
    			     ^^		     ^^
    Should be:
    	clocks = <&can1_lpcg IMX_LPCG_CLK_4>, <&can1_lpcg IMX_LPCG_CLK_0>;
    };
    
    Arg0 is divided by 4 in lpcg driver. So flexcan get IMX_SC_PM_CLK_PER by
    <&can1_lpcg 1> and <&can1_lpcg 0>. Although function work, code logic is
    wrong. Fix it by using correct clock indices.
    
    Cc: stable@vger.kernel.org
    Fixes: be85831d ("arm64: dts: imx8qm: add can node in devicetree")
    Signed-off-by: default avatarFrank Li <Frank.Li@nxp.com>
    Signed-off-by: default avatarShawn Guo <shawnguo@kernel.org>
    00b43618
imx8qm-ss-dma.dtsi 5.87 KB