OpenCloudOS-Kernel/arch/arm64
Frank Li ea16e637e8 arm64: dts: imx8-ss-conn: fix usdhc wrong lpcg clock order
[ Upstream commit c6ddd6e7b166532a0816825442ff60f70aed9647 ]

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:19:27 +02:00
..
boot arm64: dts: imx8-ss-conn: fix usdhc wrong lpcg clock order 2024-04-17 11:19:27 +02:00
configs arm64: defconfig: enable syscon-poweroff driver 2023-09-28 09:17:05 +02:00
crypto crypto: arm64/neonbs - fix out-of-bounds access on short input 2024-03-06 14:48:40 +00:00
hyperv arm64/hyperv: Use CPUHP_AP_HYPERV_ONLINE state to fix CPU online sequencing 2023-06-17 23:09:47 +00:00
include arm64/sve: Lower the maximum allocation for the SVE ptrace regset 2024-03-26 18:19:11 -04:00
kernel arm64/ptrace: Use saved floating point state type to determine SVE layout 2024-04-10 16:36:03 +02:00
kvm KVM: arm64: Ensure target address is granule-aligned for range TLBI 2024-04-10 16:35:51 +02:00
lib arm64 fixes for -rc1 2023-09-08 12:48:37 -07:00
mm arm64: mm: Fix "rodata=on" when CONFIG_RODATA_FULL_DEFAULT_ENABLED=y 2023-12-03 07:33:05 +01:00
net arm64: bpf: fix 32bit unconditional bswap 2024-04-10 16:35:40 +02:00
tools arm64: Rename ARM64_WORKAROUND_2966298 2024-01-31 16:18:55 -08:00
xen
Kbuild
Kconfig arm64: ftrace: Don't forbid CALL_OPS+CC_OPTIMIZE_FOR_SIZE with Clang 2024-03-26 18:19:53 -04:00
Kconfig.debug
Kconfig.platforms STM32 STM32MP25 for v6.5, round 1 2023-06-20 22:28:44 +02:00
Makefile arm64: add dependency between vmlinuz.efi and Image 2023-12-20 17:02:00 +01:00