]> git.itanic.dy.fi Git - linux-stable/commit
arm64: dts: imx8-ss-dma: fix spi lpcg indices
authorFrank Li <Frank.Li@nxp.com>
Mon, 1 Apr 2024 22:25:05 +0000 (18:25 -0400)
committerShawn Guo <shawnguo@kernel.org>
Wed, 3 Apr 2024 12:44:30 +0000 (20:44 +0800)
commitf72b544a514c07d34a0d9d5380f5905b3731e647
tree193de7feda35f7bd5fca9d573e8462947b31a144
parent808e7716edcdb39d3498b9f567ef6017858b49aa
arm64: dts: imx8-ss-dma: fix spi lpcg indices

spi0_lpcg: clock-controller@5a400000 {
...                                                  Col0   Col1
clocks = <&clk IMX_SC_R_SPI_0 IMX_SC_PM_CLK_PER>,//   0      1
 <&dma_ipg_clk>;                         //   1      4
clock-indices = <IMX_LPCG_CLK_0>, <IMX_LPCG_CLK_4>;
};

Col1: index, which existing dts try to get.
Col2: actual index in lpcg driver.

lpspi0: spi@5a000000 {
...
clocks = <&spi0_lpcg 0>, <&spi0_lpcg 1>;
     ^      ^
Should be:
clocks = <&spi0_lpcg IMX_LPCG_CLK_0>, <&spi0_lpcg IMX_LPCG_CLK_4>;
};

Arg0 is divided by 4 in lpcg driver. <&spi0_lpcg 0> and <&spi0_lpcg 1> are
IMX_SC_PM_CLK_PER. Although code can work, code logic is wrong. It should
use IMX_LPCG_CLK_0 and IMX_LPCG_CLK_4 for lpcg arg0.

Cc: stable@vger.kernel.org
Fixes: c4098885e790 ("arm64: dts: imx8dxl: add lpspi support")
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm64/boot/dts/freescale/imx8-ss-dma.dtsi