Skip to content
Commit 94cdbf9f authored by Francesco Dolcini's avatar Francesco Dolcini Committed by Xulin Sun
Browse files

clk: keystone: syscon-clk: Fix audio refclk

commit 18be5541ac7221811339acf978151249c56d8e5e from
git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git

commit dd1df82c upstream.

Audio REFCLK's are not working correctly, trying to use them lead to the
following errors:

[    6.575277] of_clk_hw_onecell_get: invalid index 4294934528
[    6.581515] wm8904 1-001a: Failed to get MCLK
[    6.586290] wm8904: probe of 1-001a failed with error -2

The issue is that Audio REFCLK has #clock-cells = 0 [1], while the driver
is registering those clocks assuming they have one cells. Fix this by
registering the clock with of_clk_hw_simple_get() when there is only one
instance, e.g. "audio_refclk".

[1] Documentation/devicetree/bindings/clock/ti,am62-audio-refclk.yaml

Fixes: 6acab96e

 ("clk: keystone: syscon-clk: Add support for audio refclk")
Signed-off-by: default avatarFrancesco Dolcini <francesco.dolcini@toradex.com>
Link: https://lore.kernel.org/r/20230728222639.110409-1-francesco@dolcini.it
[sboyd@kernel.org: Simplify if-return-else logic]
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
Signed-off-by: default avatarJai Luthra <j-luthra@ti.com>
Signed-off-by: default avatarXulin Sun <xulin.sun@windriver.com>
parent 793d4754
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment