Skip to content

Commit 1d86c2b

Browse files
nxpfrankliShawn Guo
authored andcommitted
arm64: dts: imx8-ss-lsio: fix pwm lpcg indices
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: [email protected] Fixes: 23fa99b ("arm64: dts: freescale: imx8-ss-lsio: add support for lsio_pwm0-3") Signed-off-by: Frank Li <[email protected]> Signed-off-by: Shawn Guo <[email protected]>
1 parent 135f218 commit 1d86c2b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

arch/arm64/boot/dts/freescale/imx8-ss-lsio.dtsi

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ lsio_subsys: bus@5d000000 {
2525
compatible = "fsl,imx27-pwm";
2626
reg = <0x5d000000 0x10000>;
2727
clock-names = "ipg", "per";
28-
clocks = <&pwm0_lpcg 4>,
29-
<&pwm0_lpcg 1>;
28+
clocks = <&pwm0_lpcg IMX_LPCG_CLK_6>,
29+
<&pwm0_lpcg IMX_LPCG_CLK_1>;
3030
assigned-clocks = <&clk IMX_SC_R_PWM_0 IMX_SC_PM_CLK_PER>;
3131
assigned-clock-rates = <24000000>;
3232
#pwm-cells = <3>;
@@ -38,8 +38,8 @@ lsio_subsys: bus@5d000000 {
3838
compatible = "fsl,imx27-pwm";
3939
reg = <0x5d010000 0x10000>;
4040
clock-names = "ipg", "per";
41-
clocks = <&pwm1_lpcg 4>,
42-
<&pwm1_lpcg 1>;
41+
clocks = <&pwm1_lpcg IMX_LPCG_CLK_6>,
42+
<&pwm1_lpcg IMX_LPCG_CLK_1>;
4343
assigned-clocks = <&clk IMX_SC_R_PWM_1 IMX_SC_PM_CLK_PER>;
4444
assigned-clock-rates = <24000000>;
4545
#pwm-cells = <3>;
@@ -51,8 +51,8 @@ lsio_subsys: bus@5d000000 {
5151
compatible = "fsl,imx27-pwm";
5252
reg = <0x5d020000 0x10000>;
5353
clock-names = "ipg", "per";
54-
clocks = <&pwm2_lpcg 4>,
55-
<&pwm2_lpcg 1>;
54+
clocks = <&pwm2_lpcg IMX_LPCG_CLK_6>,
55+
<&pwm2_lpcg IMX_LPCG_CLK_1>;
5656
assigned-clocks = <&clk IMX_SC_R_PWM_2 IMX_SC_PM_CLK_PER>;
5757
assigned-clock-rates = <24000000>;
5858
#pwm-cells = <3>;
@@ -64,8 +64,8 @@ lsio_subsys: bus@5d000000 {
6464
compatible = "fsl,imx27-pwm";
6565
reg = <0x5d030000 0x10000>;
6666
clock-names = "ipg", "per";
67-
clocks = <&pwm3_lpcg 4>,
68-
<&pwm3_lpcg 1>;
67+
clocks = <&pwm3_lpcg IMX_LPCG_CLK_6>,
68+
<&pwm3_lpcg IMX_LPCG_CLK_1>;
6969
assigned-clocks = <&clk IMX_SC_R_PWM_3 IMX_SC_PM_CLK_PER>;
7070
assigned-clock-rates = <24000000>;
7171
#pwm-cells = <3>;

0 commit comments

Comments
 (0)