• Frank Li's avatar
    arm64: dts: imx8-ss-lsio: fix pwm lpcg indices · 1d86c2b3
    Frank Li authored
    lpcg's arg0 should use clock indices instead of index.
    
    pwm0_lpcg: clock-controller@5d400000 {
    	...                                                // Col1  Col2
    	clocks = <&clk IMX_SC_R_PWM_0 IMX_SC_PM_CLK_PER>,  // 0     0
    		 <&clk IMX_SC_R_PWM_0 IMX_SC_PM_CLK_PER>,  // 1     1
    		 <&clk IMX_SC_R_PWM_0 IMX_SC_PM_CLK_PER>,  // 2     4
    		 <&lsio_bus_clk>,                          // 3     5
    		 <&clk IMX_SC_R_PWM_0 IMX_SC_PM_CLK_PER>;  // 4     6
    	clock-indices = <IMX_LPCG_CLK_0>, <IMX_LPCG_CLK_1>,
    			<IMX_LPCG_CLK_4>, <IMX_LPCG_CLK_5>,
    			<IMX_LPCG_CLK_6>;
    };
    
    Col1: index, which existing dts try to get.
    Col2: actual index in lpcg driver.
    
    pwm1 {
    	....
    	clocks = <&pwm1_lpcg 4>, <&pwm1_lpcg 1>;
                                 ^^              ^^
    should be:
    
    	clocks = <&pwm1_lpcg IMX_LPCG_CLK_6>, <&pwm1_lpcg IMX_LPCG_CLK_1>;
    };
    
    Arg0 is divided by 4 in lpcg driver, so index 0 and 1 will be get by pwm
    driver, which are same as IMX_LPCG_CLK_6 and IMX_LPCG_CLK_1. Even it can
    work, but code logic is wrong. Fixed it by use correct indices.
    
    Cc: stable@vger.kernel.org
    Fixes: 23fa99b2 ("arm64: dts: freescale: imx8-ss-lsio: add support for lsio_pwm0-3")
    Signed-off-by: default avatarFrank Li <Frank.Li@nxp.com>
    Signed-off-by: default avatarShawn Guo <shawnguo@kernel.org>
    1d86c2b3
imx8-ss-lsio.dtsi 11 KB