linux-stable/arch/arm64
Frank Li 24c0c5867a arm64: dts: imx8-ss-conn: fix usdhc wrong lpcg clock order
[ Upstream commit c6ddd6e7b1 ]

The actual clock show wrong frequency:

   echo on >/sys/devices/platform/bus\@5b000000/5b010000.mmc/power/control
   cat /sys/kernel/debug/mmc0/ios

   clock:          200000000 Hz
   actual clock:   166000000 Hz
                   ^^^^^^^^^
   .....

According to

sdhc0_lpcg: clock-controller@5b200000 {
                compatible = "fsl,imx8qxp-lpcg";
                reg = <0x5b200000 0x10000>;
                #clock-cells = <1>;
                clocks = <&clk IMX_SC_R_SDHC_0 IMX_SC_PM_CLK_PER>,
                         <&conn_ipg_clk>, <&conn_axi_clk>;
                clock-indices = <IMX_LPCG_CLK_0>, <IMX_LPCG_CLK_4>,
                                <IMX_LPCG_CLK_5>;
                clock-output-names = "sdhc0_lpcg_per_clk",
                                     "sdhc0_lpcg_ipg_clk",
                                     "sdhc0_lpcg_ahb_clk";
                power-domains = <&pd IMX_SC_R_SDHC_0>;
        }

"per_clk" should be IMX_LPCG_CLK_0 instead of IMX_LPCG_CLK_5.

After correct clocks order:

   echo on >/sys/devices/platform/bus\@5b000000/5b010000.mmc/power/control
   cat /sys/kernel/debug/mmc0/ios

   clock:          200000000 Hz
   actual clock:   198000000 Hz
                   ^^^^^^^^
   ...

Fixes: 16c4ea7501 ("arm64: dts: imx8: switch to new lpcg clock binding")
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-17 11:18:23 +02:00
..
boot arm64: dts: imx8-ss-conn: fix usdhc wrong lpcg clock order 2024-04-17 11:18:23 +02:00
configs arm64: defconfig: remove CONFIG_COMMON_CLK_NPCM8XX=y 2023-10-06 14:57:03 +02:00
crypto crypto: arm64/neonbs - fix out-of-bounds access on short input 2024-03-06 14:45:10 +00:00
hyperv
include arm64/sve: Lower the maximum allocation for the SVE ptrace regset 2024-03-26 18:20:25 -04:00
kernel arm64/sve: Lower the maximum allocation for the SVE ptrace regset 2024-03-26 18:20:25 -04:00
kvm KVM: arm64: vgic-its: Test for valid IRQ in its_sync_lpi_pending_table() 2024-03-01 13:26:32 +01:00
lib
mm arm64: mm: Fix "rodata=on" when CONFIG_RODATA_FULL_DEFAULT_ENABLED=y 2023-12-03 07:32:08 +01:00
net bpf: Remove prog->active check for bpf_lsm and bpf_iter 2023-09-19 12:28:03 +02:00
tools arm64: Rename ARM64_WORKAROUND_2966298 2024-01-31 16:17:01 -08:00
xen
Kbuild
Kconfig arm64: Rename ARM64_WORKAROUND_2966298 2024-01-31 16:17:01 -08:00
Kconfig.debug
Kconfig.platforms
Makefile arm64: add dependency between vmlinuz.efi and Image 2023-12-20 17:00:24 +01:00